Update object metadata POST /v1/{account}/{container}/{object}
Creates or updates object metadata
Use the X-Object-Meta-{name} header to create or update custom metadata items. Specify the name of custom metadata item in {name}.
Previously assigned custom metadata items will be deleted. It will be necessary to use a POST request to re-create custom metadata items.
The system metadata will not be updated.
However, updating is possible using the following headers: Content-Type, Content-Encoding, Content-Disposition, and X-Delete-At. Unless these are specified as a request header, the metadata will not be changed.
Normal response codes: 202
Request headers
X-Auth-Token
Authentication token.
Data Type | Cardinality |
---|---|
String | 1..1 |
X-Object-Meta-name
Container metadata. {name} is the name of the metadata.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Delete-At
Specify the date on which an object should be deleted in UNIX Epoch timestamp format.
Data Type | Cardinality |
---|---|
Int | 0..1 |
Content-Disposition
Sets the browser behavior.
Refer to "http://www.ietf.org/rfc/rfc2183.txt" for details on the value to set.
Data Type | Cardinality |
---|---|
String | 0..1 |
Content-Encoding
Specify the Content-Encoding metadata.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Delete-After
Specify the time that should elapse until the object is deleted.
The Object Storage system holds this value as "X-Delete-At" metadata
Data Type | Cardinality |
---|---|
Int | 0..1 |
Content-Type
Change the MIME type of an object.
Data Type | Cardinality |
---|---|
String | 0..1 |
X-Detect-Content-Type
Specify automatic detection of the Content-Type of an object.
When "True" is specified for this header, the value specified in the Content-Type header will be ignored, and the content type will be inferred from the file extension.
Data Type | Cardinality |
---|---|
Boolean | 0..1 |
Request Parameter
{account}
Unique name of the account. An "account" is also referred to as a "project" or "tenant".
Data Type | Cardinality |
---|---|
String | 1..1 |
{container}
Unique name of the container.
Data Type | Cardinality |
---|---|
String | 1..1 |
{object}
Unique name of the object.
Data Type | Cardinality |
---|---|
String | 1..1 |
Response Headers
Content-Length
When the operation is successful, this value will be 0. When the operation fails, this value will be the length of the error text stored in the response body.
Data Type | Cardinality |
---|---|
String | 1..1 |
Content-Type
MIME type of the object.
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 information of a transaction.
Data Type | Cardinality |
---|---|
Datetime | 1..1 |
Response Elements
The HTML content indicating that the metadata was created is returned.
Create object metadata
Example of Request
curl -i $publicURL/marktwain/goodbye -X POST -H "X-Auth-Token:$token" -H "X-Object-Meta-Book: GoodbyeColumbus"
Example of Response
HTTP/1.1 202 Accepted
Content-Length: 76
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txb5fb5c91ba1f4f37bb648-0052d84b3f
Date: Thu, 16 Jan 2014 21:12:31 GMT
<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>
Update object metadata
Example of Request
curl -i $publicURL/marktwain/goodbye -X POST -H "X-Auth-Token:$token" -H "X-Object-Meta-Book: GoodbyeOldFriend"
Example of Response
HTTP/1.1 202 Accepted
Content-Length: 76
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx5ec7ab81cdb34ced887c8-0052d84ca4
Date: Thu, 16 Jan 2014 21:18:28 GMT
<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>