Method | URI | Description |
---|---|---|
POST | /v1/{account} | Creates, updates, or deletes account metadata. |
To create, update, or delete metadata, use the
X-Account-Meta-{name}
header, where
{name}
is the name of the metadata
item.
Subsequent requests for the same key and value pair overwrite the previous value.
To delete a metadata header, send an empty value for
that particular header, such as for the
X-Account-Meta-Book
header. If the
tool you use to communicate with Object Storage, such
as an older version of cURL, does not support empty
headers, send the
X-Remove-Account-Meta-{name}
:
arbitrary value
header.
For example, X-Remove-Account-Meta-Book:
x
. The operation ignores the arbitrary
value.
If the container already has other custom metadata items, a request to create, update, or delete metadata does not affect those items.
This operation does not accept a request body.
Example requests and responses:
Create account metadata:
curl -i $publicURL -X POST -H "X-Auth-Token: $token" -H "X-Account-Meta-Book: MobyDick" -H "X-Account-Meta-Subject: Literature"
HTTP/1.1 204 No Content Content-Length: 0 Content-Type: text/html; charset=UTF-8 X-Trans-Id: tx8c2dd6aee35442a4a5646-0052d954fb Date: Fri, 17 Jan 2014 16:06:19 GMT
Update account metadata:
curl -i $publicURL -X POST -H "X-Auth-Token: $token" -H "X-Account-Meta-Subject: AmericanLiterature"
HTTP/1.1 204 No Content Content-Length: 0 Content-Type: text/html; charset=UTF-8 X-Trans-Id: tx1439b96137364ab581156-0052d95532 Date: Fri, 17 Jan 2014 16:07:14 GMT
Delete account metadata:
curl -i $publicURL -X POST -H "X-Auth-Token: $token" -H "X-Remove-Account-Meta-Subject: x"
HTTP/1.1 204 No Content Content-Length: 0 Content-Type: text/html; charset=UTF-8 X-Trans-Id: tx411cf57701424da99948a-0052d9556f Date: Fri, 17 Jan 2014 16:08:15 GMT
For a complete description of HTTP 1.1 header definitions, see Header Field Definitions.
If the request succeeds, the operation returns the 204 status code.
To confirm your changes, issue a show account metadata request.
Normal response codes: 204
This table shows the header parameters for the create, update, or delete account metadata request:
Name | Type | Description |
---|---|---|
| String (Required) | Authentication token. |
| String (Optional) | The secret key value for temporary URLs. |
| String (Optional) | A second secret key value for temporary URLs. The second key enables you to rotate keys by having an old and new key active at the same time. |
| String (Optional) | The account metadata. The You must specify a |
| String (Optional) | Changes the MIME type for the object. |
| Boolean (Optional) | If set to |
This table shows the URI parameters for the create, update, or delete account metadata request:
Name | Type | Description |
---|---|---|
| String | The unique name for the account. An account is also known as the project or tenant. |
This table shows the header parameters for the create, update, or delete account metadata response:
Name | Type | Description |
---|---|---|
| String (Required) | If the operation succeeds, this value is zero (0). If the operation fails, this value is the length of the error text in the response body. |
| String (Required) | If the operation fails, this value is the MIME type of the error text in the response body. |
| Uuid (Required) | A unique transaction identifier for this request. Your service provider might need this value if you report a problem. |
| Datetime (Required) | The transaction date and time. |