HeadContainer
    • PDF

    HeadContainer

    • PDF

    Article Summary

    개요

    컨테이너(버킷)의 메타데이터를 조회합니다.

    구문

    HEAD https://{endpoint}/swift/v1/{containerName}
    

    요청

    요청 헤더

    헤더명설명
    x-ncp-apigw-timestamp- 1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(millisecond)로 나타낸 것
    - APIGW 서버와 시간차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주
    x-ncp-iam-access-key네이버 클라우드 플랫폼에서 발급받은 API Key 또는 Sub Account에서 발급받은 AccessKey
    x-ncp-apigw-signature-v2- 위 예제의 Body를 AccessKey와 맵핑되는 SecretKey로 암호화한 서명
    - HMAC 암호화 알고리즘은 HmacSHA256 사용
    x-ncp-region_code다른 클라우드에서 네이버 클라우드로 이관할 데이터의 버킷이 존재하는 region code

    요청 파라미터

    파라미터명필수여부타입제약사항설명
    ContainerName-string-조회할 컨테이너 명

    응답

    응답 헤더

    NameInTypeDescription
    X-Container-Meta-nameheaderstring- 해당 컨테이너(버킷)의 메타데이터 정보
    - 헤더명의 name 부분이 메타데이터의 키 역할을 함
    Content-Lengthheaderstring응답 결과의 길이 (Bytes)
    X-Container-Object-Countheaderinteger해당 컨테이너(버킷)의 오브젝트 개수
    X-Container-Bytes-Usedheaderinteger해당 컨테이너(버킷)가 사용하는 전체 용량 크기 (Bytes)
    X-Container-Meta-Temp-URL-Key (Optional)headerstringtemporary URL을 위한 Secret Key 값
    X-Container-Meta-Temp-URL-Key-2 (Optional)headerstringtemporary URL을 위한 두 번째 Secret Key 값
    X-Container-Meta-Quota-Count (Optional)headerstring해당 컨테이너(버킷)의 오브젝트 수의 제한 값
    X-Container-Meta-Quota-Bytes (Optional)headerstring해당 컨테이너(버킷)의 용량 제한 값
    X-Storage-Policy (Optional)headerinteger해당 컨테이너(버킷)의 storage policy 값
    X-Container-Read (Optional)headerinteger해당 컨테이너(버킷)의 READ ACL
    X-Container-Write (Optional)headerinteger해당 컨테이너(버킷)의 WRITE ACL
    X-Timestampheaderinteger해당 컨테이너(버킷)가 생성된 시각 (UNIX Time)
    X-Trans-Idheaderstring해당 요청의 트랜젝션 ID
    X-Openstack-Request-Idheaderstring해당 요청의 트랜젝션 ID (X-Trans-Id와 동일)
    Content-Typeheaderstring응답 결과의 포맷
    Dateheaderstring해당 요청의 응답 시간 (UTC)

    예시

    요청 예시(JSON)

    curl -X HEAD "https://archivestorage.apigw.ntruss.com/swift/v1/{containerName}" -H "accept: application/json" -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}"
    

    응답 예시

    HTTP/1.1 200 OK
    Accept: application/json
    connection: keep-alive
    Content-Length: 2577
    Keep-alive: timeout=60
    X-Container-Bytes-Used: 786133
    X-Container-Object-Count: 1
    X-Timestamp: 1634538594.09393
    Content-Type: application/json; charset=utf-8
    X-Trans-Id: tx274a77a8975c4a66aeb24-0052d95365
    X-Openstack-Request-Id: tx274a77a8975c4a66aeb24-0052d95365
    Date: Mon, 18 Apr 2022 11:07:18 GMT
    

    요청 성공 시, 해당 컨테이너에 대한 메타데이터가 반환됩니다.


    이 문서가 도움이 되었습니까?

    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.