区块链安全加速解决方案、IPv6安全加速解决方案、点播分发、直播分发、移动加速、网页加速、下载分发、全站加速、应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案
修改域名属性,如回源IP、回源host、回源端口。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domain-name | String | 是 | 需要查询配置的域名或域名id |
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
origin-config | Object | 是 | 回源配置 |
origin-host | String | 否 | 回源host,非必填 |
origin-ips | String | 否 | 源站Ip或者域名,非必填。 1.支持IPV4,IPV6 2.多个IP用分号隔开,如1.1.1.1;2.2.2.2 3.支持单个域名 |
origin-port | String | 否 | 回源端口,非必填 端口范围:(0-65535] |
参数名称 | 类型 | 描述 |
---|---|---|
code | String | 错误代码,当HTTPStatus不为202时出现,表示当前请求调用的错误类型 |
message | String | 响应信息,成功时为success |
#!/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/property/a.example.com" \ -X "PUT" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -H "Content-Type:application/json" \ -d '{ "origin-config":{ "origin-port":"1234", "origin-ips":"1.1.1.1", "origin-host":"a.example.com" } }'
HTTP/1.1 202 Accepted Date: Fri, 17 May 2017 06:33:26 GMT Content-Type: application/json;charset=utf-8 x-cnc-request-id:c54cbbb4-19fe-407a-930c-3988b62ed2fd { "message":"success", "code":"" }