PostAccount
    • PDF

    PostAccount

    • PDF

    Article Summary

    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 headerResult
    When the request header only has a key with no account metadata, and the account already has a keyThe API request deletes the metadata.
    When the request header only has a key with no account metadata, and the account does not have a keyThe API request ignores the metadata key.
    When the request header has both account metadata’s key and value, and the account already has a keyThe API request updates the metadata.
    When the request header has both account metadata’s key and value, and the account does not have a keyThe API request adds the metadata.
    When the request header has not account metadata, and the account already has metadataThe 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

    NameInTypeDescription
    project_idpathstringProject ID
    X-Auth-Token (Optional)headerstringToken
    X-Account-Meta-Temp-URL-Key (Optional)headerstringSecret key for the temporary URL
    X-Account-Meta-Temp-URL-Key-2 (Optional)headerstringSecond secret key for the temporary URL
    X-Account-Meta-name (Optional)headerstringAccount metadata. The name part in the header name functions as a key of the metadata.
    X-Remove-Account-name (Optional)headerstringDeletes account metadata. The name part in the header name functions as a key of the metadata.

    Response

    NameInTypeDescription
    DateheaderstringResponse time of the request (in UTC)
    Content-LengthheaderstringLength of the response result. It is 0 if the request was successful, because it has no content in the response body.
    Content-Type (Optional)headerstringMIME type of the response result
    X-Trans-IdheaderstringTransaction ID of the request
    X-Openstack-Request-IdheaderstringTransaction 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.


    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.