최신 업데이트:2025-08-27 11:19:50
이 API는 클라우드 스토리지 플랫폼 내 압축 파일에 대해 압축 해제(디컴프레션) 작업을 수행하는 데 사용됩니다. 압축 해제 작업이 완료되면, 시스템은 클라우드 스토리지 내에 압축 해제된 파일 목록을 담은 리스트 파일을 자동으로 생성합니다. 이 인터페이스를 사용하려면, 사용자는 wos:ProcessMedia 권한과 대상 파일에 대한 putObject 권한을 가지고 있어야 합니다. 압축 해제 후 원본 파일을 삭제하도록 설정하면, deleteObject 권한 역시 필요합니다.
POST /key?decompression HTTP/1.1
Host: Bucket.Endpoint
Date: Date
Authorization: Authorization
<?xml version="1.0" encoding="utf-8"?>
<Decompression xmlns="http://wcs.chinanetcenter.com/document">
<Config>
<Param>
<format>string</format>
<bucket>string</bucket>
...
</Param>
<Output>
<OutputBucket>string</OutputBucket>
<OutputKey>string</OutputKey>
</Output>
</Config>
<NotifyURL>string</NotifyURL>
<Force>int</Force>
</Decompression>
없음.
공통 요청 헤더만 필요합니다.
XML 형식의 데이터가 포함되어야 하며, 구조는 다음과 같습니다.
| 요소명 | 설명 | 필수 여부 |
|---|---|---|
| Decompression | 압축 해제 설정을 정의합니다. 타입: XML 자식: Config, NotifyURL, Force 부모: 없음 |
예 |
| Config | 압축 해제 연산을 정의합니다. 타입: XML 자식: Param, Output 부모: Decompression |
예 |
| Param | 압축 해제 상세 옵션 지정 타입: XML 자식: format, dir 등 부모: Config |
예 |
| Output | 출력 파일 정보 정의 타입: XML 자식: OutputBucket, OutputKey 부모: Config |
예 |
| OutputBucket | 출력 파일 저장 버킷명 타입: string 부모: Output |
아니오 |
| OutputKey | 출력 파일명(UrlEncoded) 타입: string 부모: Output |
아니오 |
| NotifyURL | 처리 결과 알림 URL(UrlEncoded) 타입: string 부모: Decompression |
아니오 |
| Force | 데이터 강제 처리 여부. 기본값은 0. 0: 처리 결과가 이미 존재하면 새로 처리하지 않고 “file already exists” 메시지 반환(자원 절약 목적) 1: 강제 처리 및 덮어쓰기 타입: integer 부모: Decompression |
아니오 |
정상 응답 시:
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
Date: date
Server: WS-web-server
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DecompressionResult xmlns="http://wcs.chinanetcenter.com/document">
<Succeed>
<PersistentId>string</PersistentId>
</Succeed>
</DecompressionResult>
공통 응답 헤더만 사용합니다.
| 요소명 | 설명 |
|---|---|
| PersistentId | 압축 해제 작업의 ID |
POST /test.zip?decompression HTTP/1.1
Host: Bucket.Endpoint
Date: Date
Authorization: Authorization
<?xml version="1.0" encoding="utf-8"?>
<Decompression xmlns="http://wcs.chinanetcenter.com/document">
<Config>
<Param>
<format>zip</format>
<crush>0</crush>
</Param>
<Output>
<OutputBucket>excite</OutputBucket>
<OutputKey>test.list</OutputKey>
</Output>
</Config>
</Decompression>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
Date: date
Server: WS-web-server
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DecompressionResult xmlns="http://wcs.chinanetcenter.com/document">
<Succeed>
<PersistentId>20500a49659******e088b1f736aa2a4</PersistentId>
</Succeed>
</DecompressionResult>
본 API를 통해 클라우드 스토리지 내 압축 해제(Decompression) 작업의 상태를 조회할 수 있습니다. wos:GetProcessMediaStatus 권한이 필요합니다.
GET /?decompression&persistentId=<persistentId>
Host: Bucket.Endpoint
Date: Date
Authorization: Authorization
| 파라미터명 | 필수 여부 | 설명 |
|---|---|---|
| persistentId | 예 | 압축 해제 API에서 반환된 persistentId 값 |
공통 요청 헤더만 필요합니다.
없음.
HTTP/1.1 StatusCode
Date: Date
Content-Type: type
Content-Length: length
Server: WS-web-server
<?xml version="1.0" encoding="utf-8"?>
<QueryDecompressionResult xmlns="https://wcs.chinanetcenter.com/document">
<Id>string</Id>
<CreationTime>string</CreationTime>
<Input>
<Bucket>string</Bucket>
<Key>string</Key>
<Size>int</Size>
</Input>
<Item>
<Cmd>string</Cmd>
<Code>int</Code>
<Desc>string</Desc>
<CostTime>int</CostTime>
<Error>string</Error>
<Output>
<OutputBucket>string</OutputBucket>
<OutputKey>string</OutputKey>
<Size>int</Size>
</Output>
</Item>
</QueryDecompressionResult>
공통 응답 헤더만 사용합니다.
[요청 예시]
GET /?decompression&persistentId=20500a496******b1f736aa2a4
Host: Bucket.Endpoint
Date: Date
Authorization: Authorization
[응답 예시]
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
Date: date
Server: WS-web-server
<?xml version="1.0" encoding="utf-8"?>
<QueryDecompressionResult xmlns="https://wcs.chinanetcenter.com/document">
<Id>20500a496******b1f736aa2a4</Id>
<CreationTime>2019-05-16T03:16:05Z</CreationTime>
<Input>
<Bucket>sweet</Bucket>
<Key>happy%2Ftest.zip</Key>
<Size>1000</Size>
</Input>
<Item>
<Cmd>decompression/zip</Cmd>
<Code>3</Code>
<CostTime>0</CostTime>
<Desc>finish</Desc>
<Error>null</Error>
<Output>
<OutputBucket>excite</OutputBucket>
<OutputKey>test.list</OutputKey>
<Size>2000</Size>
</Output>
</Item>
</QueryDecompressionResult>
알림 데이터는 다음과 같은 형식입니다.
<?xml version="1.0" encoding="utf-8"?>
<NotifyBody xmlns="https://wcs.chinanetcenter.com/document">
<Id>string</Id>
<CreatTime>string</CreatTime>
<Input>
<Bucket>string</Bucket>
<Key>string</Key>
<Size>int</Size>
</Input>
<Item>
<Cmd>string</Cmd>
<Code>int</Code>
<Desc>string</Desc>
<CostTime>int</CostTime>
<Error>string</Error>
<Output>
<OutputBucket>string</OutputBucket>
<OutputKey>string</OutputKey>
<Size>int</Size>
<Hash>string</Hash>
</Output>
</Item>
</NotifyBody>
| 파라미터명 | 설명 |
|---|---|
| NotifyBody | 작업 결과를 반환하며, 타입은 XML입니다. |
| Id | 인터페이스 요청 시 반환된 persistentId, 타입: string, 부모: NotifyBody |
| CreationTime | 작업 생성 시각(yyyymmddhhmmss), 타입: string, 부모: NotifyBody |
| Input | 원본 파일 정보, 타입: XML, 부모: NotifyBody, 자식: Bucket, Key, Size |
| Bucket | 원본 파일의 버킷명, 타입: string, 부모: Input |
| Key | 원본 파일명(UrlEncoded), 타입: string, 부모: Input |
| Size(Input) | 원본 파일 크기, 타입: integer, 부모: Input |
| Item | 압축 해제 처리 상태, 타입: XML, 부모: NotifyBody |
| Cmd | 작업 명령어(ops), 타입: string, 부모: Item |
| Code | 결과 상태 코드(2: 실패, 3: 성공), 타입: integer, 부모: Item |
| Desc | 상태 코드 상세 설명, 타입: string, 부모: Item |
| CostTime | 작업 소요 시간, 일반적으로 0, 타입: integer, 부모: Item |
| Error | 실패 원인 코드, 타입: string, 부모: Item |
| Output | 처리된 파일 정보, 타입: XML, 부모: Item |
| OutputBucket | 처리 결과 파일의 버킷명, 타입: string, 부모: Output |
| OutputKey | 처리 결과 파일명(UrlEncoded), 타입: string, 부모: Output |
| Size(Output) | 처리 결과 파일 크기, 타입: integer, 부모: Output |
| Hash | 결과 파일 해시값, 타입: string, 부모: Output |
| 파라미터 | 필수 여부 | 설명 |
|---|---|---|
| bucket | 아니오 | 압축 해제 후 파일을 저장할 대상 버킷 지정 |
| crush | 아니오 | 압축 해제 후 동작: 2 - 압축 파일 삭제, 리스트 파일 미생성 1 - 압축 파일 삭제, 리스트 파일 유지 0 - 둘 다 유지 |
| format | 예 | 압축 파일 포맷, zip, tar, gzip, 7z, rar 지원 |
| p | 아니오 | 압축 해제 시 비밀번호. 반드시 RSA 암호화 필요. 1. 고객이 직접 RSA 키 쌍을 생성하여 오브젝트 스토리지에 공개키를 등록해야 함 |
| prefix | 아니오 | 압축 해제 후 대상 경로(UrlEncoded) 지정. 미지정 시, 현재 압축파일과 같은 디렉터리에 풀림 |
참고: 소스 파일을 삭제하려면 반드시
deleteObject권한이 필요합니다.