URI

/v2/site/historySnapshot/{task_id}.json

Method

GET

参数说明

参数名

必填

描述

默认值

access_token

必填



task_id

必填

网站监控项目ID(注:通过网站监控任务列表API得到)


monitor

选填

监测点ID

指定监测点ID(可选参数,不填返回所有监测点数据),如果填写0则返回所有监测点的平均值

start_date

选填

开始时间(年-月-日)

默认当天

end_date

选填

结束时间(年-月-日)

默认当天

page

选填

分页参数

默认第1页,每页返回50条记录

成功示例:

{

    "52": {

      "monitor_name": "陕西西安电信",

      "check_result": {

        "1463964437": {

          "resp_result": "1",

          "resp_status": "302 Moved Temporarily",

          "resp_time": "135.20",

          "dns_time": "0.63",

          "connect_time": "65.47",

          "process_time": "69.07",

          "download_time": "0.03",

          "total_time": "135.20",

          "size_download": "0.28",

          "speed_download": "2.11",

          "resp_summary": {

            "url":   "http://116.52.1.245/",

            "content_type": "text/html; charset=UTF-8",

            "http_code": 302,

            "header_size": 234,

            "request_size": 422,

            "filetime": -1,

            "ssl_verify_result": 0,

            "redirect_count": 0,

            "total_time": 135.197,

            "namelookup_time": 0.633,

            "connect_time": 66.1,

            "pretransfer_time": 66.102,

            "size_upload": 0,

            "size_download": 291,

            "speed_download": 2161,

            "speed_upload": 0,

            "download_content_length": -1,

            "upload_content_length": 0,

            "starttransfer_time": 135.171,

            "redirect_time": 0,

            "certinfo": [],

            "primary_ip": "116.52.1.245",

            "redirect_url":   "http://www.yngs.gov.cn/newW/template/index.jsp",

            "req_headers": [],

            "req_method": "GET",

            "req_httpv": "1.1",

            "ip":   "116.52.1.245",

            "resp_httpv": "1.1",

            "resp_headers": {

                      "Date": "Mon, 23 May 2016 00:40:23 GMT",

                      "Transfer-Encoding": "chunked",

                      "Location": "http://www.yngs.gov.cn//template/index.jsp",

                      "Content-Type": "text/html; charset=UTF-8",

                      "X-Powered-By": "*******************"

          },

          "__sid":   167

             }

      },

      .............    //其他检测时间

             }

  }

    ...............    //其他监测点

}

 

返回项

类型

描述

monitor_name

String

监测点名称

check_result

String

监测点返回结果

resp_result

String

结果

resp_status

String

状态

resp_time

String

响应时间

dns_time

String

DNS域名解析时间

connect_time

String

建立连接时间

process_time

String

服务器计算时间

download_time

String

下载时间

total_time

String

总计时间

size_download

String

下载的字节数

speed_download

String

下载的速度

resp_summary

String

当前监控概要

Ping参数

target_ip

String

主机IP

bytes_per_request

String

数据包大小

bytes_total

String

总数据包大小

ttl

String

TTL值

raw_data

String

Ping快照(根据不同的监控任务返回不同的快照内容)

transmitted

String

发送的包数

received

String

收到的包数

loss

String

丢包率

其他内容根据监控内容的不同各不相同

失败结果:

{

  "code": 400,

  "msg": "您没有权限查看该任务"

 }

返回项

类型

描述

code

String

状态码

msg

String

状态描述

 

调用示例:

curl -s 'https://api.jiankongbao.com/v2/site/historySnapshot/705433.json?start_date=2016-5-29&end_date=2016-5-30&access_token=27c7e502c94cb1c2e3d8a3a2c7dba4ef14dc53cb'