查询加速域名详情接口
更新时间:2021-11-17
接口
本接口用于查询加速域名的详细配置信息。
Method | Path | Action |
---|---|---|
GET | /v2/domain/{domain}/config | 获取指定加速域名配置的基本信息 |
domain:需要查询CDN的加速域名。
响应码 (Http Status Code)
HTTP Status Code | 说明 |
---|---|
200 | 查询成功 |
400 | 请求错误 |
响应体 (Response Body)
参数 | 类型 | 说明 |
---|---|---|
domain | String | 接入CDN进行加速的域名 |
cname | String | 为加速域名生成的一个CNAME域名,需要在域名解析服务商处将加速域名CNAME解析到该域名 |
status | String | 加速域名运行状态:RUNNING、STOPPED |
createTime | Timestamp | 域名创建时间,UTC时间 |
lastModifyTime | Timestamp | 最近修改时间,UTC时间 |
isBan | String | 是否封禁:NO表示未封禁,YES表示已封禁 |
form | String | "default"表示默认类型,"image"表示图片小文件,"download"表示大文件下载,"media"表示流媒体点播,"dynamic"表示动静态加速 |
origin | list |
源站配置 |
defaultHost | String | 默认回源host,当源站级别host不存在时,使用域名级别的默认host |
cacheTTL | list |
文件类型与路径的缓存策略 |
limitRate | Int | 下载限速,单位Byte/s |
requestAuth | requestAuth | 访问鉴权配置 |
https | HTTPSConfig | HTTPS加速配置 |
followProtocol | Bool | 是否开启了协议跟随回源 |
seoSwitch | seoSwitch | seo 开关配置 |
其中 HTTPSConfig的类型如下:
参数 | 可选 | 类型 | 说明 |
---|---|---|---|
enabled | 必选 | Bool | 开启HTTPS加速,默认为False |
certId | 可选 | String | 当enabled=true时为必选,为SSL证书服务返回的证书ID |
httpRedirect | 可选 | Bool | 为True时将HTTP请求302重定向到HTTPS,默认为False |
httpRedirectCode | 可选 | Int | 重定向状态码,可选值301/302,默认302 |
httpsRedirect | 可选 | Bool | 为True时将HTTPS请求302重定向到HTTP,默认为False |
httpsRedirectCode | 可选 | Int | 重定向状态码,可选值301/302,默认302 |
http2Enabled | 可选 | Bool | 开启HTTP2特性,默认True |
httpOrigin | 可选 | Bool | 当为True时以HTTP协议回源,默认为False |
sslVersion | 可选 | String | 设置TLS版本,内容为以下四个之一SSLV3,TLSV1,TLSV11,TLSV12。 |
请求示例
GET /v2/domain/myself.baidu.com/config HTTP/1.1
Host: cdn.baidubce.com
响应示例
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
}