Update account metadata POST /v1/{account}

Creates, updates or deletes account metadata items

Specify the X-Account-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-Account-Meta-{name}: anyvalue" header. For example, "X-Remove-Account-Meta-Book: x" - in this case, the arbitrary value section will be ignored.

Existing metadata items not specified using this API will remain unchanged.

The request body will not be accepted.

Upon successful completion, the 204 status code will be returned.

After updating, perform an account metadata retrieval request to check if the changes took effect.

Request headers

X-Auth-Token

Authentication token

Data Type Cardinality
String 1..1

X-Account-Meta-Temp-URL-Key

Secret key used for temporary URLs.

Data Type Cardinality
String 0..1

X-Account-Meta-Temp-URL-Key-2

Second secret key used for temporary URLs. By using two keys, key rotation is possible.

Data Type Cardinality
String 0..1

X-Account-Meta-name

Account metadata. In {name}, specify the name of the metadata item to be created, updated, or deleted. To delete an item, leave the value empty in the header.

Data Type Cardinality
String 0..*

Request Parameter

{account}

Name uniquely assigned by project

Data Type Cardinality
String 1..1

Response Headers

Content-Length

If the request was successful, this will be 0. If the request failed, this will be the size (in bytes) of the error text returned in the response body.

Data Type Cardinality
String 1..1

Content-Type

If the request failed, this will be the MIME type of the error text returned in 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 of request execution.

Data Type Cardinality
Datetime 1..1

Response Elements

None.

Create account metadata items

Example of Request


curl -i $publicURL -X POST -H "X-Auth-Token: $token" -H "X- Account-Meta-Book: MobyDick" -H "X-Account-Meta-Subject: Literature"     
     

Example of Response


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 items

Example of Request


curl -i $publicURL -X POST -H "X-Auth-Token: $token" -H "X-Account-Meta-Subject: AmericanLiterature"     
     

Example of Response


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 items

Example of Request


curl -i $publicURL -X POST -H "X-Auth-Token: $token" -H "X-Remove-Account-Meta-Subject: x"       
     

Example of Response


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