接口描述:调用本接口查询回源状态码请求数和回源状态码请求数占比
请求方式:post
请求路径:/statistics/query-miss-http-status-code-data
使用说明:
- 单个用户一分钟限制调用10000次,并发不超过100;
- 单次查询输入域名的个数不能超过100个;
- 时间粒度为24h时,查询开始时间与结束时间需要跨天,否则查询的数据为空;
- 最大返回50000条记录;
- 若查询结束时间不包含在该批次的最后一秒,默认end_time为该批次最后一秒,例如:时间粒度为1h,end_time设置为17:30对应的时间戳,此时end_time默认成17:59:59;
- 时间片统计数据均为前打点,假如请求5分钟粒度数据,time_stamp= "2021-10-13 00:00"对应的时间戳,表示统计的数据为时间区间[2021-10-13 00:00, 2021-10-13 00:05);
- 根据请求参数时间粒度(Interval)和聚合维度(group_by)个数的不同,单次请求可查询历史数据范围,数据延迟,对应如下表,若开始时间超过可查询历史数据时间范围,超过部分的数据为0。
时间粒度 | 可查询历史数据时间范围 | 数据延迟 | 单次可查询的时间跨度 |
---|---|---|---|
1m | 最近7天 | 5分钟 | 3小时 |
5m | 最近186天 | 20分钟 | 31天 |
1h | 最近186天 | 20分钟 | 31天 |
24h | 最近186天 | 20分钟 | 31天 |
请求参数说明(json):
参数 | 类型 | 是否必传 | 名称 | 描述 |
---|---|---|---|---|
start_time | int | 是 | 开始时间戳 | 起始时间,时间戳(秒)。 |
end_time | int | 是 | 结束时间戳 | 结束时间,时间戳(秒)。 |
interval | string | 否 | 时间粒度 | 时间粒度,目前支持1m,5m,1h和24h,默认5m。 |
product_type | list< string> | 否 | 产品类型 | 传“006”代表全站加速,不传代表全部产品。 |
domain | list< string > | 否 | 域名列表 | 域名,不传默认名下所有域名,可多个域名,作为统计筛选项。 |
province | list< int > | 否 | 省编码列表 | 省编码,不传默认所有省份,可多个省编码,作为统计筛选项,点击查看地区及省份列表。 |
isp | list< string > | 否 | 运营商编码列表 | 运营商编码,不传默认所有运营商,可多个运营商编码,作为统计筛选项,点击查看运营商列表。 |
network_layer_protocol | string | 否 | 网络层协议 | 网络层协议,不传默认所有网络层协议,支持作为统计筛选项,可以为ipv4、ipv6、other。 |
application_layer_protocol | string | 否 | 应用层协议 | 应用层协议,不传默认所有应用层协议,支持作为统计筛选项,可以为http,https,rtmp,quic,other。 |
group_by | list< string > | 否 | 结果聚合维度 | 指标在计算结果的聚合维度,不传或为空默认按照时间粒度聚合,可多个统计维度,可以为product_code,domain,province,isp,network_layer_protocol,application_layer_protocol。 |
返回参数说明:
参数 | 类型 | 是否必传 | 名称及描述 |
---|---|---|---|
code | int | 是 | 状态码 |
message | string | 是 | 描述信息 |
start_time | int | 否 | 开始时间戳,时间戳(秒) |
end_time | int | 否 | 结束时间戳,时间戳(秒) |
interval | string | 否 | 时间粒度 |
req_miss_http_status_code_data_interval | list< object > | 否 | 每个时间间隔的请求数数据 |
req_miss_http_status_code_data_interval[*].time_stamp | int | 否 | 时间片开始时间戳 |
req_miss_http_status_code_data_interval[*].product_code | string | 否 | 产品类型 |
req_miss_http_status_code_data_interval[*].domain | string | 否 | 域名 |
req_miss_http_status_code_data_interval[*].province | int | 否 | 省编码 |
req_miss_http_status_code_data_interval[*].isp | string | 否 | 运营商编码 |
req_miss_http_status_code_data_interval[*].network_layer_protocol | string | 否 | 网络层协议 |
req_miss_http_status_code_data_interval[*].application_layer_protocol | string | 否 | 应用层协议 |
req_miss_http_status_code_data_interval[*].miss_http_status_code | string | 否 | 回源状态码 |
req_miss_http_status_code_data_interval[*].miss_http_status_code_num | int | 否 | 回源状态码个数 |
req_miss_http_status_code_data_interval[*].miss_http_status_code_proportion | float | 否 | 回源状态码占比(百分比,保留两位小数) |
示例:
请求路径:https://cdnapi-global.ctapi.ctyun.cn/statistics/query-miss-http-status-code-data
请求参数:
{
"start_time": 1662413100,
"end_time": 1662413700,
"product_type":["006"],
"domain": [
"aaa.ctyun.cn",
"bbb.ctyun.cn"
],
"group_by": [
"application_layer_protocol"
]
}
返回结果:
{
"code": 100000,
"message": "success",
"start_time": 1662413100,
"end_time": 1662413700,
"interval": "5m",
"req_miss_http_status_code_data_interval": [
{
"time_stamp": 1662413100,
"miss_http_status_code": "200",
"miss_http_status_code_num": 2304,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 4.03
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "200",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "0",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "403",
"miss_http_status_code_num": 40610,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 71
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "416",
"miss_http_status_code_num": 1,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "206",
"miss_http_status_code_num": 430,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 61.25
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "403",
"miss_http_status_code_num": 115,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 16.38
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "206",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "499",
"miss_http_status_code_num": 2861,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 5
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "400",
"miss_http_status_code_num": 2,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "499",
"miss_http_status_code_num": 24,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 3.42
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "200",
"miss_http_status_code_num": 130,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 18.52
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "408",
"miss_http_status_code_num": 1,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "400",
"miss_http_status_code_num": 3,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 0.43
},
{
"time_stamp": 1662413100,
"miss_http_status_code": "206",
"miss_http_status_code_num": 11419,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 19.96
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "424",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "200",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "416",
"miss_http_status_code_num": 0,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "499",
"miss_http_status_code_num": 17,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 2.71
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "400",
"miss_http_status_code_num": 4,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 0.64
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "403",
"miss_http_status_code_num": 130,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 20.7
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "200",
"miss_http_status_code_num": 112,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 17.83
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "206",
"miss_http_status_code_num": 365,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 58.12
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "499",
"miss_http_status_code_num": 2937,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 5.55
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "504",
"miss_http_status_code_num": 1,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "206",
"miss_http_status_code_num": 11131,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 21.04
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "206",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "200",
"miss_http_status_code_num": 2569,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 4.86
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "403",
"miss_http_status_code_num": 36244,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 68.52
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "502",
"miss_http_status_code_num": 3,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0.01
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "0",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "304",
"miss_http_status_code_num": 0,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "424",
"miss_http_status_code_num": 5,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0.01
},
{
"time_stamp": 1662413400,
"miss_http_status_code": "408",
"miss_http_status_code_num": 2,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "200",
"miss_http_status_code_num": 110,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 14.36
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "499",
"miss_http_status_code_num": 2915,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 5.72
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "0",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "400",
"miss_http_status_code_num": 10,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 1.31
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "200",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "403",
"miss_http_status_code_num": 129,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 16.84
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "416",
"miss_http_status_code_num": 0,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "200",
"miss_http_status_code_num": 2229,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 4.37
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "499",
"miss_http_status_code_num": 14,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 1.83
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "502",
"miss_http_status_code_num": 2,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "403",
"miss_http_status_code_num": 34233,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 67.13
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "206",
"miss_http_status_code_num": 11602,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 22.75
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "408",
"miss_http_status_code_num": 1,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "424",
"miss_http_status_code_num": 15,
"application_layer_protocol": "http",
"miss_http_status_code_proportion": 0.03
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "206",
"miss_http_status_code_num": 503,
"application_layer_protocol": "https",
"miss_http_status_code_proportion": 65.67
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "206",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
},
{
"time_stamp": 1662413700,
"miss_http_status_code": "424",
"miss_http_status_code_num": 0,
"application_layer_protocol": "other",
"miss_http_status_code_proportion": null
}
]
}
错误码请参考:参数code和message含义