文档中心 API文档 站点会话数据

站点会话数据

更新时间:2021-12-29 17:03:59

适用产品

连接组网

接口描述

站点会话数据

推荐使用 Open API在线调试

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

请求参数

Params 参数

参数名称描述
*siteNameString
站点名称 该参数必须指定时,查询指定的站点数据
*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 参数

参数名称描述
returnCodeInteger
接口状态码
returnMsgString
接口信息
contentSiteSessionInfoResponseContent
响应内容
siteNameString
站点名称
siteIdLong
站点 ID
contentList
会话数据
srcIpString
原始IP
srcPortInteger
原始端口
destIpString
目的IP
destPortInteger
目的端口
protocolString
协议
flowNumber
流量大小,单位byte

错误码

错误代码(code)描述(message)HTTP状态码语义
4001非法时间参数400非法时间参数
4002时间参数不能为空400时间参数不能为空
4003开始时间不能早于半年前400开始时间不能早于半年前
4004开始与结束时间不能相差超过x天400开始与结束时间不能相差超过x天
4005开始时间不能大于结束时间400开始时间不能大于结束时间
4006开始结束时间必须小于当前时间400开始结束时间必须小于当前时间
5001站点名称不能为空400站点名称不能为空
5002站点不存在400站点不存在

示例

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`

siteName="autotest_owned_initial01"
startTime="2021-12-03T15:16"
endTime="2021-12-03T16:16"

curl -i --url "http://10.8.218.160/api/siteSession/info?siteName=$siteName&startTime=$startTime&endTime=$endTime" \
-X "GET" \
-u "$username:$password" \
-H "Date: $date"
返回示例
复制代码 复制成功
{
    "returnCode":"1",
    "returnMsg" : "success",
    "content":{
        "siteName": "北京总部",
        "siteId": 740317625433843,
        "content":[
            {
            "srcIp":"192.168.20.12",
            "srcPort": 46352,
            "dstIp": "50.57.54.35",
            "dstPort": 8080,
            "protocol":"ftp",
            "flow": 1852
            },
            {
            "srcIp":"192.168.20.12",
            "srcPort": 46567,
            "dstIp": "114.114.114.114",
            "dstPort": 53,
            "protocol":"dns",
            "flow": 4552
        }]
    }
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!