2022-09-21 10:26:19 +00:00
|
|
|
# REST Gateway
|
|
|
|
|
2022-12-21 11:59:19 +00:00
|
|
|
REST Gateway to access data in FrostFS using REST.
|
2022-09-21 10:26:19 +00:00
|
|
|
|
2023-06-07 09:49:23 +00:00
|
|
|
Source code and more information can be found in [project's repository](https://git.frostfs.info/TrueCloudLab/frostfs-rest-gw)
|
2022-09-21 10:26:19 +00:00
|
|
|
|
|
|
|
## .env settings
|
|
|
|
|
|
|
|
### REST_GW_VERSION=0.4.0
|
|
|
|
|
|
|
|
Image version label to use for containers.
|
|
|
|
|
|
|
|
If you want to use locally built image, just set its label here.
|
|
|
|
Instead of pulling from DockerHub, the local image will be used.
|
|
|
|
|
2022-12-21 11:59:19 +00:00
|
|
|
### REST_GW_IMAGE=truecloudlab/frostfs-rest-gw
|
2022-09-21 10:26:19 +00:00
|
|
|
|
|
|
|
Image label prefix to use for containers.
|
|
|
|
|
|
|
|
## Usage example
|
|
|
|
|
|
|
|
- List container for specific owner:
|
|
|
|
|
|
|
|
```shell
|
2022-12-21 11:59:19 +00:00
|
|
|
$ curl http://rest.frostfs.devenv:8090/v1/containers?ownerId=NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM | jq
|
2022-09-21 10:26:19 +00:00
|
|
|
{
|
|
|
|
"containers": [
|
|
|
|
{
|
|
|
|
"attributes": [
|
|
|
|
{
|
|
|
|
"key": "Timestamp",
|
|
|
|
"value": "1663755230"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"basicAcl": "fbfbfff",
|
|
|
|
"cannedAcl": "eacl-public-read-write",
|
|
|
|
"containerId": "BKcAvz8awKKy9NGsGKi1Hoxxu9AjTGvjKMNMQamvdLmX",
|
|
|
|
"containerName": "",
|
|
|
|
"ownerId": "NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM",
|
|
|
|
"placementPolicy": "REP 1 IN X\nCBF 1\nSELECT 1 FROM * AS X",
|
|
|
|
"version": "v2.13"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"size": 1
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
- Get container info:
|
|
|
|
|
|
|
|
```shell
|
2022-12-21 11:59:19 +00:00
|
|
|
$ curl http://rest.frostfs.devenv:8090/v1/containers/BKcAvz8awKKy9NGsGKi1Hoxxu9AjTGvjKMNMQamvdLmX | jq
|
2022-09-21 10:26:19 +00:00
|
|
|
{
|
|
|
|
"attributes": [
|
|
|
|
{
|
|
|
|
"key": "Timestamp",
|
|
|
|
"value": "1663755230"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"basicAcl": "fbfbfff",
|
|
|
|
"cannedAcl": "eacl-public-read-write",
|
|
|
|
"containerId": "BKcAvz8awKKy9NGsGKi1Hoxxu9AjTGvjKMNMQamvdLmX",
|
|
|
|
"containerName": "",
|
|
|
|
"ownerId": "NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM",
|
|
|
|
"placementPolicy": "REP 1 IN X\nCBF 1\nSELECT 1 FROM * AS X",
|
|
|
|
"version": "v2.13"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-12-21 11:59:19 +00:00
|
|
|
See all available routes http://rest.frostfs.devenv:8090/v1/docs
|