连接组网
查询指定企业下所有站点的累计流量
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
startTime | String | 是 | 1、查询的开始时间,格式:yyyy-mm-dd 2、必须小于当前时间和endtime; 3、startTime和endTime相差不能超过31天;(可联系技术支持调整) 4、只能查询最近半年内数据。 |
endTime | String | 是 | 1、查询的结束时间,格式:yyyy-mm-dd 2、必须小于当前时间,大于或等于starttime 3、startTime和endTime相差不能超过31天(可联系技术支持调整); 4、如果起始时间、结束时间是当天,且不满一天,那就查询从00:00到查询时刻的站点累计流量。 4、只能查询最近半年内数据。 |
参数名称 | 类型 | 描述 |
---|---|---|
returnCode | Integer | 接口状态码 |
returnMsg | String | 接口信息 |
content | AllSiteSumFlowResponseContent | 响应内容 |
sumSiteOutFlow | String | 企业站点流出流量总和 |
sumSiteInFlow | String | 企业站点流入流量总和 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
4001 | 非法时间参数 | 400 | 非法时间参数 |
4002 | 时间参数不能为空 | 400 | 时间参数不能为空 |
4003 | 开始时间不能早于半年前 | 400 | 开始时间不能早于半年前 |
4004 | 开始与结束时间不能相差超过x天 | 400 | 开始与结束时间不能相差超过x天 |
4005 | 开始时间不能大于结束时间 | 400 | 开始时间不能大于结束时间 |
4006 | 开始结束时间必须小于当前时间 | 400 | 开始结束时间必须小于当前时间 |
#!/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` curl -i --url "http://10.8.218.160/api/siteFlow/orgSumFlow?startTime=2021-11-02&endTime=2021-12-01" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \
{ "content": { "sumSiteOutFlow": 72108806, "sumSiteInFlow": 73070496 }, "returnCode": 1, "returnMsg": "success", "successFul": true }