查看网站监控任务监控数据
URI /v2/site/report/${task_id}.json?start_date=XX&end_date=XX
Method GET
参数说明
'task_id' => 网站监控项目ID(注:通过网站监控任务列表得到)

'start_date' => 开始日期(Y-m-d  默认当天)

'end_date' => 结束日期(Y-m-d  默认当天)

'monitor' =>  监测点id(可选参数,不设置则默认返回所有监测点的数据,
如果只想返回平均数据,将参数设为0. 注:通过网站监控任务可使用的监测点得到监测点ID)
				
结果(json)
{

监测点ID =>                     //('0'表示平均数据)

    {
	
        'name' => 监测点名称

        'uprate' => 可用率统计
		
            {
			
              监测时间 =>         //unix时间戳
			     {
				 
                    uprate => 可用率比例
					
			     }
				 
            }
			
       'fault' => 故障统计(当为null表示无故障) 
	        
			{
			
              故障列表=>
			  
			    {
				
                   'start_time' => 故障开始时间
				   
                   'end_time' => 故障恢复时间
				   	 
                   'diff_time' => 故障持续时间
				   
                   'fault_status' => 故障原因
				   
                   'current_fault_period' => 故障时长
				   
				}
				
              'count' => 故障次数
			  
		    }

       'resptime' => 响应时间
	   
	        {
			
             监测时间 =>           //unix时间戳
			 
			    {
				
                   'resptime_max' => 最大响应时间
				   
                   'resptime_avg' => 平均响应时间
				   
                   'resptime_min' => 最小响应时间
				   
                   'resp_process_time => 服务器计算时间
				   
                   'resp_connect_time' => 建立连接时间
				   
                   'resp_dns_time' => DNS域名解析时间
				   
                   'resp_download_time' => 下载内容时间
				   
				}
				
			}
			
	}
	
}
				

一个例子

curl -s "https://api.jiankongbao.com/v2/site/report/705431.json?access_token=e1794d5ed925c96f3c6bc13b671be6a869d94037&start_date =2014-6-24&end_date=2014-6-25"

说明:access_token通过获取访问token得到.task_id通过网站监控任务列表得到.

返回结果

{
   "0": {
       "name": "平均",
       "uprate": {
           "1403625600": {
               "uprate": "0.00"
           },
           "1403629200": {
               "uprate": "0.00"
           },
           "1403632800": {
               "uprate": "0.00"
           },
           ......
        },
       "fault": {
           "0": {
               "start_time": "1403678091",
               "end_time": "未结束",
               "diff_time": "23分钟",
               "fault_status": "不包含匹配内容",
               "current_fault_period": "23分钟"
           },
           "1": {
               "start_time": "1403573908",
               "end_time": "1403662485",
               "diff_time": "24小时36分钟",
               "fault_status": "不包含匹配内容",
               "current_fault_period": "10小时14分钟"
           },
           "count": 2
       },
       "resptime": {
           "1403625600": {
               "resptime_max": "561.17",
               "resptime_avg": "120.21",
               "resptime_min": "73.50",
               "resp_download_time": "22.43",
               "resp_process_time": "30.82",
               "resp_connect_time": "19.27",
               "resp_dns_time": "47.69"
           },
           "1403629200": {
               "resptime_max": "996.52",
               "resptime_avg": "216.51",
               "resptime_min": "82.17",
               "resp_download_time": "36.35",
               "resp_process_time": "50.39",
               "resp_connect_time": "38.14",
               "resp_dns_time": "91.63"
           },
           "1403632800": {
               "resptime_max": "1020.01",
               "resptime_avg": "203.60",
               "resptime_min": "70.81",
               "resp_download_time": "26.00",
               "resp_process_time": "36.24",
               "resp_connect_time": "19.78",
               "resp_dns_time": "121.58"
           },
           .....
       }
   },
   "1": {
       "name": "西安电信",
       "uprate": {
           "1403625600": {
               "uprate": "0.00"
           },
           "1403629200": {
               "uprate": "0.00"
           },
           "1403632800": {
               "uprate": "0.00"
           },
           ........
       },
       "fault": {
           "0": {
               "start_time": "1403678031",
               "end_time": "未结束",
               "diff_time": "24分钟",
               "fault_status": "不包含匹配内容",
               "current_fault_period": "24分钟"
           },
           "1": {
               "start_time": "1403664536",
               "end_time": "1403664657",
               "diff_time": "2分钟",
               "fault_status": "无法连接服务器",
               "current_fault_period": "2分钟"
           },
           "2": {
               "start_time": "1403573848",
               "end_time": "1403662485",
               "diff_time": "24小时37分钟",
               "fault_status": "不包含匹配内容",
               "current_fault_period": "10小时14分钟"
           },
           "count": 3
       },
       "resptime": {
           "1403625600": {
               "resptime_max": "149.69",
               "resptime_avg": "105.30",
               "resptime_min": "85.91",
               "resp_download_time": "39.33",
               "resp_process_time": "31.46",
               "resp_connect_time": "28.85",
               "resp_dns_time": "5.65"
           },
           "1403629200": {
               "resptime_max": "148.25",
               "resptime_avg": "103.97",
               "resptime_min": "85.44",
               "resp_download_time": "38.05",
               "resp_process_time": "31.81",
               "resp_connect_time": "29.41",
               "resp_dns_time": "4.70"
           },
           "1403632800": {
               "resptime_max": "154.81",
               "resptime_avg": "104.31",
               "resptime_min": "85.23",
               "resp_download_time": "38.34",
               "resp_process_time": "31.63",
               "resp_connect_time": "28.93",
               "resp_dns_time": "5.41"
           },
           ........
       }
   },
   ........
}