<应用>:返回任务某一时间段的汇总统计数据
<接口地址>:/siteapi/data/sitetask/statisticbymonitor
<MySQL>:从库
<请求方式>:GET
<请求类型>:URL参数
<响应类型>:JSON
<请求参数>:
参数名称 | 是否必须 | 类型 | 默认值 | 描述 |
task_id | 是 | int | 无 | 任务编号 |
start_time | 是 | date | 无 | 开始时间 |
end_time | 是 | date | 无 | 结束时间 |
sumdataonly | 否 | Int | 无 | 值为1时,返回所有监测点汇总统计数据;其他值时返回各个监测点的数据 |
<请求示例>:
curl -H "token:a3af84f7c1d0d935024ba58b5da78aaa" https://v6-api.jiankongbao.com/siteapi/data/sitetask/statisticbymonitor?task_id=64&start_time=2018-01-01&end_time=2018-01-02
<响应数据>:
参数名称 | 数据类型 | 描述 |
data | array | 数据列表 |
monitor_id | Int | 监测点ID |
resp_time_avg | Float | 响应时间平均值(全部) |
avail_resp_time_avg | Float | 响应时间平均值(可用) |
resp_time_min | Float | 响应时间最小值(全部) |
avail_resp_time_min | Float | 响应时间最小值(可用) |
resp_time_max | Float | 响应时间最大值(全部) |
avail_resp_time_max | Float | 响应时间最大值(可用) |
available_rate | Float | 可用率 |
monitorinfo | Array | 监测点信息 |
"monitor_name": "名称", "location_code": "区域编码", "location_name": "区域名称", "isp_id": "服务商编号", "isp_name": "服务商名称", "isp_en_name": "服务商英文名称", "isChina": 是否中国, "worldRegionCode": 大区编码, "worldRegion": "大区名称", "countryCode": "国家编码", "country": "国家名称", "country_en": "国家英文名称", "chinaRegionCode": "中国区域编码", "chinaRegion": "中国区域", "provinceCode": "省编码", "province": "省名称", "province_en": "省英文名称", "cityCode": "城市编码", "city": "城市", "city_en": "城市英文", "monitorIp": "监测点ip" |
<响应示例>:
{ "data": [ { "monitor_id": 1, "resp_time_avg": 0,"avail_resp_time_avg": 0, "resp_time_min": 0,"avail_resp_time_min": 0, "resp_time_max": 0,"avail_resp_time_max": 0, "available_rate": 100, "monitorinfo": { "monitor_id": "1", "monitor_name": "陕西西安电信", "location_code": "100610100", "location_name": "西安市", "isp_id": "1", "isp_name": "电信", "isp_en_name": "Telecom", "isChina": 1, "worldRegionCode": "1", "worldRegion": "亚太", "countryCode": "100", "country": "中国", "country_en": "China", "chinaRegionCode": "1006", "chinaRegion": "西北", "provinceCode": "100610", "province": "陕西", "province_en": "Shaanxi", "cityCode": "100610100", "city": "西安市", "city_en": "Xi_an", "monitorIp": "111.222.3.4" } }, { "monitor_id": 106, "resp_time_avg": 1266.48, "resp_time_min": 65.39, "resp_time_max": 7766.08, "available_rate": 94.67, "monitorinfo": { "monitor_id": "106", "monitor_name": "上海市联通", "location_code": "100310", "location_name": "上海", "isp_id": "2", "isp_name": "联通", "isp_en_name": "Unicom", "isChina": 1, "worldRegionCode": "1", "worldRegion": "亚太", "countryCode": "100", "country": "中国", "country_en": "China", "chinaRegionCode": "1003", "chinaRegion": "华东", "provinceCode": "100310", "province": "上海", "province_en": "Shanghai", "monitorIp": "124.133.28.7" } } ] }