Detailed Interface to Query the Acceleration Domain Name
Last Updated:2020-09-17
Interface
This interface is used to query the detailed configuration information of the accelerated domain name.
Method | Path | Action |
---|---|---|
GET | /v2/domain/{domain}/config | Get the basic information of the assigned accelerated domain name configuration |
domain:Need to query the accelerated domain name of CDN.
Response code (Http Status Code)
HTTP Status Code | Description |
---|---|
200 | Successfully queried |
400 | Request error |
Response body
Parameter | Type | Description |
---|---|---|
domain | String | Access of domain name for acceleration to CDN |
cname | String | A CNAME domain name generated to accelerate the domain name, and it is required to resolve CNAME for accelerating domain name to such domain name at the DNS (domain name resolution) service provider. |
status | String | Accelerated domain name running status: RUNNING and STOPPED |
createTime | Timestamp | Time to create the domain name, UTC time |
lastModifyTime | Timestamp | The latest modification time (UTC) |
isBan | String | Blocked or not: NO means not blocked, and YES means blocked. |
form | String | "default " means the default type, “image " means small picture files, “download " means large file downloads, “media " means streaming VOD, and “dynamic " means dynamic and static acceleration. |
origin | list |
Origin server configuration |
defaultHost | String | Host header by default; when the origin server level host is inexistent, the default host of domain name level is used |
cacheTTL | list |
Cache policy of file type and path |
limitRate | Int | Download speed limit, with the unit of Byte/s |
requestAuth | requestAuth | Access authorization configuration |
https | HTTPSConfig | HTTPS acceleration configuration |
followProtocol | Bool | Whether the protocol follow origin is enabled. |
seoSwitch | seoSwitch | seoSwitch configuration |
HTTPSConfig type is as follows:
Parameter | Optional | Type | Description |
---|---|---|---|
enabled | Required | Bool | Enable HTTPS acceleration, and the default is False. |
certId | Optional | String | Required when enabled=true, it is the certificate ID returned by the SSL certificate service. |
httpRedirect | Optional | Bool | When it is True, redirect HTTP request 302 to HTTPS, and the default is False. |
httpRedirectCode | Optional | Int | Redirect status code, you can select 301/302, and the default is 302. |
httpsRedirect | Optional | Bool | When it is True, redirect HTTPS request 302 to HTTP, and the default is False. |
httpsRedirectCode | Optional | Int | Redirect status code, you can select 301/302, and the default is 302. |
http2Enabled | Optional | Bool | Enable HTTP2 feature, and the default is True. |
httpOrigin | Optional | Bool | When it is True, it forwards to origin by HTTP protocol, and it defaults to be False. |
sslVersion | Optional | String | Set the TLS version, and the content is one of the following four: SSLV3, TLSV1, TLSV11 and TLSV12. |
Request example
GET /v2/domain/myself.baidu.com/config HTTP/1.1
Host: cdn.baidubce.com
Response example
HTTP/1.1 200 OK
Content-Length: 190
Content-Type: application/json;utf-8
x-bce-request-id: 81d0b05f-5ad4-1f22-8068-d5c9de60a1d7
Server: BCE-CDN
{
"domain":"myself.baidu.com",
"cname":"myself.baidu.com.jomodns.com",
"status": "RUNNING",
"createTime":"2014-06-17T18:10:22Z",
"lastModifyTime": "2014-06-17T18:10:22Z",
"form": "image",
"origin": [
{"peer":"http://1.2.3.4"},
{"peer":"http://1.2.3.5"}
],
"cacheTTL" : [
{"type": "suffix", "value": ".jpg", "ttl":36000, "weight": 30},
{"type": "suffix", "value": ".mp4", "ttl":36000, "weight": 30},
{"type": "path", "value: "/path/to/my/file", "ttl":1800, "weight": 5}
],
"cacheFullUrl": true,
"limitRate": 1024000
}