应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案、点播分发、直播分发、移动加速、网页加速、下载分发、全站加速
查看指定加速域名的基础配置。
单用户调用频率:300/5min
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*domain-nameString | 域名名称或域名id |
参数名称 | 描述 |
---|---|
http status codeInteger | httpstatus=200; 表示成功调用接口 |
x-cnc-request-idString | 唯一标示的id,用于查询每次请求的任务 (适用全部接口) |
x-cnc-deploy-versionString | 本次修改对应的部署版本号 |
参数名称 | 描述 |
---|---|
domain-idInteger | 系统返回的加速域名ID |
domain-nameString | 加速域名的名称 |
created-dateString | 域名创建时间,格式: week, dd month yyyy hh:mm:ss GMT +8:00
如:Mon, 18 Feb 2019 02:54:19 GMT +8:00 |
last-modifiedString | 域名最近修改时间,格式: week, dd month yyyy hh:mm:ss GMT +8:00
如:Mon, 18 Feb 2019 02:54:19 GMT +8:00 |
service-typeString | 加速域名的服务类型,包括如下:
web/web-https:网页加速/网页加速-https
wsa/wsa-https:全站加速/全站加速-https
vodstream/vod-https:点播加速/点播加速-https
download/dl-https:下载加速/下载加速-https |
commentString | 备注信息,最大限制1000个字符 |
service-areasString | 域名的加速区域. |
cnameString | 加速域名对应的CNAME域名,例如:7nt6mrh7sdkslj.cdn30.com。 |
statusString | 加速域名的部署状态,Deployed表示该加速域名配置完成部署;InProgress表示该加速域名配置的部署任务还在进行中,可能处于排队、部署中或失败任意一种状态。 |
cdn-service-statusString | 加速域名的CDN服务状态,true表示启用CDN加速服务;false表示取消CDN加速服务。 |
enabledString | 加速域名的启用状态,当禁用加速域名服务后,此项为false;当启用加速域名服务后,此项为true |
cname-labelString | 共用一级别名 |
origin-configObject | 回源策略设置,用于设置加速域名的源站信息和回源策略 |
originIpsString | 回源地址,可以是IP或域名。
1、IP以分号分隔,支持多个。
2、域名只能一个。
3、限制最大不能超过500个字符长度。 |
default-origin-host-headerString | 回源HOST,用于更改回源HTTP请求头中的HOST字段。 |
adv-origin-configsObject | 高级源配置 |
detect-urlString | 高级源监控url,通过该url请求 |
detect-periodInteger | 高级源监控周期,单位秒,可选值为大于等于0的整数,0表示不监控 |
adv-origin-configObject | 高级源配置 |
master-ipsString | 高级源主要回源IP,多个IP用分号“;”分隔,回源IP不能重复 |
backup-ipsString | 高级源备用回源IP,多个IP用分号“;”分隔,回源IP不能重复 |
sslObject | ssl证书设置,用于设置加速域名的ssl证书配置 |
use-sslString | 使用证书,可选值为true和false,true表示使用证书,false表示不使用证书 |
use-for-sniString | 使用sni证书,可选值为true和false,true表示使用sni证书,false表示使用非sni的传统证书 |
ssl-certificate-idInteger | 证书ID,新增证书成功后,系统返回的证书ID |
cache-behaviorsObject | 查询缓存时间配置,请使用新接口:【查询缓存时间配置】接口 |
cache-hostString | 缓存文件HOST(默认不返回,使用需申请)
缓存HOST域名和加速域名的”缓存规则”必须一致
注意:该节点下的相关参数配置,除开通API调用权限外,还需要联系专属客服申请开通对应的API客户模板 |
enable-httpdnsString | 启用httpdns设置(默认不返回,使用需申请)
可选值为true和false,true表示启用;false表示关闭
注意:该节点下的相关参数配置,除开通API调用权限外,还需要联系专属客服申请开通对应的API客户模板 |
header-of-clientipString | 传递客户端ip的响应头部,可选值为Cdn-Src-Ip和X-Forwarded-For,默认值为Cdn-Src-Ip |
domain-stream-typeString | 直播推拉流类型,可选值为pull和push,pull表示拉流; push表示推流。 |
live-configObject | 直播域名配置,rtmp直播加速域名的推拉流 |
stream-typeString | 直播推拉流类型,可选值为pull和push,pull表示拉流; push表示推流。 |
origin-ipsString | 源站IP,当stream-type为pull时,源站IP和配套推流域名至少一个不为空。
1、如果是推拉流配套,则返回127.0.0.1
2、如果是直接回源拉流,则返回源站IP |
origin-push-hostString | 配套推流域名,rtmp直播拉流域名对应的推流域名 |
publish-pointsObject | 直播推拉流域名的发布点
注意:拉流和对应的推流域名,发布点是相同的 |
uriString | 发布点,支持多个,系统默认值为“/” |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
PARAM_INVALID | param: {0} is null or invalid. | 400 | 参数{0}为空或非法 |
InternalError | We encountered an internal error. Please try again. | 500 | 服务器异常,数据获取失败等内部错误 |
WRONG_OPERATOR | Operator [{$operator}] can not deal with domain name [{$domainName}]. | 400 | 提交人不能处理该域名 |
NoSuchDomain | The specified domain does not exist. | 404 | 指定的域名不存在 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/api/domain/a1.example.com" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -H "Content-Type:application/json"
HTTP/1.1 200 OK Server: openresty/1.11.2.2 Date: Mon, 10 Jun 2019 06:28:17 GMT Content-Type: application/json;charset=utf-8 Content-Length: 1220 Connection: keep-alive x-cnc-deploy-version: 20190610102403 App-Name: service_confApi x-cnc-request-id: 50168ae2-8093-40b4 { "domain-id":"138491", "domain-name":"a1.example.com", "service-type":"waf", "cname":"a1.example.com.wscdns.com", "status":"InProgress", "created-date:"Mon, 18 Feb 2019 02:54:19 GMT +08:00", "last-modified":"Mon, 18 Feb 2019 02:54:19 GMT +08:00", "cdn-service-status":"true", "enabled":"true", "service-areas":"", "comment":"", "cache-host":"", "origin-config":{ "origin-ips":"1.1.1.1", "default-origin-host-header":"", "adv-origin-configs":{ "detect-url":"http://a1.example.com/test.html", "detect-period":"600", "adv-origin-config":[ { "master-ips":"2.2.2.2;1.1.1.1", "backup-ips":"www.abc.com" } ] } }, "waf-config":{ "waf-enable":"false" }, "videodrags":{ "path-pattern":"*.mp4", "drag-mode":"time", "start-flag":"start", "end-flag":"end" }, "accelerate-type":{ "accelerate-way":"3" }, "cache-behaviors":[ { "path-pattern":"/", "ignore-cache-control":"false", "cache-ttl":"12", "cache-unit":"h" }, { "path-pattern":"/", "ignore-cache-control":"false", "cache-ttl":"2", "cache-unit":"h" } ], "visit-control-rules":[ { "path-pattern":"/icons/", "allownullreferer":"", "valid-referers":{ "referer":[ "" ] }, "invalid-referers":{ "referer":[ "" ] }, "forbidden-ips":"", "allowed-ips":"", "forbidden-uas":"", "allowed-uas":"" } ], "rewrite-rule-settings":[ { "path-pattern":"/($)", "before-value":"http", "after-value":"https", "rewrite-direction":"cache2visitor", "rewrite-method":"301", "rewrite-type":"protocol" } ] }