PostContainer
    • PDF

    PostContainer

    • PDF

    Article Summary

    Overview

    Sets and updates metadata of a container (bucket).

    Syntax

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

    Request

    NameInTypeDescription
    project_idpathstringProject ID
    containerpathstringContainer (bucket) name
    X-Auth-Token (Optional)headerstringToken
    X-Container-Read (Optional)headerstringREAD ACL of the container
    X-Container-Write (Optional)headerstringWRITE ACL of the container
    X-Container-Sync-Key (Optional)headerstringNot supported
    X-Container-Sync-To (Optional)headerstringNot supported
    X-Versions-Location (Optional)headerstringNot supported
    X-History-Location (Optional)headerstringNot supported
    X-Remove-Versions-Location (Optional)headerstringNot supported
    X-Remove-History-Location (Optional)headerstringNot supported
    X-Container-Meta-name (Optional)headerstringSets metadata of the container (bucket). The name part in the header name functions as a key of the metadata.
    X-Remove-Container-name (Optional)headerstringDeletes metadata of the container (bucket). The name part in the header name functions as a key of the metadata. X-Remove-Container-Read or X-Remove-Container-Meta-name
    X-Container-Meta-Access-Control-Allow-Origin (Optional)headerstringCORS
    X-Container-Meta-Access-Control-Max-Age (Optional)headerstringCORS
    X-Container-Meta-Access-Control-Expose-Headers (Optional)headerstringCORS
    X-Container-Meta-Quota-Bytes (Optional)headerstringStorage limit of the container (bucket) in bytes. The container (bucket) usage is limited if the storage limit is exceeded.
    X-Container-Meta-Quota-Count (Optional)headerstringMaximum number of objects in the container (bucket)
    X-Container-Meta-Temp-URL-Key (Optional)headerstringSecret key for the temporary URL
    X-Container-Meta-Temp-URL-Key-2 (Optional)headerstringSecond secret key for the temporary URL

    Response

    NameInTypeDescription
    DateheaderstringResponse time of the request (in UTC)
    Content-LengthheaderstringLength of the response result (in bytes)
    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 container metadata)

    curl -i -X POST -H "X-Container-Meta-Book: ncloud-book" -H "X-Container-Meta-Subject: ncloud-test-subject" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}
    

    Response example

    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
    

    Request example (Update container metadata)

    curl -i -X POST -H "X-Container-Meta-Book: ncloud-book2" -H "X-Container-Meta-Subject: ncloud-test-subject2" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}
    

    Response example

    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
    

    Request example (Delete container metadata)

    curl -i -X POST -H "X-Remove-Container-Meta-Book: x" -H "X-Remove-Container-Meta-Subject: x" -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}
    

    Response example

    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
    

    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.