Update container metadata POST /v1/{account}/{container}
Creates, updates or deletes custom container metadata items
Specify the X-Container-Meta-{name} header to create, update, or delete a metadata item. where {name} is its name. {name} is the name of the metadata item.
If a specified {name} matches the name of an existing metadata item, then it will be overwritten.
To delete a metadata item, either issue a request with an empty value in the header or specify the "X-Remove-Container-Meta-{name}: anyvalue" header. For example, "X-Remove-Container-Meta-Book: x" - in this case, the anyvalue section will be ignored.
Existing metadata items not specified using this API will remain unchanged.
Upon successful completion, the 204 status code will be returned.
After updating, perform a container metadata retrieval request to check if the changes took effect.
Request headers
X-Auth-Token
Authentication token
Data Type | Cardinality |
---|---|
String | 1..1 |
X-Container-Read
Sets the read permissions ACL. Refer to Read Permissions for details.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Remove-Container-name
X-Remove-Container-Meta-name
Deletes the {name} metadata item.
For example, if "X-Remove-Container-Read" is specified, the "X-Container-Read" metadata item will be deleted.
For custom metadata, if "X-Remove-Container-Meta-Book" is specified, the "X- Remove-Container-Meta-Book" metadata item will be deleted.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Container-Write
Sets the write permissions ACL. Refer to Write Permissions for details.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Versions-Location
Enables versioning of objects in a container. The name of another container that has been URL-encoded in UTF-8 format must be specified. To disable versioning, leave the value empty.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Remove-Versions-Location
Disables versioning.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Container-Meta-name
Container metadata. {name} is the name of the metadata item.
Data Type | Cardinality |
---|---|
String | 0..* |
X-Container-Meta-Web-Index
Sets the object name of the Index file. For example, when index.html is set, the index page will become /{container}/index.html.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Container-Meta-Web-Error
Sets the object name of error page files. For example, if error.html is set, 401 errors will become /{container}/401error.html, and 404 errors will become /{container}/404error.html objects.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Container-Meta-Web-Listing
When "TRUE" is set, directory list display becomes enabled. For security purposes, this item should not normally be enabled.
Data Type | Cardinality |
---|---|
Boolean | 0..1 |
X-Container-Meta-Web-Listing-CSS
Sets an object name of the style sheet for displaying directory lists. For example, if lists.css is set, the /{container}/lists.css object will be used as the style sheet.
Data Type | Cardinality |
---|---|
String | 0..1 |
Request Parameter
{account}
Name uniquely assigned by project
Data Type | Cardinality |
---|---|
String | 1..1 |
{container}
Container name
Data Type | Cardinality |
---|---|
String | 1..1 |
Response Headers
Content-Length
Number of bytes of the response body
Data Type | Cardinality |
---|---|
String | 1..1 |
Content-Type
MIME type of the response body
Data Type | Cardinality |
---|---|
String | 1..1 |
X-Trans-Id
ID assigned to this request. This is used when inquiring about issues.
Data Type | Cardinality |
---|---|
Uuid | 1..1 |
Date
Datetime when the transaction was executed
Data Type | Cardinality |
---|---|
Datetime | 1..1 |
Response Elements
None.
Create container metadata:
Example of Request
curl -i $publicURL/marktwain -X POST -H "X-Auth-Token: $token" -H "X-Container-Meta-Author: MarkTwain" -H "X-Container-Meta-Century: Nineteenth"
Example of Response
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx05dbd434c651429193139-0052d82635
Date: Thu, 16 Jan 2014 18:34:29 GMT
Update container metadata:
Example of Request
curl -i $publicURL/marktwain -X POST -H "X-Auth-Token: $token" -H "X-Container-Meta-Author: SamuelClemens"
Example of Response
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txe60c7314bf614bb39dfe4-0052d82653
Date: Thu, 16 Jan 2014 18:34:59 GMT
Delete container metadata:
Example of Request
curl -i $publicURL/marktwain -X POST -H "X-Auth-Token: $token" -H "X-Remove-Container-Meta-Century: x"
Example of Response
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx7997e18da2a34a9e84ceb-0052d826d0
Date: Thu, 16 Jan 2014 18:37:04 GMT