Development Document

Domain Details Download PDF Document


Request URL: domain (GET)

Endpoint Domain Name:
Endpoint Version: v2

Endpoint Description

Request domain name details including Domain name ID, CNAME, Type of acceleration service, service status and basic configuration information, etc.

Notice: See the Response Header for the frequency limit. Cannot request more than 60 times per minute.

API Parameters

Notice: Please request the API token from your account team.

Request Parameters (GET)

Specify request parameters in the URL query strings, i.e. ?key1=value1&key2=value2.

ParameterData TypeRequirementDescription
domainsstringRequiredMultiple domain names (non-live streaming configuration) can be imported for query, separated by commas (,). Up to 10 domain names at a, parameter also supports imported Domain ID.

Sample Request:

curl -X GET

Sample Response

Json format.

    "code": 0,  //0 = Success. Other code is displayed if the request failed
    "data": [
            "id": "31335",
            "domain": "",
            "type": "download",
            "status": "serving",
            "cname": "",
            "config": {
                "cache_rule": [
                        "type": 4,
                        "time": "1",
                        "timeunit": "D",
                        "pattern": "\\.(png|jpg)",
                        "ignore_no_cache": true,
                        "ignore_query": true
                "origin": {
                    "default_master": "",
                    "origin_mode": "default",
                    "ori_https": "no",
                    "port": ""  //only support domain with HTTPS configuration to inquire origin port information.
            "id": "32810",
            "domain": "",
            "type": "page",
            "status": "suspend",
            "cname": "",
            "config": {
                "referer": {
                    "allow_empty": false,
                    "type": 1,
                    "list": [
                "origin": {
                    "default_master": "",
                    "default_slave": "",
                    "origin_mode": "custom",
                    "ori_https": "no",
                    "port": 8080,
                    "dx_master": ",",  //China Telecom main source
                    "dx_slave": ",",     //China Telecom back-up source
                    "lt_master": ",",  //China Unicom main source
                    "lt_slave": ",",     //China Unicom back-up source
                    "yd_master": ",",  //China Mobile main source
                    "yd_slave": ","     //Chian Mobile back-up source
                "origin_host": {
                    "host": ""

Response Parameters

ParameterData TypeDescription
idstringDomain ID
domainsstringDomain name
cnamestringDomain name CNAME
typestringDomain name business type: page, download, video_demand, live_video, dynamic and other
statusstringDomain name service status: deployment, serving, deleted, suspend

Config Parameter Description

Origin Settings

ParameterData TypeDescription
default_masterstringDefault origin. Can provide up to six IPs or domain names, separated by a comma (,). For example, ",".
default_slavestringBackup origin. Can provide up to six IPs or domain names, separated by a comma (,). For example, ",". Backup origins MUST be different from the default origins.
origin_modestringSelect the protocol Baishan servers should use to contact the origin with. The values can be http, https, default, custom.
origin_mode=http: forward requests to the origins via HTTP and port 80.
origin_mode=https : forward requests to the origins via : forward HTTPS and port 443.
requests to the origins via the same protocol as the end user’s request.
origin_mode=custom: customize ori_https and port number.
ori_httpsstringSpecify whether HTTPS should be used when contacting the origin. The options are . Can only be used when.
portintSpecify the port number to use when contacting the origin. Default is port 80. Can only be used when origin_mode=custom. (0- 65535)

Origin host

ParameterData TypeDescription
hoststringSpecify what the host header should be when contacting the origin,for example,""

refer (referer-based hotlink protection)

ParameterData TypeDescription
typeintType of protection:
1: Blacklist,
2: Whitelist.
listarrayThe whitelist or blacklist. Multiple entries can be separated by a comma (,). Wildcard values must start with *. For example, ["*","","*"] "*" includes any matching host headers and empty host headers.
allow_emptybooleanThe value is true by default. true= allow the connections even when the referrer header is empty, false= blocks the connections if the referrer header is empty.


ParameterData TypeDescription
typeintTypes of caching rules:
1: file extension,
2: directory,
3: complete path match,
4: Regular expression (RegEx).
patternstringCaching rules separated by a commas. For example,
When type=1,jpg,png,gif,
When type=2,/product/index,/test/index,/user/index,
When type=3,/index.html,/test/*.jpg,/user/get?index,
When type=4, see RegEx Explanation section below. The caching rules will be applied if an URL matches the RegEx. By default, query string is a part of the cache key, expires header is ignored, but no-cache header is prioritized and honored.] "*" includes any matching host headers and empty host headers.
timeintCaching time-to-live (TTL). Use with the timeunit parameter below. The maximum TTL is 2 years. If time=0, a no-cache rule is applied to the specified pattern.
timeunitstringUnit of the TTL value above. The unit is s (second) by default. Other options are Y,M,D,h,i,s (year, month, day, hour, minute, second).
ignore_no_cachebooleanIgnore the no-cache header from the origin. The value is off by default. Only valid when TTL>0. It can be set to on,off.
ignore_querybooleanIgnore the expires header from the origin. The value is on by default. Only valid when TTL>0. It can be set to on,off.


ParameterData TypeDescription
listarrayIP blacklist with entries separated by a comma. Up to 200 entries. For example, ["", "", ""]. /8, /16, and /24 CIDR blocks are supported, but no repetition is allowed.

Response Header

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-RateLimit-Remaining: 60 
X-RateLimit-Limit: 60   
X-RateLimit-Grad: minute  
X-Retry-After: 30   
Api-id: 31741661

HTTP Status Codes

Error CodeDescription
404Bad request URLs.
401Authorization Error: Invalid token or lack of access.
400Bad request parameters.
5xxPlease contact your account team.
CopyRight © 2015-2022 BaishanCloud . All Rights Reserved.