All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

GetDomainConfigs

Last updated:2021-03-17 10:55:02

GetDomainConfigs

Description

You can call this operation to query detailed configurations of a domain name.

Request syntax

The API request contains the specified directory /2016-09-01/domain/GetDomainConfigs, common request headers, and operation-specific request parameters. For more information, see the sample request.

Request parameters

Parameter Required Type Description
DomainId Yes String The ID of the domain name.
ConfigList No String The configurations to be queried. Separate multiple configurations with commas (,). If this parameter is left empty, all configurations are queried. For more information, see the following table.

ConfigList

Request parameter Type Description Response parameter
cache_expired String The cache policy configuration. CacheRuleConfig
ip String The configuration of hotlinking prevention based on the IP address blacklist or whitelist. IpProtectionConfig
http_header String The HTTP header configuration. HttpHeadersConfig
ignore_query_string String The parameter filter configuration. IgnoreQueryStringConfig
referer String The configuration of referer-based hotlinking prevention. ReferProtectionConfig
src_host String The back-to-origin host configuration. BackOriginHostConfig
video_seek String The video seeking configuration. VideoSeekConfig
test_url String The test URL configuration. TestUrlConfig
certificate String The service certificate configuration. CertificateConfig
request_auth String The configuration of hotlinking prevention based on the timestamp and shared key. RequestAuthConfig
http2_option String The HTTP 2.0 configuration. Http2OptionConfig
force_redirect String The forcible redirection configuration. ForceRedirectConfig
page_compress String The intelligent compression configuration. PageCompressConfig
error_page String The custom error page configuration. ErrorPageConfig

Response parameters

Parameter Type Description
DomainConfigs String The configuration data. For more information, see the mappings between the request parameters and response parameters in ConfigList.

Examples

Sample request

GET method:

GET /2016-09-01/domain/GetDomainConfigs?DomainId=2D09XC0&ConfigList 1.1
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainConfigs
x-version: 2016-09-01

POST method:

POST /2016-09-01/domain/GetDomainConfigs 1.1
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainConfigs
x-version: 2016-09-01
Content-Type: application/x-www-form-urlencoded

DomainId=2D09XC0&ConfigList

Sample response

{
  "CacheRuleConfig": {
    "CacheRules": [
      {
        "CacheRuleType": "exact",
        "Value": "/111xxXXX/XXX.TXT",
        "CacheTime": 120,
        "RespectOrigin": "off",
        "CacheEnable": "on"
      },
      {
        "CacheRuleType": "exact",
        "Value": "/111xxXXX/XXX.TXT",
        "CacheEnable": "off"
      }
    ]
  },
  "IpProtectionConfig": {
    "IpList": ""
  },
  "HttpHeadersConfig": {
    "HttpHeaderRules": []
  },
  "PageCompressConfig": {
    "Enable": "off"
  },
  "IgnoreQueryStringConfig": {
    "Enable": "on"
  },
  "BackOriginConfig": {
    "Enable": ""
  },
  "ReferProtectionConfig": {
    "Enable": "off",
    "ReferType": "",
    "ReferList": "",
    "AllowEmpty": "off"
  },
  "BackOriginHostConfig": {
    "BackOriginHost": "www.test.com"
  },
  "VideoSeekConfig": {
    "Enable": "off"
  },
  "OriginAdvancedConfig": {
    "Enable": "off",
    "OriginType": "ipaddr",
    "OriginAdvancedItems": [],
    "OriginPolicy": "rr",
    "OriginPolicyBestCount": "1"
  },
  "TestUrlConfig": {
    "TestUrlConfig": "https://www.test.com"
  }
  "RequestAuthConfig": {    
    "Enable":"off",    
    "AuthType": "TypeA",   
    "Key1": "",    
    "ExpirationTime": "",
 }
}
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback