A newer release of this product is available.
Protocols S3 services svm.uuid buckets endpoint overview
Contributors
Suggest changes
Overview
An S3 bucket is a container of objects. Each bucket defines an object namespace. S3 server requests specify objects using a bucket-name and object-name pair. An object consists of data, along with optional metadata and access controls, accessible via a name. An object resides within a bucket. There can be more than one bucket in an S3 server. Buckets which are created for the server are associated with an S3 user that is created on the S3 server.
Examples
Retrieving all fields for all S3 buckets of an SVM
# The API: /api/protocols/s3/services/{svm.uuid}/buckets # The call: curl -X GET "https://10.140.117.223/api/protocols/s3/services/12f3ba4c-7ae0-11e9-8c06-0050568ea123/buckets?fields=*&return_records=true" -H "accept: application/json" # The response: { "records": [ { "svm": { "uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123", "name": "vs1" }, "uuid": "527812ab-7c6d-11e9-97e8-0050568ea123", "name": "bucket-2", "volume": { "name": "fg_oss_1558514455", "uuid": "51276f5f-7c6d-11e9-97e8-0050568ea123" }, "size": 209715200, "logical_used_size": 157286400, "encryption": { "enabled": false }, "comment": "S3 bucket." }, { "svm": { "uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123", "name": "vs1" }, "uuid": "a8234aec-7e06-11e9-97e8-0050568ea123", "name": "bucket-1", "volume": { "name": "fg_oss_1558690256", "uuid": "a36a1ea7-7e06-11e9-97e8-0050568ea123" }, "size": 1677721600, "logical_used_size": 0, "encryption": { "enabled": false }, "comment": "bucket1" } ], "num_records": 2 }
Retrieving the specified bucket associated with an SVM
# The API: /api/protocols/s3/services/{svm.uuid}/buckets/{uuid} # The call: curl -X GET "https://10.140.117.223/api/protocols/s3/services/12f3ba4c-7ae0-11e9-8c06-0050568ea123/buckets/527812ab-7c6d-11e9-97e8-0050568ea123" -H "accept: application/json" # The response: { "svm": { "uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123", "name": "vs1" }, "uuid": "527812ab-7c6d-11e9-97e8-0050568ea123", "name": "bucket-2", "volume": { "name": "fg_oss_1558514455", "uuid": "51276f5f-7c6d-11e9-97e8-0050568ea123" }, "size": 209715200, "logical_used_size": 157286400, "encryption": { "enabled": false }, "comment": "S3 bucket." }
Creating an S3 bucket for an SVM
# The API: /api/protocols/s3/services/{svm.uuid}/buckets # The call: curl -iku admin:netapp1! -X POST "https://10.140.117.223/api/protocols/s3/services/12f3ba4c-7ae0-11e9-8c06-0050568ea123/buckets?return_records=true" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"aggregates\": [ { \"name\": \"aggr5\", \"uuid\": \"12f3ba4c-7ae0-11e9-8c06-0050568ea123\" } ], \"comment\": \"S3 bucket.\", \"constituents_per_aggregate\": 1, \"name\": \"bucket-3\"}" # The response: HTTP/1.1 202 Accepted Date: Fri, 24 May 2019 11:22:14 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Location: /api/protocols/s3/services/12f3ba4c-7ae0-11e9-8c06-0050568ea123/buckets/?name=bucket-3 Content-Length: 353 Content-Type: application/json { "num_records": 1, "records": [ { "name": "bucket-3", "comment": "S3 bucket." } ], "job": { "uuid": "2e880171-7e16-11e9-bfdc-0050568ea123", "_links": { "self": { "href": "/api/cluster/jobs/2e880171-7e16-11e9-bfdc-0050568ea123" } } } }
Updating an S3 bucket for an SVM
# The API: /api/protocols/s3/services/{svm.uuid}/buckets/{uuid} # The call: curl -X PATCH "https://10.140.117.223/api/protocols/s3/services/12f3ba4c-7ae0-11e9-8c06-0050568ea123/buckets/754389d0-7e13-11e9-bfdc-0050568ea122" -H "accept: application/json?return_records=true" -H "Content-Type: application/json" -d "{ \"comment\": \"Bucket modified.\", \"size\": 111111111111}" # The response: HTTP/1.1 202 Accepted Date: Fri, 24 May 2019 11:32:27 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Content-Length: 189 Content-Type: application/json { "job": { "uuid": "9beafabb-7e17-11e9-bfdc-0050568ea123", "_links": { "self": { "href": "/api/cluster/jobs/9beafabb-7e17-11e9-bfdc-0050568ea123" } } } }
Deleting an S3 bucket for a specified SVM
# The API: /api/protocols/s3/services/{svm.uuid}/buckets/{uuid} # The call: curl -iku admin:netapp1! -X DELETE "https://10.140.117.223/api/protocols/s3/services/12f3ba4c-7ae0-11e9-8c06-0050568ea123/buckets/754389d0-7e13-11e9-bfdc-0050568ea123?return_records=true" -H "accept: application/json" # The response: HTTP/1.1 202 Accepted Date: Fri, 24 May 2019 11:40:17 GMT Server: libzapid-httpd X-Content-Type-Options: nosniff Cache-Control: no-cache,no-store,must-revalidate Content-Length: 189 Content-Type: application/json { "job": { "uuid": "b3af4a54-7e18-11e9-bfdc-0050568ea123", "_links": { "self": { "href": "/api/cluster/jobs/b3af4a54-7e18-11e9-bfdc-0050568ea123" } } } }