查询域名配置详情
更新时间 2024-11-02 08:19:21
最近更新时间: 2024-11-02 08:19:21
接口描述:调用本接口查询某域名配置信息
请求方式:get
请求路径:/domain/query-domain-detail
使用说明:单个用户一分钟限制调用10000次,并发不超过100
Query参数说明:
| 参数名 | 类型 | 是否必填 | 名称 | 说明 |
|---|---|---|---|---|
| product_code | string | 否 | 产品类型 | 产品类型,“007”(安全加速) |
| domain | string | 是 | 域名 |
返回参数说明:
| 参数 | 类型 | 是否必传 | 名称及描述 |
|---|---|---|---|
| code | int | 是 | 状态码,成功100000 |
| message | string | 是 | 描述信息,成功返回success,其他返回异常信息描述 |
| domain | string | 否 | 域名 |
| status | int | 否 | 域名状态,4(已启用);6(已停止)。域名详情只返回域名的确定状态,过程中的状态不会返回。 |
| product_code | string | 否 | 产品类型,“007”(安全加速) |
| area_scope | int | 否 | 加速范围 |
| cname | string | 否 | cname |
| insert_date | string | 否 | 创建时间,单位毫秒 |
| status_date | string | 否 | 修改时间,单位毫秒 |
| ipv6_enable | int | 否 | ipv6启用,1(启用 );2(关闭) |
| record_num | string | 否 | 备案号 |
| record_status | string | 否 | 备案状态,false(未备案);ture(已备案) |
| origin_host_type | int | 否 | 主备源携带不同的回源host是否开启,0(关闭);1(开启) |
| origin_protocol | string | 否 | 回源协议,http(用http协议回源);https(用https协议回源);follow_request(跟随访问协议进行回源) |
| origin | list | 否 | 源站信息 |
| origin[*].origin | string | 否 | 源站ip或域名 |
| origin[*].port | int | 否 | 源站端口 |
| origin[*].weight | int | 否 | 权重 |
| origin[*].role | string | 否 | 源站角色 |
| origin[*].protocol | string | 否 | 源站类型 |
| black_referer | dict | 否 | referer黑名单 |
| black_referer.allow_list | list | 否 | referer黑名单列表 |
| black_referer.allow_empty | string | 否 | 是否允许为空,“on”(允许为空); “off”(不允许为空) |
| white_referer | dict | 否 | referer白名单 |
| white_referer.allow_list | list | 否 | referer白名单列表 |
| white_referer.allow_empty | string | 否 | 是否允许为空,“on”(允许为空); “off”(不允许为空) |
| filetype_ttl | list | 否 | 文件过期时间设置 |
| filetype_ttl[*].file_type | string | 否 | 缓存文件类型,多个以逗号隔开 |
| filetype_ttl[*].ttl | int | 否 | 缓存时间,单位秒 |
| filetype_ttl[*].cache_type | int | 否 | 缓存类型, 1(不缓存);2(优先遵循源站);3(强制缓存) |
| filetype_ttl[*].cache_with_args | int | 否 | 是否带参数缓存,0(不带参数缓存);1(带参数缓存) |
| filetype_ttl[*].mode | int | 否 | 模式, 0(文件后缀);1(目录);2(首页); 3(全部文件);4(全路径);5(正则),不传默认0 |
| filetype_ttl[*].priority | int | 否 | 优先级 |
| req_headers | list | 否 | 自定义回源请求头 |
| req_headers[*].key | string | 否 | 自定义回源请求头名称 |
| req_headers[*].value | string | 否 | 自定义回源请求头值 |
| resp_headers | list | 否 | 自定义响应头 |
| resp_headers[*].key | string | 否 | 自定义响应头名称 |
| resp_headers[*].value | string | 否 | 自定义响应头值 |
| basic_conf | dict | 否 | http配置基础信息 |
| basic_conf.follow302 | int | 否 | 是否拉取跳转后文件,0(否);1(是) |
| basic_conf.use_http2 | int | 否 | 是否开启http2,0(不开启);1(开启),该字段只有在证书开启状态下才会有效 |
| error_code | list | 否 | 错误码缓存配置 |
| error_code[*].code | string | 否 | 错误状态码 |
| error_code[*].ttl | int | 否 | 缓存时间,单位秒 |
| user_agent | dict | 否 | user_agent黑白名单配置 |
| user_agent.type | int | 否 | 类型,0:(黑名单); 1( 白名单) |
| user_agent.ua | list | 否 | user_agent列表 |
| https_status | string | 否 | 是否开启https,on、off |
| cert_name | string | 否 | 证书备注名 |
| https_basic | dict | 否 | https基础配置 |
| https_basic.https_force | string | 否 | https强制跳转,“on”(跳转);“off”(不跳转) |
| https_basic.http_force | string | 否 | http强制跳转,“on”(跳转);“off”(不跳转) |
| https_basic.force_status | string | 否 | 强制跳转状态码 |
| https_basic.origin_protocol | string | 否 | https回源协议,http(用http协议回源);https(用https协议回源);follow_request(跟随访问协议进行回源) |
| gzip | dict | 否 | 压缩功能 |
| gzip.min_length | str | 否 | 压缩文件大小 |
| gzip.file_type | str | 否 | 压缩文件类型 |
| gzip.type | int | 否 | 压缩类型,0(gzip);1(brotli) |
| ip_black_list | string | 否 | ip黑名单 |
| ip_white_list | string | 否 | ip白名单 |
| req_host | string | 否 | 回源host |
| shared_host | string | 否 | 共享缓存域名 |
示例:
示例:
请求路径:https://cdnapi-global.ctapi.ctyun.cn/domain/query-domain-detail
请求:https://cdnapi-global.ctapi.ctyun.cn/domain/query-domain-detail?domain=aaa.com&product_code=007
返回结果:
{
"code": 100000,
"message": "success",
"domain": "ctyun.cn",
"product_code": "007",
"area_scope": 1,
"origin": [
{
"protocol": "http",
"role": "master",
"port": 80,
"origin": "1.1.1.1",
"weight": 10
}
],
"black_referer": {},
"white_referer": {},
"filetype_ttl": [
{
"mode": 0,
"file_type": "php,ashx,aspx,asp,jsp,do",
"cache_type": 3,
"priority": 10,
"ttl": 0,
"cache_with_args": 0
},
{
"mode": 0,
"file_type": "js,css,xml,htm,html",
"cache_type": 3,
"priority": 10,
"ttl": 1800,
"cache_with_args": 0
},
{
"mode": 0,
"file_type": "swf,jpg,gif,png,bmp,ico,ts",
"cache_type": 3,
"priority": 10,
"ttl": 86400,
"cache_with_args": 0
},
{
"mode": 0,
"file_type": "wmv,mp3,wma,ogg,flv,mp4,avi,mpg,mpeg,f4v,hlv,rmvb,rm,3gp,img,bin,zip,rar,ipa,apk,jar,sis,xap,msi,exe,cab,7z,pdf,doc,docx,xls,xlsx,ppt,pptx,txt",
"cache_type": 3,
"priority": 10,
"ttl": 31536000,
"cache_with_args": 0
}
],
"req_headers": [],
"resp_headers": [],
"live_conf": {},
"basic_conf": {
"follow302": 0,
"use_http2": 0
},
"error_code": [],
"user_agent": {},
"https_status": "off",
"https_basic": {
"https_force": "off",
"force_status": "302",
"origin_protocol": "http",
"http_force": "off"
},
"record_num": "京ICP证030173号-1",
"record_status": "true",
"insert_date": "1657177732000",
"status_date": "0",
"cname": "erwrr.baidu.com.ctdns.cn",错误码请参考:API返回参数code和message含义