接口规范说明
接口前提参数规则
开放api接口域名
接口响应状态码与错误码说明
基础信息描述
基础信息
获取访问开放api的token
地区基础信息
运营商基础信息
用户可以使用的监测点列表
获取任务正在使用的监测点信息
任务管理
基础信息
任务创建
任务修改
任务删除
任务详情
任务开启
任务暂停
任务列表
任务批量操作
维护窗口
任务分组管理
告警管理
创建任务的自定义告警规则
修改任务的自定义告警规则
删除任务的自定义告警规则
查看任务的自定义告警规则
创建任务告警通知
修改任务告警通知
获取任务告警通知
删除任务告警通知
历史快照数据
查看历史快照列表
查看单次历史快照详情
查看单次快照中的响应结果
查看历史快照列表【新版】
任务故障
任务所有监测点的故障记录
任务单个监测点故障记录
任务单个监测点故障次数
批量任务故障记录
告警消息
消息列表
单条消息详情
单条消息通知详情
采集器管理
获取采集器分组列表
获取采集器分组详情
响应时间与可用率
任务所有监测点的统计汇总数据
批量获取任务的统计数据
任务平均响应时间刻度数据
任务平均响应时间详细统计刻度数据
任务平均可用率刻度数据
traceroute任务跳数统计刻度数据
获取任务最近一次监测结果数据
任务响应时间&可用率趋势图
监测点平均响应时间topN列表
监测点平均可用率topN列表
任务指标统计
监测点分组管理
账号监测点分组列表
获取监测点分组信息
修改监测点分组信息
添加监测点分组信息
删除监测点分组信息
用户管理
获取用户基本信息
修改用户基本信息
创建用户
删除用户
当前账户信息
获取当前账户信息
账号公共设置
获取当前账户下用户列表
获取当前账户套餐信息
用户分组管理
用户分组列表
添加用户分组
修改用户分组
删除用户分组
获取单个分组下的用户
获取多个分组下的用户
将用户添加入分组
附录
附录二 userapi错误编码与含义

<接口地址>:/siteapi/data/snapshot/time


<请求方式>:GET


<请求类型>:URL参数


<响应类型>:JSON


<请求参数>:

参数名称

是否必须

类型

默认值

描述

task_id

int

任务编号

check_time

int

检查时间,时间戳

monitor_id

int

监测点ID


<请求示例>:

curl -H "token:a3af84f7c1d0d935024ba58b5da78aaa"  "https://v6-api.jiankongbao.com/siteapi/data/snapshot/time?task_id=64&check_time=1463964437"


<响应数据>:

参数名称

数据类型

描述

data

array

数据列表

monitor_id

int

监测ID

monitor_location

string

监测点所属地区

monitor_ip

string

监测点IP

monitor_name

string

监测点名称

check_result

array

监测点返回

check_time

string

时间(unix时间戳)

resp_result

int

应结

resp_status

string

resp_time

float

应时间

resp_summary

array

当前控概要,不同的控类型概要内容不同,以下列ping控概要

task_type

array

任务类型

http控参数

dns_time

float

DNS域名解析时间

connect_time

float

建立时间

appconnect_time

float

SSL握手时间,只适用于https任

process_time

float

时间

download_time

float

载时间

total_time

float

总计时间

size_download

float

的字

speed_download

float

的速度

url

string

请求url

content_type

string

资源类型

http_code

int

响应状态码

header_size

int

header的大小

request_size

int

request的大小

file_time

int

文件创建的时间

ssl_verify_result

int

SSL验证结果

redirect_count

int

跳转计数

total_time

float

总耗时

namelookup_time

float

NS查询耗时

connect_time

float

等待连接耗时

pretransfer_time

float

传输前准备耗时

size_upload

int

上传数据的大小

size_download

int

下载数据的大小

speed_download

int

下载速度

speed_upload

int

上传速度

download_content_length

int

下载内容的长度

upload_content_length

int

上传内容的长度

starttransfer_time

float

开始传输的时间

redirect_time

int

重定向耗时

__sid

string

监测点编号

mip

string

监测点IP

certinfo

array

认证信息

primary_ip

string

ip

primary_port

int

端口

local_ip

string

监控点ip

local_port

int

监控点端口

redirect_url

string

重定向url

errno

int

错状态号

errmsg

string

错信息

Ping控 resp_summary控概要

target_ip

String

主机IP

bytes_per_request

int

数据包大小

bytes_total

int

数据包大小

ttl

int

TTL

raw_data

array

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

transmitted

int

送的包数

received

int

收到的包数

loss

int

包率

traceroute_raw_data

Array

Traceroute结果

Dns监控resp_summary控概

res

string

Dig结果

answerfrom

string

ip

mip

string

监测点IP

__sid

string

监测点编号

Tcp监控resp_summary控概

total_time

float

总响应时间

ip

string

响应ip

connect_time

float

等待连接耗时

errno

int

出错号

namelookup_time

float

NS查询耗时

errmsg

string

出错信息

Udp监控resp_summary控概

namelookup_time

string

NS查询耗时

ip

string

响应ip

raw_data

string

响应结果内容

process_time

string

时间

total_time

float

总响应时间

mip

string

监测点IP

__sid

string

监测点编号

Traceroute监控resp_summary控概

raw_data

array

响应结果内容

no_resps

int

无响应跳数

steps

int

总跳数

max_loss

int

最大无响应跳数比

loss

int

无响应跳数比

ip

string

响应ip

__sid

string

监测点编号


<响应示例>:

{
  "data": [
   {
"monitor_id": 1,
"monitor_name": "陕西西安电信",
"monitor_location": "陕西",
"monitor_ip": "123.23.23.23",
      "check_result": {
          "check_time": "1463964437",
          "resp_result": "1",
          "resp_status": "302 Moved Temporarily",
          "resp_time": "135.20",
          "dns_time": "0.63",
          "connect_time": "65.47",
             "appconnect_time":"100",
          "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": "*******************"
          }
      }
             }
       }
    ...............    //其他监测点
  ]
}