MENU
      PostContainer

        PostContainer


        Article summary

        Available in Classic and VPC

        Set or change metadata on a container (bucket).

        Requests

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

        MethodURI
        POST/{containerName}

        Request headers

        The following describes the headers.

        FieldTypeRequiredDescription
        x-ncp-apigw-timestampStringRequiredTimestamp value
        • It indicates the elapsed time in milliseconds since January 1, 1970 00:00:00 UTC
        • Request is considered invalid if the timestamp differs from the current time by more than 5 minutes
        x-ncp-iam-access-keyStringRequiredAPI key issued by NAVER Cloud Platform or access key issued by Sub Account
        x-ncp-apigw-signature-v2StringRequiredSignature used to encrypt the body of the above example with the secret key that maps with the access key ID
        • Use the HMAC-SHA256 encryption algorithm
        x-ncp-region_codeStringRequiredRegion code of the container
        • <Example> Korea: KR | Singapore: SGN
        X-Container-Meta-Access-Control-Allow-OriginStringOptionalCORS setting
        • Accessible source domain
        X-Container-Meta-Access-Control-Max-AgeStringOptionalCORS setting
        • Maximum time to cache results (in seconds)
        X-Container-Meta-Access-Control-Expose-HeadersStringOptionalCORS setting
        • Header that is not visible but allows access

        Request path parameters

        The following describes the parameters.

        FieldTypeRequiredDescription
        containerNameStringRequiredName of the container (bucket) to set or edit

        Request example

        The following is a sample request.

        curl -X POST "https://archivestorage.apigw.ntruss.com/swift/v1/{containerName}" -H "accept: application/json" -H "X-Container-Meta-Access-Control-Allow-Origin: http://localhost" -H "x-ncp-region-code: {regionCode}"
        -H "x-ncp-iam-access-key: {AccessKey} "
        -H "x-ncp-apigw-timestamp: {current timestamp}"
        -H "x-ncp-apigw-signature-v2: {generated signature}"
        Curl

        Responses

        The following describes the response format.

        Response headers

        The following describes the headers.

        FieldTypeRequiredDescription
        ServerString-Response server
        DateString-Response time of the request (UTC)
        ConnectionString-TCP connection status between client and server
        X-Storage-PolicyInteger-Storage policy value for the container
        X-TimestampInteger-Creation time of the container (Unix timestamp)
        X-Container-Bytes-UsedInteger-Amount of capacity the container is using
        X-Trans-IdString-Transaction ID of the request
        X-Openstack-Request-IdString-Transaction ID of the request
        • Identical to X-Trans-Id
        X-Container-Object-CountInteger-Number of objects stored in the container
        X-Container-Meta-Access-Control-Allow-OriginString-CORS settings
        • Entered accessible domains
        Referrer-PolicyString-HTTP Referrer header handling method
        x-ncp-apigw-response-originString-Original source of the response
        x-ncp-trace-idString-ID for transaction tracking

        Response example

        The following is a sample response.

        HTTP/1.1 204 No Content
        Server: nginx
        Date: Tue, 16 Apr 2024 01:56:58 GMT
        Connection: keep-alive
        X-Storage-Policy: standard00
        X-Timestamp: 1711960998.26335
        X-Container-Bytes-Used: 0
        X-Openstack-Request-Id: txf770951820a44a91bc450-00661de4f8
        X-Container-Object-Count: 0
        X-Container-Meta-Access-Control-Allow-Origin: http://localhost
        X-Trans-Id: txf770951820a44a91bc450-00661de4f8
        Referrer-Policy: unsafe-url
        x-ncp-trace-id: 6cd9l6lj66d356cchgc4rjcc1o
        x-ncp-apigw-response-origin: ENDPOINT
        HTTP

        Was this article helpful?

        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.