网页加速、下载分发、动态加速、全站加速、点播分发、直播分发、上传加速、移动加速、上网加速、S-P2P、PCDN、应用性能管理、WEB应用防火墙、BotGuard爬虫管理、WSS、DMS、DDoS云清洗、应用加速、应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案
恢复指定域名的CDN加速服务,即从DNS层面让域名请求回到CDN节点。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domainId | Integer | 是 | 加速域名在系统中对应的ID 1. 参看请求示例中的url,123344对应的就是domain-id 2. 可以通过【获取域名配置】和【获取域名列表】接口查询到domain-id |
参数名称 | 类型 | 描述 |
---|---|---|
code | String | 错误代码,当HTTPStatus不为202时出现,表示当前请求调用的错误类型 |
message | String | 响应信息,成功时为success |
http-status-code | Integer | httpstatus=202; 表示成功调用新增域名接口,可使用header中的x-cnc-request-id查看当前新增域名的部署情况 |
x-cnc-request-id | String | 唯一标示的id,用于查询每次请求的任务 (适用全部接口) |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
NoSuchDomain | customer not own domain id. | 404 | 域名不属于当前客户 |
Forbidden | The domain is being deleted | 403 | 域名被删除 |
DomainNotCanceled | The domain you are trying to restorehasnot been canceled. | 409 | 您想恢复的域名还没有被取消加速服务 |
PARAM_INVALID | param: {0} is null or invalid. | 400 | 参数{}为空或者无效 |
#!/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/123344/restore" \ -X "PUT" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/xml"
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>