BUCKETSAPI
BucketsApi
Method | HTTP request | Description |
---|---|---|
httpbckdelete | DELETE /v1/buckets/{bucket-name} | Delete a bucket or delete/evict objects within a bucket |
httpbckget | GET /v1/buckets/{bucket-name} | List buckets or list objects within a bucket |
httpbckhead | HEAD /v1/buckets/{bucket-name}/ | Get bucket metadata and properties with additional preparsing step to support api.GetBucketInfo prefix (e.g. 'ais ls ais://nnn --summary --prefix=aaa/bbb') |
httpbckpatch | PATCH /v1/buckets/{bucket-name} | Update bucket properties and settings |
httpbckpost | POST /v1/buckets/{bucket-name} | Perform bucket operations: move, copy, ETL transform, prefetch, make copies, EC encode, and add remote buckets |
httpbckput | PUT /v1/buckets/{bucket-name} | Perform actions on a bucket (like archiving) |
httpbckdelete
Object httpbckdelete(request, provider, namespace, keep_bck_md)
Delete a bucket or delete/evict objects within a bucket
Supported actions: destroy-bck, evict-remote-bck, delete-listrange, evict-listrange
Example: destroy-bck
curl -i -L -X DELETE \
-H 'Content-Type: application/json' \
-d '{"action": "destroy-bck"}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&keep_bck_md=<value>'
Example: evict-remote-bck
curl -i -L -X DELETE \
-H 'Content-Type: application/json' \
-d '{"action": "evict-remote-bck"}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&keep_bck_md=<value>'
Example: delete-listrange
curl -i -L -X DELETE \
-H 'Content-Type: application/json' \
-d '{"action": "delete-listrange", "value": {"objnames": ["o1", "o2"]}}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&keep_bck_md=<value>'
Example: evict-listrange
curl -i -L -X DELETE \
-H 'Content-Type: application/json' \
-d '{"action": "evict-listrange", "value": {"template": "prefix{001..100}"}}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&keep_bck_md=<value>'
Parameters
provider | String | Backend provider type (ais, s3, gcp, azure, etc.) |
namespace | String | Namespace for remote buckets and cross-cluster operations |
keep_bck_md | Boolean | Keep bucket metadata when evicting remote bucket data |
Return type
Object
HTTP request headers
- Content-Type: Not defined
- Accept: /
httpbckget
Object httpbckget(provider, namespace)
List buckets or list objects within a bucket
Example: Get buckets
curl -i -L -X GET \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>'
Parameters
Name | Type | Description |
---|---|---|
provider | String | Backend provider type (ais, s3, gcp, azure, etc.) |
namespace | String | Namespace for remote buckets and cross-cluster operations |
Return type
Object
HTTP request headers
- Content-Type: Not defined
- Accept: /
httpbckhead
Object httpbckhead(presence, bsumm_remote, dont_add_remote_bck_md)
Get bucket metadata and properties with additional preparsing step to support api.GetBucketInfo prefix (e.g. 'ais ls ais://nnn --summary --prefix=aaa/bbb')
Example: Head buckets
curl -i -L -X HEAD \
'AIS_ENDPOINT/v1/buckets/{bucket-name}/?presence=<value>&bsumm_remote=<value>&dont_add_remote_bck_md=<value>'
Parameters
Name | Type | Description |
---|---|---|
presence | String | Filter bucket/object by presence state (FltExists, FltPresent, etc.) |
bsumm_remote | String | Include remote objects in bucket summary/info |
dont_add_remote_bck_md | Boolean | Don't add remote bucket to cluster BMD |
Return type
Object
HTTP request headers
- Content-Type: Not defined
- Accept: /
httpbckpatch
Object httpbckpatch(provider, namespace)
Update bucket properties and settings
Example: Patch buckets
curl -i -L -X PATCH \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>'
Parameters
Name | Type | Description |
---|---|---|
provider | String | Backend provider type (ais, s3, gcp, azure, etc.) |
namespace | String | Namespace for remote buckets and cross-cluster operations |
Return type
Object
HTTP request headers
- Content-Type: Not defined
- Accept: /
httpbckpost
Object httpbckpost(request, provider, namespace, bck_to, dont_head_remote_bck)
Perform bucket operations: move, copy, ETL transform, prefetch, make copies, EC encode, and add remote buckets
Supported actions: move-bck, copy-bck, etl-bck, copy-listrange, etl-listrange, add-remote-bck, prefetch-listrange, make-n-copies, ec-encode
Example: move-bck
curl -i -L -X POST \
-H 'Content-Type: application/json' \
-d '{"action": "move-bck"}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&bck_to=<value>&dont_head_remote_bck=<value>'
Example: copy-bck
curl -i -L -X POST \
-H 'Content-Type: application/json' \
-d '{"action": "copy-bck", "value": {"dry_run": false, "force": false}}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&bck_to=<value>&dont_head_remote_bck=<value>'
Example: etl-bck
curl -i -L -X POST \
-H 'Content-Type: application/json' \
-d '{"action": "etl-bck", "value": {"id": "ETL_NAME"}}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&bck_to=<value>&dont_head_remote_bck=<value>'
Example: copy-listrange
curl -i -L -X POST \
-H 'Content-Type: application/json' \
-d '{"action": "copy-objects", "value": {"to_bck": {"name": "destination-bucket", "provider": "ais"}, "template": "prefix{001..100}"}}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&bck_to=<value>&dont_head_remote_bck=<value>'
Example: etl-listrange
curl -i -L -X POST \
-H 'Content-Type: application/json' \
-d '{"action": "etl-objects", "value": {"to_bck": {"name": "destination-bucket", "provider": "ais"}, "transform": {"name": "ETL_NAME"}, "template": "prefix{001..100}"}}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&bck_to=<value>&dont_head_remote_bck=<value>'
Example: add-remote-bck
curl -i -L -X POST \
-H 'Content-Type: application/json' \
-d '{"action": "add-remote-bck"}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&bck_to=<value>&dont_head_remote_bck=<value>'
Example: prefetch-listrange
curl -i -L -X POST \
-H 'Content-Type: application/json' \
-d '{"action": "prefetch-objects", "value": {"template": "shard-{001..999}.tar"}}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&bck_to=<value>&dont_head_remote_bck=<value>'
Example: make-n-copies
curl -i -L -X POST \
-H 'Content-Type: application/json' \
-d '{"action": "make-n-copies", "value": {"copies": 2}}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&bck_to=<value>&dont_head_remote_bck=<value>'
Example: ec-encode
curl -i -L -X POST \
-H 'Content-Type: application/json' \
-d '{"action": "ec-encode"}' \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>&bck_to=<value>&dont_head_remote_bck=<value>'
Parameters
provider | String | Backend provider type (ais, s3, gcp, azure, etc.) |
namespace | String | Namespace for remote buckets and cross-cluster operations |
bck_to | String | Destination bucket for copy/move operations |
dont_head_remote_bck | Boolean | Add remote bucket without HEAD request validation |
Return type
Object
HTTP request headers
- Content-Type: Not defined
- Accept: /
httpbckput
Object httpbckput(provider, namespace)
Perform actions on a bucket (like archiving)
Example: Put buckets
curl -i -L -X PUT \
'AIS_ENDPOINT/v1/buckets/{bucket-name}?provider=<value>&namespace=<value>'
Parameters
Name | Type | Description |
---|---|---|
provider | String | Backend provider type (ais, s3, gcp, azure, etc.) |
namespace | String | Namespace for remote buckets and cross-cluster operations |
Return type
Object
HTTP request headers
- Content-Type: Not defined
- Accept: /