文档中心 API文档 站点连接质量

站点连接质量

更新时间:2024-02-20 16:14:52

适用产品

连接组网

接口描述

站点连接质量

调用频率

单用户调用频率:300/5min

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Params 参数

参数名称描述
*siteANameString
站点A名称 该参数必须指定时,查询指定的站点数据
*siteBNameString
站点B名称 该参数必须指定时,查询指定的站点数据
*startTimeString
1、查询的开始时间,格式:yyyy-mm-ddThh:mm:ss 或 yyyy-mm-ddThh:mm 2、必须小于当前时间和endtime 3、startTime和endTime相差不能超过31天(可联系技术支持调整) 4、只能查询最近半年内数据
*endTimeString
1、查询的结束时间,格式:yyyy-mm-ddThh:mm:ss或 yyyy-mm-ddThh:mm 2、必须小于当前时间,大于starttime 3、startTime和endTime相差不能超过31天(可联系技术支持调整) 4、只能查询最近半年内数据

返回参数

Body 参数

参数名称描述
returnCode
接口状态码
returnMsg
接口信息
content
响应内容
siteAName
站点A名称
siteBName
站点B名称
siteAId
站点A ID
siteBId
站点B ID
status
链路状态0–未知,1–在线,2-离线,3-未上报,4-挂起
quality
质量趋势数据
timeStamp
时间戳
timeData
时间分片
rtt
时延
loss
丢包率
mdev
抖动

错误码

错误代码(code)描述(message)HTTP状态码语义
4001Illegal time parameter400非法时间参数
4002The time parameter cannot be empty400时间参数不能为空
4003Start no earlier than six months ago400开始时间不能早于半年前
4004The start and end time cannot be more than x days apart400开始与结束时间不能相差超过x天
4005The start time cannot be later than the end time400开始时间不能大于结束时间
4006The start and end time must be earlier than the current time400开始结束时间必须小于当前时间
5001Site name cannot be empty400站点名称不能为空
5003Site connection does not exist400站点连接不存在

示例

JSON
JSON
请求示例
复制代码 复制成功
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`

siteAName="autotest_owned_initial01"
siteBName="autotest_cpe_initial01"
startTime="2021-12-03T15:16"
endTime="2021-12-03T16:16"

curl -i --url "http://10.8.218.160/api/siteLogic/qualityChart?siteAName=$siteAName&siteBName=$siteBName&startTime=$startTime&endTime=$endTime" \
-X "GET" \
-u "$username:$password" \
-H "Date: $date"
返回示例
复制代码 复制成功
{
	"returnCode": "1",
	"returnMsg": "success",
	"content":{
		"siteAName": "北京总部",
		"siteAId": 740317625433843,
    	"siteBName": "厦门分公司",
		"siteBId": 760845625433843,
        "status": 1,
		"quality":{
          "timeStamp":[1638322140000,1638322200000],
          "timeData":["2021-10-31 22:05","2021-10-31 22:10"],
		  "rtt":[13.45, 11.25],
		  "loss":[0.1, 0],
		  "mdev":[3.5, 4.2]
        }
	}
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!