Request URL: domain (GET)
Endpoint Domain Name:
cdn.api.baishan.com
Endpoint Version:v2
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.
Notice: Please request the API token from your account team.
Specify request parameters in the URL query strings, i.e. ?key1=value1&key2=value2.
Parameter | Data Type | Requirement | Description |
---|---|---|---|
domains | string | Required | Multiple domain names (non-live streaming configuration) can be imported for query, separated by commas (,). Up to 10 domain names at a time.ie. aa.qingcdn.com, bb.qingcdn.com. This parameter also supports imported Domain ID. |
curl -X GET
"https://cdn.api.baishan.com/v2/domain?token=xxx&domains=aa.qingcdn.com,bb.qingcdn.com"
Json format.
{
"code": 0, //0 = Success. Other code is displayed if the request failed
"data": [
{
"id": "31335",
"domain": "aa.qingcdn.com",
"type": "download",
"status": "serving",
"cname": "aa.qingcdn.com.qingcdn.com.",
"config": {
"cache_rule": [
{
"type": 4,
"time": "1",
"timeunit": "D",
"pattern": "\\.(png|jpg)",
"ignore_no_cache": true,
"ignore_query": true
}
],
"origin": {
"default_master": "1.1.1.1",
"origin_mode": "default",
"ori_https": "no",
"port": "" //only support domain with HTTPS configuration to inquire origin port information.
}
}
},
{
"id": "32810",
"domain": "bb.qingcdn.com",
"type": "page",
"status": "suspend",
"cname": "bb.qingcdn.com.qingcdn.com.",
"config": {
"referer": {
"allow_empty": false,
"type": 1,
"list": [
"*.qingcdn.com",
"new.vx.qingcdn.com"
]
},
"origin": {
"default_master": "133.233.133.33",
"default_slave": "12.13.41.21",
"origin_mode": "custom",
"ori_https": "no",
"port": 8080,
"dx_master": "133.233.133.33,11.11.11.12", //China Telecom main source
"dx_slave": "12.13.41.21,11.11.11.11", //China Telecom back-up source
"lt_master": "133.233.133.33,11.11.11.12", //China Unicom main source
"lt_slave": "12.13.41.21,11.11.11.11", //China Unicom back-up source
"yd_master": "133.233.133.33,11.11.11.11", //China Mobile main source
"yd_slave": "12.13.41.21,11.11.11.12" //Chian Mobile back-up source
},
"origin_host": {
"host": "test.qingcdn.com"
}
}
}
]
}
Parameter | Data Type | Description |
---|---|---|
id | string | Domain ID |
domains | string | Domain name |
cname | string | Domain name CNAME |
type | string | Domain name business type: page, download, video_demand, live_video, dynamic and other |
status | string | Domain name service status: deployment, serving, deleted, suspend |
Parameter | Data Type | Description |
---|---|---|
default_master | string | Default origin. Can provide up to six IPs or domain names, separated by a comma (,). For example, "133.233.133.33,133.233.22.33" . |
default_slave | string | Backup origin. Can provide up to six IPs or domain names, separated by a comma (,). For example, "133.233.133.33,133.233.22.33" . Backup origins MUST be different from the default origins. |
origin_mode | string | Select 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_https | string | Specify whether HTTPS should be used when contacting the origin. The options are . Can only be used when. |
port | int | Specify the port number to use when contacting the origin. Default is port 80. Can only be used when origin_mode=custom. (0- 65535) |
Parameter | Data Type | Description |
---|---|---|
host | string | Specify what the host header should be when contacting the origin,for example,"test.qingcdn.com" |
Parameter | Data Type | Description |
---|---|---|
type | int | Type of protection: 1 : Blacklist, 2 : Whitelist. |
list | array | The whitelist or blacklist. Multiple entries can be separated by a comma (,). Wildcard values must start with *. For example, ["*.aaa.qingcdn.com","www.qingcdn.com","*.test.com"] "*.test.com" includes any matching host headers and empty host headers. |
allow_empty | boolean | The 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. |
Parameter | Data Type | Description |
---|---|---|
type | int | Types of caching rules:1 : file extension, 2 : directory, 3 : complete path match, 4 : Regular expression (RegEx). |
pattern | string | Caching 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.] "*.test.com" includes any matching host headers and empty host headers. |
time | int | Caching 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 . |
timeunit | string | Unit 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_cache | boolean | Ignore 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_query | boolean | Ignore the expires header from the origin. The value is on by default. Only valid when TTL>0. It can be set to on,off . |
Parameter | Data Type | Description |
---|---|---|
list | array | IP blacklist with entries separated by a comma. Up to 200 entries. For example, ["1.1.1.0/24", "2.2.2.2", "3.3.3.3"] . /8, /16, and /24 CIDR blocks are supported, but no repetition is allowed. |
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
Error Code | Description |
---|---|
404 | Bad request URLs. |
401 | Authorization Error: Invalid token or lack of access. |
400 | Bad request parameters. |
200 | Success. |
5xx | Please contact your account team. |