网页加速、下载分发、动态加速、全站加速、点播分发、直播分发、上传加速、移动加速、上网加速、S-P2P、PCDN、应用性能管理、WEB应用防火墙、BotGuard爬虫管理、WSS、DMS、DDoS云清洗、应用加速、应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案
禁用多个加速域名,禁用后加速域名的请求将被直接拒绝,不会回源。
单用户调用频率:300/5min
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domain-list | complex | 是 | 指定禁用加速服务的域名列表 |
domain-name | String | 是 | 加速域名名称,每次禁用的域名总数上限为20个,多个域名以逗号分隔 |
参数名称 | 类型 | 描述 |
---|---|---|
http status code | int | httpstatus=202; 表示成功调用接口 |
x-cnc-request-id | String | 唯一标示的id,用于查询每次请求的任务 (适用全部接口) |
code | String | 错误代码,当HTTPStatus不为202时出现,表示当前请求调用的错误类型 |
message | String | 响应信息,成功时为success |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
DomainNameIsRequired | The domain name is required. | 400 | 域名是必须的 |
DomainsExcessive | The number of domain is excessive once. | 403 | 域名数量过多 |
InternalError | We encountered an internal error. Please try again. | 500 | 服务器异常,数据获取失败等内部错误 |
NoSuchDomain | Wrong domain id [null]. | 400 | 指定的域名不存在 |
DomainNotEnabled | The domain you are trying to disable has not been enabled. | 409 | 您想禁用的域名还未被启用加速服务 |
#!/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/disable" \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/xml" \ -d '<?xml version="1.0" encoding="utf-8"?> <domain-list> <domain-name>a1.example1.com</domain-name> <domain-name>a2.example2.com</domain-name> <domain-name>b1.example1.com</domain-name> <domain-name>b2.example2.com</domain-name> </domain-list>'
HTTP/1.1 202 OK Date: Fri, 17 May 2017 06:33:26 GMT Content-Type: application/xml;charset=utf-8 x-cnc-request-id:c54cbbb4-19fe-407a-930c-3988b62ed2fd <?xml version="1.0" encoding="UTF-8"?> <response> <message>success</message> </response>