PostContainer
    • PDF

    PostContainer

    • PDF

    Article summary

    Available in Classic and VPC

    Set or change metadata on a container (bucket).

    Note

    Sub accounts can use it through the external API Gateway dedicated to sub accounts.
    For more information, see the PostContainer API of Sub Account.

    Requests

    The following describes the request format for the endpoint. The request format is as follows.

    MethodURI
    POST/v1/AUTH_{project_id}/{container}

    Request headers

    The following describes the headers.

    FieldTypeRequiredDescription
    X-Auth-TokenStringOptionalValue of the issued token
    X-Container-ReadStringOptionalREAD ACL (access permissions) of the container (bucket)
    X-Container-WriteStringOptionalWRITE ACL (access permissions) of the container (bucket)
    X-Container-Sync-KeyStringOptionalNot used
    X-Container-Sync-ToStringOptionalNot used
    X-Versions-LocationStringOptionalNot used
    X-History-LocationStringOptionalNot used
    X-Remove-Versions-LocationStringOptionalNot used
    X-Remove-History-LocationStringOptionalNot used
    X-Container-Meta-nameStringOptionalMetadata for the container (bucket)
    • The name part of the header name acts as a key for metadata
    • It can be added, updated, or deleted, with deletion requested as an empty value
    X-Remove-Container-Meta-nameStringOptionalDelete metadata for the container (bucket)
    • The name part of the header name acts as a key for metadata
    • X-Remove-Container-Read or X-Remove-Container-Meta-name
    X-Container-Meta-Access-Control-Allow-OriginStringOptionalCORS setting
    • Accessible source domain
    X-Container-Meta-Access-Control-Max-AgeStringOptionalCORS setting (in seconds)
    • Maximum time to cache results
    X-Container-Meta-Access-Control-Expose-HeadersStringOptionalCORS setting
    • Header that is not visible but allows access
    X-Container-Meta-Quota-BytesStringOptionalCapacity limit of the container (bucket)
    X-Container-Meta-Quota-CountStringOptionalLimit for number of objects in the container (bucket)
    X-Container-Meta-Temp-URL-KeyStringOptionalSecret key value for the temporary URL
    X-Container-Meta-Temp-URL-Key-2StringOptionalSecond secret key value for the temporary URL

    Request path parameters

    The following describes the parameters.

    FieldTypeRequiredDescription
    project_idStringRequiredProject ID
    containerStringRequiredName of the container (bucket) to set or edit

    Request example

    The following is a sample request.

    Request container metadata creation

    The following is a sample request of creating metadata of a container.

    curl -X POST "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}" 
    -H "X-Auth-Token: $token"
    -H "X-Container-Meta-{name}: $container-metadata-string"
    

    Request container metadata update

    The following is a sample request of updating metadata of a container.

    curl -X POST "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}" 
    -H "X-Auth-Token: $token"
    -H "X-Container-Meta-{name}: $container-metadata-string"
    

    Request container metadata deletion

    The following is a sample request of deleting metadata of a container.

    curl -X POST "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}" 
    -H "X-Auth-Token: $token"
    -H "X-Remove-Container-Meta-{name}: $container-metadata-string"
    

    Responses

    The following describes the response format.

    Response headers

    For response headers common to all Archive Storage APIs, see Archive Storage common response headers.

    Response example

    The following is a sample response.

    Response when requesting creation of container metadata

    The following is a sample response when requesting to create metadata for a container.

    HTTP/1.1 204 No Content
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: txefe14b178c56469b8576f-005b987d66
    X-Openstack-Request-Id: txefe14b178c56469b8576f-005b987d66
    Date: Wed, 12 Sep 2018 02:43:50 GMT
    

    Response when requesting update of container metadata

    The following is a sample response when requesting to update metadata for a container.

    HTTP/1.1 204 No Content
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx66932a917b854a458544a-005b987d78
    X-Openstack-Request-Id: tx66932a917b854a458544a-005b987d78
    Date: Wed, 12 Sep 2018 02:44:08 GMT
    

    Response when requesting deletion of container metadata

    The following is a sample response when requesting to delete metadata for a container.

    HTTP/1.1 204 No Content
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx590d9493661147e780d99-005b987df5
    X-Openstack-Request-Id: tx590d9493661147e780d99-005b987df5
    Date: Wed, 12 Sep 2018 02:46:13 GMT
    

    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.