Help Center/ Object Storage Service/ API Reference/ APIs/ Advanced Bucket Settings/ Obtaining an Online Decompression Policy
Updated on 2024-03-22 GMT+08:00

Obtaining an Online Decompression Policy

Functions

Queries the decompression policy of ZIP files in a specified bucket. If such a rule exists, a success message is returned with status code 200.

Request Syntax

GET /?obscompresspolicy HTTP/1.1
Host: bucketname.obs.region.myhuaweicloud.com 
Authorization: authorization
Date: date

Request Parameters

This request contains no message parameters.

Request Headers

This request uses common headers. For details, see Table 3.

Request Elements

This request involves no elements.

Response Syntax

HTTP/1.1 status_code
Server: OBS
Date: date
Content-Type: type
Content-Length: length

policy json body

Response Headers

The response to the request uses common headers. For details, see Table 1.

Response Elements

This response contains no elements.

Error Responses

No special error responses are returned. For details about error responses, see Table 2 and Table 3.

Sample Request

GET /?obscompresspolicy HTTP/1.1
Host: bucketname.obs.region.myhuaweicloud.com 
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:sc2PM13Wlfcoc/YZLK0MwsI2Zpo=
Date: Tue, 21 Jul 2020 22:28:46 GMT

Sample Response

HTTP/1.1 200 OK
Server: OBS
Date: Tue, 07 Jul 2020 07:28:46 GMT
Content-Type: application/json
Content-Length: 497

{
	"rules": [{
		"id": "ruleid",
		"project": "your project id",
		"agency": "testagency",
		"events": ["ObjectCreated:*"],
		"prefix": "decompress",
		"suffix": ".zip",
		"overwrite": 0,
		"decompresspath": "after-decompress/"
	}]
}