PostContainer
- Print
- PDF
PostContainer
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Overview
Sets and updates metadata of a container (bucket).
Syntax
POST /v1/AUTH_{project_id}/{container}
Request
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID |
container | path | string | Container (bucket) name |
X-Auth-Token (Optional) | header | string | Token |
X-Container-Read (Optional) | header | string | READ ACL of the container |
X-Container-Write (Optional) | header | string | WRITE ACL of the container |
X-Container-Sync-Key (Optional) | header | string | Not supported |
X-Container-Sync-To (Optional) | header | string | Not supported |
X-Versions-Location (Optional) | header | string | Not supported |
X-History-Location (Optional) | header | string | Not supported |
X-Remove-Versions-Location (Optional) | header | string | Not supported |
X-Remove-History-Location (Optional) | header | string | Not supported |
X-Container-Meta-name (Optional) | header | string | Sets metadata of the container (bucket). The name part in the header name functions as a key of the metadata. |
X-Remove-Container-name (Optional) | header | string | Deletes metadata of the container (bucket). The name part in the header name functions as a key of the metadata. X-Remove-Container-Read or X-Remove-Container-Meta-name |
X-Container-Meta-Access-Control-Allow-Origin (Optional) | header | string | CORS |
X-Container-Meta-Access-Control-Max-Age (Optional) | header | string | CORS |
X-Container-Meta-Access-Control-Expose-Headers (Optional) | header | string | CORS |
X-Container-Meta-Quota-Bytes (Optional) | header | string | Storage limit of the container (bucket) in bytes. The container (bucket) usage is limited if the storage limit is exceeded. |
X-Container-Meta-Quota-Count (Optional) | header | string | Maximum number of objects in the container (bucket) |
X-Container-Meta-Temp-URL-Key (Optional) | header | string | Secret key for the temporary URL |
X-Container-Meta-Temp-URL-Key-2 (Optional) | header | string | Second secret key for the temporary URL |
Response
Name | In | Type | Description |
---|---|---|---|
Date | header | string | Response time of the request (in UTC) |
Content-Length | header | string | Length of the response result (in bytes) |
Content-Type (Optional) | header | string | MIME type of the response result |
X-Trans-Id | header | string | Transaction ID of the request |
X-Openstack-Request-Id | header | string | Transaction ID of the request (same as X-Trans-Id) |
Examples
Request example (Create container metadata)
curl -i -X POST -H "X-Container-Meta-Book: ncloud-book" -H "X-Container-Meta-Subject: ncloud-test-subject" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}
Response example
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txefe14b178c56469b8576f-005b987d66
X-Openstack-Request-Id: txefe14b178c56469b8576f-005b987d66
Date: Wed, 12 Sep 2018 02:43:50 GMT
Request example (Update container metadata)
curl -i -X POST -H "X-Container-Meta-Book: ncloud-book2" -H "X-Container-Meta-Subject: ncloud-test-subject2" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}
Response example
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx66932a917b854a458544a-005b987d78
X-Openstack-Request-Id: tx66932a917b854a458544a-005b987d78
Date: Wed, 12 Sep 2018 02:44:08 GMT
Request example (Delete container metadata)
curl -i -X POST -H "X-Remove-Container-Meta-Book: x" -H "X-Remove-Container-Meta-Subject: x" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}
Response example
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx590d9493661147e780d99-005b987df5
X-Openstack-Request-Id: tx590d9493661147e780d99-005b987df5
Date: Wed, 12 Sep 2018 02:46:13 GMT
It returns No Content (204) status code if successful.
Was this article helpful?