- Print
- PDF
PostAccount
- Print
- PDF
The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.
Overview
Sets and updates metadata of an account.
Syntax
POST /v1/AUTH_{project_id}
You can delete metadata by entering an empty value in the metadata header, but some tools may not allow empty values in headers.
In this case, use X-Remove-Account-Meta-name
, instead of X-Account-Meta-name
.
Request header | Result |
---|---|
When the request header only has a key with no account metadata, and the account already has a key | The API request deletes the metadata. |
When the request header only has a key with no account metadata, and the account does not have a key | The API request ignores the metadata key. |
When the request header has both account metadata’s key and value, and the account already has a key | The API request updates the metadata. |
When the request header has both account metadata’s key and value, and the account does not have a key | The API request adds the metadata. |
When the request header has not account metadata, and the account already has metadata | The API request does not update the existing metadata. |
A metadata key is not case sensitive, and can contain ASCII 7-bit characters. (excluding ASCII 0-31 characters, DEL character, etc.) The underscore (_) is replaced by the hyphen (-).
For more information, refer to HTTP/1.1
A metadata value must be encoded with UTF-8 and then with URL encoding, according to the HTTP/1.1 rules.
Request
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID |
X-Auth-Token (Optional) | header | string | Token |
X-Account-Meta-Temp-URL-Key (Optional) | header | string | Secret key for the temporary URL |
X-Account-Meta-Temp-URL-Key-2 (Optional) | header | string | Second secret key for the temporary URL |
X-Account-Meta-name (Optional) | header | string | Account metadata. The name part in the header name functions as a key of the metadata. |
X-Remove-Account-name (Optional) | header | string | Deletes account metadata. The name part in the header name functions as a key of the metadata. |
Response
Name | In | Type | Description |
---|---|---|---|
Date | header | string | Response time of the request (in UTC) |
Content-Length | header | string | Length of the response result. It is 0 if the request was successful, because it has no content in the response body. |
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 metadata)
curl -i -X POST -H "X-Auth-Token: $token" -H "X-Account-Meta-Book: ncloud-test-book" -H "X-Account-Meta-Subject: ncloud-test-subject" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}
Response example
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txad3702ae436640d1a9897-005b975c51
X-Openstack-Request-Id: txad3702ae436640d1a9897-005b975c51
Date: Tue, 11 Sep 2018 06:10:25 GMT
Request example (Update metadata)
curl -i -X POST -H "X-Auth-Token: $token" -H "X-Account-Meta-Subject: ncloud-test-sconedSubject" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}
Response example
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txc5a65e1d20074023912c6-005b975c97
X-Openstack-Request-Id: txc5a65e1d20074023912c6-005b975c97
Date: Tue, 11 Sep 2018 06:11:35 GMT
Request example (Delete metadata)
curl -i -X POST -H "X-Auth-Token: $token" -H "X-Remove-Account-Meta-Subject: x" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}
Response example
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txf2874df785bd470eaf3b8-005b975d40
X-Openstack-Request-Id: txf2874df785bd470eaf3b8-005b975d40
Date: Tue, 11 Sep 2018 06:14:24 GMT
It returns No Content (204) status code if successful.