mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
GITBOOK-213: Adding additional javascript examples with runkit
This commit is contained in:
parent
db674d1797
commit
4612f20c3e
@ -215,7 +215,7 @@ for (const value of response.data.hits.hits) {
|
|||||||
|
|
||||||
Validate DDO content. Cosumes `application/octet-stream`
|
Validate DDO content. Cosumes `application/octet-stream`
|
||||||
|
|
||||||
#### Example
|
#### Curl Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl --location --request POST 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/query/api/v1/aquarius/assets/ddo/validate' \
|
curl --location --request POST 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/query/api/v1/aquarius/assets/ddo/validate' \
|
||||||
@ -223,6 +223,10 @@ curl --location --request POST 'https://v4.aquarius.oceanprotocol.com/api/aquari
|
|||||||
--data-raw '<json_body>'
|
--data-raw '<json_body>'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Javascript Example
|
||||||
|
|
||||||
|
{% embed url="https://runkit.com/oceanprotocol/646b68e10611080008c6a640" %}
|
||||||
|
|
||||||
#### Valid body
|
#### Valid body
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -299,6 +303,18 @@ curl --location --request POST 'https://v4.aquarius.oceanprotocol.com/api/aquari
|
|||||||
--data-raw '<json_body>'
|
--data-raw '<json_body>'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Javascript Example
|
||||||
|
|
||||||
|
```runkit nodeVersion="18.x.x"
|
||||||
|
const axios = require('axios')
|
||||||
|
|
||||||
|
const body = { "transactionId": "0x945596edf2a26d127514a78ed94fea86b199e68e9bed8b6f6d6c8bb24e451f27", "logIndex": 0}
|
||||||
|
const response = await axios.post( 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/triggerCaching', body)
|
||||||
|
console.log(response.status)
|
||||||
|
console.log(response.data)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
#### Valid body
|
#### Valid body
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -338,7 +354,14 @@ curl --location --request GET 'https://v4.aquarius.oceanprotocol.com/api/aquariu
|
|||||||
|
|
||||||
#### Javascript Example
|
#### Javascript Example
|
||||||
|
|
||||||
{% embed url="https://runkit.com/oceanprotocol/646b66cc929a68000864e76e" %}
|
```runkit nodeVersion="18.x.x"
|
||||||
|
const axios = require('axios')
|
||||||
|
|
||||||
|
const response = await axios( 'https://v4.aquarius.oceanprotocol.com/api/aquarius/chains/list')
|
||||||
|
console.log(response.status)
|
||||||
|
console.log(response.data)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
@ -367,6 +390,18 @@ Get index status for a specific chain\_id
|
|||||||
curl --location --request GET 'https://v4.aquarius.oceanprotocol.com/api/aquarius/chains/status/137'
|
curl --location --request GET 'https://v4.aquarius.oceanprotocol.com/api/aquarius/chains/status/137'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Javascript Example
|
||||||
|
|
||||||
|
```runkit nodeVersion="18.x.x"
|
||||||
|
const axios = require('axios')
|
||||||
|
const chainId = 1
|
||||||
|
|
||||||
|
const response = await axios( `https://v4.aquarius.oceanprotocol.com/api/aquarius/chains/status/${chainId}`)
|
||||||
|
console.log(response.status)
|
||||||
|
console.log(response.data)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
`200`
|
`200`
|
||||||
|
Loading…
Reference in New Issue
Block a user