Media Acceleration VoD

UpdateCompressionConfig

갱신 시간: 2025-08-14 11:27:33

Modify compress setting configurations.

  • 한도 설명: · The accelerated domain name must have been filed. · Accelerated domain names must not contain the following information: sales of drugs and controlled tools, including illegal speech and information. · Video-accelerated domain names must have audiovisual licenses; blog forums or community-based accelerated domain names must have BBS special approval qualifications. · Interface requests and return results only accept xml format.
  • 단일 사용자 통화 빈도: 300/5min
  • 해당 상품(제품): Content Acceleration,Dynamic Web Acceleration,Media Acceleration,Media Acceleration Live Broadcast
API 인증에 관한 자세한 내용은 다음을 참조하십시오:API 인증 개요

요청 파라미터

Path 파라미터

파라미터 이름설명
domain-nameString

The domain whoes need query config.

Body 파라미터

파라미터 이름설명
*compression-settingsObject

Compress setting config

compression-enabledString

To enable compress setting, allowed true or false.

br-typesString

Use br compression.The allowed values are true and false.

specify-url-patternString

Specify URI

custom-file-typesList

Custom file type: In addition to the specified file type, fill in the appropriate recognizable file type according to your own needs. It can be used in conjunction with uri-file-types. If uri-file-types is also configured, the actual effective file type is the sum of the two input parameters.

file-typesList

Define the MIME file types to be compressed. 'text/' will be compressed by default.

ignore-letter-caseString

Whether to ignore letter case.

path-patternString

The url matching mode. If all matches, the input parameters can be configured as: .*

custom-patternString

Specify Regular Pattern.The allowed values are homepage and all.

uri-file-typesList

File type: Specifies the type of file to cache. File types include: gif png bmp jpeg jpg html htm shtml mp3 wma flv mp4 wmv zip exe rar css txt ico js swf If you need all types, simply pass all. Multiple types are separated by semicolons; all and specific file types cannot be configured at the same time.

directoryString

Directory

file-type-othersList

Another way to specify the file type to open the compressed response, and configuration will be cleared when input empty.

응답 파라미터

Body 파라미터

파라미터 이름설명
codeString

The error code, when HTTPStatus is not 202, indicates the type of error the current request is calling.

httpStatusInteger

httpstatus=202; Indicates that the new domain API was successfully invoked, and the current deployment of the new domain can be viewed using x-cnc-request-id in the header

x-cnc-request-idString

Uniquely labeled id for querying each requested task (for all interfaces)

messageString

Response information, when success is successful

에러 코드

에러 코드(code)설명(message)HTTP 상태 코드설명
NoSuchDomain

The specified domain does not exist.\n\n

404The specified domain does not exist.\n\n
CustomerNoOwnDomain

customer not own domain name[www.example.com].\n\n

400customer not own domain name[www.example.com].\n\n
ConfigError

The config {0} does not access.\n\n

400The config {0} does not access.\n\n
InvalidParameter

example: 1. No domain was specified.2.The {0} is invalid.\n\n

400example: 1. No domain was specified.2.The {0} is invalid.\n\n

예제

JSON
XML
JSON
요청 예제
복사 복사 완료
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/api/config/compresssetting/123344" \
-X "PUT" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-d '
{
"compression-settings":{
"compression-enabled":"true",
"path-pattern":"*",
"ignore-letter-case":"true",
"file-types":[ "image/jpeg", "application/" ],
 "uri-file-types":[ "mp3", "zip" ],
 "custom-file-types":[ "json", "wasm" ],
 "custom-pattern":"homepage",
 "directory":"/directory/",
 "specify-url-pattern":"/abc/.*",
"br-types":"true"
}
}'
응답 예제
복사 복사 완료
HTTP/1.1 202 Accepted
Server: openresty/1.11.2.2
Date: Mon, 27 May 2019 07:15:49 GMT
Content-Type: application/json;charset=utf-8
Content-Length: 31
Connection: keep-alive
App-Name: service_confApi
x-cnc-request-id: 90d3b33c-3931-4436
{
    "message":"success",
    "code":""
}
이 문서의 내용이 도움이 되었습니까?
아니오
정상적으로 제출되었습니다.피드백을 주셔서 감사합니다.앞으로도 개선을 위해 노력하겠습니다.