iwinv Object Stroage API 가이드 - Object
Object (오브젝트)
세부내용은 아래 Swift API 문서를 참고하시기 바랍니다.
Swift API V1 https://docs.openstack.org/api-ref/object-store/
오브젝트 정보 조회
- 구문
 GET /v1/{Container}/{Object} 
 X-Auth-Token: {Token}
- 요청 헤더
 이 API는 요청 본문을 요구하지 않습니다.
 Range
 Description: To retrieve a subset of an object’s contents, you may specify a byte range. Type: String Required: No 
 If-Modified-SinseDescription: Only copies if modified since the date/time of the source object’s last_modified attribute. Type: Date Required: No 
 If-Unmodified-SinseDescription: Only copies if not modified since the date/time of the source object’s last_modified attribute. Type: Date Required: No 
 Copy-If-MatchDescription: Copies only if the ETag in the request matches the source object’s ETag. Type: ETag Required: No 
 Copy-If-None-MatchDescription: Copies only if the ETag in the request does not match the source object’s ETag. Type: ETag Required: No 
- 응답 헤더
 
오브젝트 생성 / 업데이트
컨테이너에 새로운 오브젝트를 생성(업로드) 하거나 이미 컨테이너내에 오브젝트가 있다면 해당 오브젝트의 내용이 수정됩니다.
- 구문
 PUT /v1/{Container}/{Object} 
 X-Auth-Token: {Token}
 Content-Type: {content-type}
- 요청 헤더
 이 API는 요청 본문을 요구하지 않습니다.
 ETag
 Description: 오브젝트 contents에 MD5 hash Type: String Required: No Content-Type
 Description: 오브젝트 Content-Type Type: String Required: No 
 Transfer-Encoding
 Description: Indicates whether the object is part of a larger aggregate object. Type: String 
 Valid Values: chunkedRequired: No 
- 응답 헤더
 이 API는 응답 본문을 반환하지 않습니다. 요청이 올바르면 상태 코드 201을 반환합니다.
 
멀티 파트 업로드
5G를 초과하는 용량을 가진 오브젝트는 5GB 이하의 세그먼트로 분할하여 업로드를 해야합니다.
- 구문
 PUT /v1/{Account}/{Container}/{Object} 
 X-Auth-Token: {Token}
 Content-Type: {content-type}
- 매니페스트 생성
 모든 오브젝트의 세그먼트를 업로드한 다음 매니페스트 오브젝트를 생성하여 하나의 오브젝트처럼 사용할 수 있습니다.
 매니패스트 오브젝트는 세그먼트들이 저장된 경로를 가리킵니다.
 PUT /v1/{Account]/{Container}/{Object} 
 X-Auth-Token: {Token}
 X-Object-Manifest: {Container}/{Object}/
- 요청 헤더
 path Description: 세그먼트(segment) 오브젝트 경로 Type: String Required: No 
 ETagDescription: 오브젝트 contents에 MD5 hash Type: String Required: No 
 size_bytesDescription: 세그먼트(segment) 개체 크기 Type: String Required: No 
 rangeDescription: 세그먼트(segment)로 사용될 개체 범위 Type: String Required: No 
- 응답 헤더
 이 API는 응답 본문을 반환하지 않습니다. 요청이 올바르면 상태 코드 201을 반환합니다.
 
오브젝트 다운로드
오브젝트를 다운로드합니다.
- 구문
 GET /v1/{Account}/{Container}/{Object} 
 X-Auth-Token: {Token_ID}
- 요청 헤더
 이 API는 요청 본문을 요구하지 않습니다.
- 응답 헤더
 이 API는 요청 본문을 요구하지 않습니다. 요청이 올바르면 상태 코드 200을 반환합니다.
오브젝트 복사
오브젝트를 다른 컨테이로 복사합니다.
- 구문
 PUT /v1/{Account}/{Container}/{Object} 
 X-Auth-Token: {Token_ID}
 X-Copy-From: {원본 오브젝트}
 COPY /v1/{Account}/{Container}/{Object} 
 X-Auth-Token: {Token_ID}
- 요청 헤더
 이 API는 요청 본문을 요구하지 않습니다.
 X-Copy-From
 Description: 소스 컨테이너/오브젝트 경로 Type: String Required: Yes, if using PUT 
 Destination
 Description: 복사될 컨테이너/오브젝트 경로 Type: String Required: Yes, if using COPY 
 If-Modified-SinceDescription: Only copies if modified since the date/time of the source object’s last_modified attribute. Type: Date 
 Required: No
 If-Unmodified-Since
 Description: Only copies if not modified since the date/time of the source object’s last_modified. Type: Date Copy-If-Match
 Required: No
 Description: Copies only if the ETag in the request matches the source object’s ETag. Type: String 
 Required: No
 Copy-If-None-Match
 Description: Copies only if the ETag in the request does not match the source object’s ETag. Type: ETag 
 Required: No
- 응답 헤더
 이 요청은 응답 본문을 반환하지 않습니다. 요청이 올바르면 상태 코드 201을 반환합니다.
오브젝트 메타데이터 추가 / 수정
지정한 오브젝트의 메타데이터를 추가 및 수정합니다.
- 구문
 POST /v1/{Account}/{Container}/{Object} 
 X-Auth-Token: {Token_ID}
 X-Object-Meta-{Key}: {Value}
 
- 요청 헤더
 이 API는 요청 본문을 요구하지 않습니다.
 X-Object-Meta-{Key}
 Description: 사용자가 정의한 메타데이터 키이며 임의의 문자열 
 Type: StringRequired: No 
 
- 응답 헤더
 이 요청은 응답 본문을 반환하지 않습니다. 요청이 올바르면 상태 코드 202를 반환합니다.
오브젝트 삭제
지정한 오브젝트를 삭제합니다.
-  구문 
 DELETE /v1/{Account}/{Container}/{Object} 
 X-Auth-Token: {Token-ID}
- 요청 헤더
 이 API는 요청 본문을 요구하지 않습니다.
- 응답 헤더
 이 요청은 응답 본문을 반환하지 않습니다. 요청이 올바르면 상태 코드 204를 반환합니다.