mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
GITBOOK-204: change request with no subject merged in GitBook
This commit is contained in:
parent
dfd52db80a
commit
1f1547960c
@ -1,4 +1,4 @@
|
|||||||
# Aquarius REST API
|
# Aquarius
|
||||||
|
|
||||||
The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](https://v4.aquarius.oceanprotocol.com).
|
The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](https://v4.aquarius.oceanprotocol.com).
|
||||||
|
|
||||||
@ -6,24 +6,44 @@ The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](htt
|
|||||||
|
|
||||||
### **Get** `/api/aquarius/assets/ddo/<did>`
|
### **Get** `/api/aquarius/assets/ddo/<did>`
|
||||||
|
|
||||||
* Description
|
#### Description
|
||||||
|
|
||||||
Get DDO of a particular asset.
|
Get DDO of a particular asset.
|
||||||
* Parameters
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
| name | description | type | in | required |
|
| name | description | type | in | required |
|
||||||
| ----- | ---------------- | ------ | ---- | -------- |
|
| ----- | ---------------- | ------ | ---- | -------- |
|
||||||
| `did` | DID of the asset | string | path | true |
|
| `did` | DID of the asset | string | path | true |
|
||||||
* Example
|
|
||||||
|
|
||||||
```bash
|
#### Curl Example
|
||||||
|
|
||||||
|
```
|
||||||
curl --location --request GET 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6'
|
curl --location --request GET 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6'
|
||||||
```
|
```
|
||||||
* Responses
|
|
||||||
* 200
|
#### Javascript Example
|
||||||
|
|
||||||
|
```runkit nodeVersion="18.x.x"
|
||||||
|
const axios = require('axios')
|
||||||
|
const did = 'did:op:ce3f161fb98c64a2ded37fd34e25f28343f2c88d0c8205242df9c621770d4b3b'
|
||||||
|
const response = await axios(`https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/${did}`)
|
||||||
|
console.log(response.status)
|
||||||
|
console.log(response.data.nftAddress)
|
||||||
|
console.log(response.data.metadata.name)
|
||||||
|
console.log(response.data.metadata.description)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
`200`
|
||||||
|
|
||||||
* content-type: json
|
* content-type: json
|
||||||
* description: On successful operation returns DDO information.
|
* description: On successful operation returns DDO information.
|
||||||
* 404
|
|
||||||
|
`404`
|
||||||
|
|
||||||
* content-type: json
|
* content-type: json
|
||||||
* description: This asset DID is not in ES.
|
* description: This asset DID is not in ES.
|
||||||
* response body:
|
* response body:
|
||||||
@ -36,24 +56,31 @@ The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](htt
|
|||||||
|
|
||||||
### **GET** `/api/aquarius/assets/metadata/<did>`
|
### **GET** `/api/aquarius/assets/metadata/<did>`
|
||||||
|
|
||||||
* Description
|
#### Description
|
||||||
|
|
||||||
Get metadata of a particular asset.
|
Get metadata of a particular asset.
|
||||||
* Parameters
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
| name | description | type | in | required |
|
| name | description | type | in | required |
|
||||||
| ----- | ---------------- | ------ | ---- | -------- |
|
| ----- | ---------------- | ------ | ---- | -------- |
|
||||||
| `did` | DID of the asset | string | path | true |
|
| `did` | DID of the asset | string | path | true |
|
||||||
* Example
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl --location --request GET 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/metadata/did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6'
|
curl --location --request GET 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/metadata/did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6'
|
||||||
```
|
```
|
||||||
* Responses
|
|
||||||
* 200
|
#### Responses
|
||||||
|
|
||||||
|
`200`
|
||||||
|
|
||||||
* content-type: json
|
* content-type: json
|
||||||
* description: successful operation.
|
* description: successful operation.
|
||||||
* 404
|
|
||||||
|
`404`
|
||||||
|
|
||||||
* content-type: json
|
* content-type: json
|
||||||
* description: This asset DID is not in ES.
|
* description: This asset DID is not in ES.
|
||||||
* response body:
|
* response body:
|
||||||
@ -66,15 +93,17 @@ The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](htt
|
|||||||
|
|
||||||
### **POST** `/api/aquarius/assets/names`
|
### **POST** `/api/aquarius/assets/names`
|
||||||
|
|
||||||
* Description
|
#### Description
|
||||||
|
|
||||||
Get names of assets as specified in the payload.
|
Get names of assets as specified in the payload.
|
||||||
* Parameters
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
| name | description | type | in | required |
|
| name | description | type | in | required |
|
||||||
| --------- | ------------------ | ---- | ---- | -------- |
|
| --------- | ------------------ | ---- | ---- | -------- |
|
||||||
| `didList` | list of asset DIDs | list | body | true |
|
| `didList` | list of asset DIDs | list | body | true |
|
||||||
* Example
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl --location --request POST 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/names' \
|
curl --location --request POST 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/names' \
|
||||||
@ -83,8 +112,11 @@ The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](htt
|
|||||||
"didList" : ["did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6"]
|
"didList" : ["did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6"]
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
* Responses
|
|
||||||
* 200
|
#### Responses
|
||||||
|
|
||||||
|
`200`
|
||||||
|
|
||||||
* content-type: json
|
* content-type: json
|
||||||
* description: successful operation.
|
* description: successful operation.
|
||||||
* response body:
|
* response body:
|
||||||
@ -92,7 +124,9 @@ The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](htt
|
|||||||
```
|
```
|
||||||
{"did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6": "Ocean CEX Aggregator: OHLC history for OCEAN/USDT "}
|
{"did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6": "Ocean CEX Aggregator: OHLC history for OCEAN/USDT "}
|
||||||
```
|
```
|
||||||
* 400
|
|
||||||
|
`400`
|
||||||
|
|
||||||
* content-type: json
|
* content-type: json
|
||||||
* description: This asset DID is not in ES.
|
* description: This asset DID is not in ES.
|
||||||
* response body:
|
* response body:
|
||||||
@ -105,10 +139,11 @@ The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](htt
|
|||||||
|
|
||||||
### **POST** `/api/aquarius/assets/query`
|
### **POST** `/api/aquarius/assets/query`
|
||||||
|
|
||||||
* Description
|
#### **Description**
|
||||||
|
|
||||||
Run a native ES query. Body must be a valid json object.
|
Run a native ES query. Body must be a valid json object.
|
||||||
* Example
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl --location --request POST 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/query' \
|
curl --location --request POST 'https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/query' \
|
||||||
@ -119,25 +154,32 @@ The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](htt
|
|||||||
}
|
}
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
* Responses
|
|
||||||
* 200
|
#### Responses
|
||||||
|
|
||||||
|
`200`
|
||||||
|
|
||||||
* content-type: json
|
* content-type: json
|
||||||
* 500
|
|
||||||
|
`500`
|
||||||
|
|
||||||
* description: elasticsearch exception
|
* description: elasticsearch exception
|
||||||
|
|
||||||
### **POST** `/api/aquarius/assets/ddo/validate`
|
### **POST** `/api/aquarius/assets/ddo/validate`
|
||||||
|
|
||||||
* Description
|
#### Description
|
||||||
|
|
||||||
Validate DDO content. Cosumes `application/octet-stream`
|
Validate DDO content. Cosumes `application/octet-stream`
|
||||||
* Example
|
|
||||||
|
#### 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' \
|
||||||
--header 'Content-Type: application/json' \
|
--header 'Content-Type: application/json' \
|
||||||
--data-raw '<json_body>'
|
--data-raw '<json_body>'
|
||||||
```
|
```
|
||||||
* Valid body
|
|
||||||
|
#### Valid body
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
@ -177,13 +219,20 @@ The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](htt
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
* Responses:
|
|
||||||
* 200
|
#### Responses:
|
||||||
* description: successfully request.
|
|
||||||
* 400
|
`200`
|
||||||
* description: Invalid DDO format
|
|
||||||
* 500
|
Successfull request.
|
||||||
* description: Error
|
|
||||||
|
`400`
|
||||||
|
|
||||||
|
Invalid DDO format
|
||||||
|
|
||||||
|
`500`
|
||||||
|
|
||||||
|
Error
|
||||||
|
|
||||||
### **POST** `/api/aquarius/assets/triggerCaching`
|
### **POST** `/api/aquarius/assets/triggerCaching`
|
||||||
|
|
||||||
@ -308,17 +357,21 @@ The universal Aquarius Endpoint is [`https://v4.aquarius.oceanprotocol.com`](htt
|
|||||||
|
|
||||||
### **GET** /spec
|
### **GET** /spec
|
||||||
|
|
||||||
* Description
|
#### Description
|
||||||
|
|
||||||
Get swagger spec
|
Get swagger spec
|
||||||
* Example
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl --location --request GET 'https://v4.aquarius.oceanprotocol.com/spec'
|
curl --location --request GET 'https://v4.aquarius.oceanprotocol.com/spec'
|
||||||
```
|
```
|
||||||
* Response
|
|
||||||
* 200
|
#### Response
|
||||||
* Description: Successful request
|
|
||||||
|
`200`
|
||||||
|
|
||||||
|
Successful request
|
||||||
|
|
||||||
### Postman documentation
|
### Postman documentation
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user