网页加速、下载分发、动态加速、全站加速、点播分发、直播分发、上传加速、移动加速、S-P2P、PCDN、应用性能管理、WEB应用防火墙、BotGuard爬虫管理、WSS、DMS、DDoS云清洗、应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案
查询账号下所有域名的状态码汇总分布。只能按天统计。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
datefrom | String | 是 | 开始时间 1.格式为yyyy-MM-ddTHH:mm:ss+08:00; 2.必须小于当前时间和dateto; 3.dateFrom和dateTo相差不能超过31天(可联系技术支持调整); 4.只能查询最近2年内数据。 |
dateto | String | 是 | 结束时间 1.格式为yyyy-MM-ddTHH:mm:ss+08:00; 2.必须大于datefrom;如果大于当前时间,则重新赋值为当前时间; |
参数名称 | 类型 | 描述 |
---|---|---|
status-code-data | 状态码汇总 | |
status-code | 状态码 | |
hit | 状态码对应的请求数 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
InvalidDatePeriod | The date specified is invalid. | 400 | datefrom或dateto不符合规范 |
DateSpanError | You cannot specify a period greater than 31. | 400 | datefrom和dateto相差超过31天 |
ReportError | report error. | 400 | 系统发生错误(myview接口返回错误,且错误码非200和404) |
InternalError | We encountered an internal error. Please try again. | 500 | 系统发生错误 |
#!/bin/bash # Please remember to change the param (-H "X-Time-Zone") in this demo to the TimeZone you want in response 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/report/status-code?datefrom=2017-11-01T00:00:00%2B08:00&dateto=2017-11-07T00:00:00%2B08:00" \ -X "GET" \ -H "X-Time-Zone:GMT+08:00" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/xml"
<?xml version="1.0" encoding="UTF-8"?> <status-code-report> <status-code-data> <status-code>200</status-code> <hit>116416</hit> </status-code-data> <status-code-data> <status-code>403</status-code> <hit>200</hit> </status-code-data> <status-code-data> <status-code>404</status-code> <hit>360</hit> </status-code-data> <status-code-data> <status-code>500</status-code> <hit>216</hit> </status-code-data> <status-code-data> <status-code>other</status-code> <hit>9880</hit> </status-code-data> </status-code-report>