日志接口¶
POST 查询日志¶
POST /prod-api/cdn/layer7/log/v2/describeLogs
Body 请求参数
{
"action": [
{
"metricName": "logTread"
},
{
"metricName": "logs",
"pageNo": 1,
"pageSize": 15
}
],
"otherFilter": [],
"searchHeader": {},
"params": {
"beginTime": "2026-05-10 17:58:49",
"endTime": "2026-05-13 17:58:49"
}
}
请求参数¶
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Authorization | header | string | 是 | - | |
| body | body | object | 是 | - | |
| » action | body | [Action] | 否 | 操作名称 | - |
| »» 动作 | body | Action | 否 | 动作 | - |
| »»» metricName | body | string | 是 | MetricName | 二值可选: |
| »»» pageNo | body | integer(int32) | 否 | 当前页数 | - |
| »»» pageSize | body | integer(int32) | 否 | 每页显示条目个数 | - |
| » otherFilter | body | [object] | 否 | 筛选条件 | - |
| »» oneVal | body | string | 否 | 标识符 | oneVal: |
| »» threeVal | body | [string] | 否 | 值 | - |
| »» twoVal | body | string | 否 | 操作 | eq:表示等于 |
| » pageNum | body | integer(int32) | 否 | - | |
| » pageSize | body | integer(int32) | 否 | - | |
| » params | body | object | 否 | - | |
| »» beginTime | body | string | 是 | 开始时间 | - |
| »» endTime | body | string | 是 | 结束时间 | - |
详细说明¶
»»» metricName: 二值可先: metricName:logs 表示数据列表 metricName:logTread表示数据趋势图
»» oneVal: oneVal: request_id:表示请求ID domain:表示域名 ip:表示IP server_port::表示来源端口 http_user_agent:表示客户端 referer:表示来源地址 country_name:表示国家/地区 status:表示状态码 url:表示请求资源路径 cache:表示缓存
»» twoVal: eq:表示等于 ne:表示不等于 contain:表示包含
返回示例
200 Response
{"msg":"成功","code":200,"data":[{"metricName":"logTread","objectArrayList":[[1778493600000,1],[1778497200000,1],[1778500800000,0],[1778504400000,0],[1778508000000,0],[1778511600000,0],[1778515200000,0],[1778518800000,0],[1778522400000,0],[1778526000000,2],[1778529600000,0],[1778533200000,0],[1778536800000,0],[1778540400000,0],[1778544000000,0],[1778547600000,0],[1778551200000,0],[1778554800000,1]],"count":5},{"metricName":"logs","list":[{"scheme":"https","requestMethod":"GET","ua":{"patch":"0","minor":"0","os":"Windows","major":"147","build":"","name":"Chrome","os_name":"Windows","device":"Other"},"geoip":{"timezone":"Asia/Shanghai","ip":"113.116.195.49","latitude":22.5333,"coordinates":[114.1333,22.5333],"continent_code":"AS","city_name":"Shenzhen","country_code2":"CN","country_name":"China","country_code3":"CN","region_name":"Guangdong","location":{"lon":114.1333,"lat":22.5333},"longitude":114.1333,"region_code":"GD"},"httpUserAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36","protocol":"HTTP/1.1","contentType":"","responsetime":"0.016","cache":"","ip":"113.116.195.49","url":"/","size":3631,"domain":"waf2.ruisuyun.com","serverPort":"443","requestId":"c8f204a0a780cd709ddee9eaba681a7c","referer":"","status":200,"timestamp":"2026-05-12 11:38:04"},{"scheme":"https","requestMethod":"GET","ua":{"patch":"0","minor":"0","os":"Windows","major":"133","build":"","name":"Chrome","os_name":"Windows","device":"Other"},"geoip":{"timezone":"Asia/Shanghai","ip":"101.200.151.101","latitude":30.294,"coordinates":[120.1619,30.294],"continent_code":"AS","city_name":"Hangzhou","country_code2":"CN","country_name":"China","country_code3":"CN","region_name":"Zhejiang","location":{"lon":120.1619,"lat":30.294},"longitude":120.1619,"region_code":"ZJ"},"httpUserAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36","protocol":"HTTP/1.1","contentType":"","responsetime":"0.018","cache":"","ip":"101.200.151.101","url":"/favicon.ico","size":407,"domain":"lwtest.ruisuyun.com","serverPort":"443","requestId":"2f5bb52bd6cbf155da76a04ab37f49ff","referer":"","status":403,"timestamp":"2026-05-12 03:59:37"},{"scheme":"https","requestMethod":"GET","ua":{"patch":"0","minor":"0","os":"Windows","major":"133","build":"","name":"Chrome","os_name":"Windows","device":"Other"},"geoip":{"timezone":"Asia/Shanghai","ip":"101.200.151.101","latitude":30.294,"coordinates":[120.1619,30.294],"continent_code":"AS","city_name":"Hangzhou","country_code2":"CN","country_name":"China","country_code3":"CN","region_name":"Zhejiang","location":{"lon":120.1619,"lat":30.294},"longitude":120.1619,"region_code":"ZJ"},"httpUserAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36","protocol":"HTTP/1.1","contentType":"","responsetime":"0.006","cache":"","ip":"101.200.151.101","url":"/","size":3641,"domain":"lwtest.ruisuyun.com","serverPort":"443","requestId":"01b4a6f737abb3344dc48394341c455c","referer":"","status":200,"timestamp":"2026-05-12 03:58:58"},{"scheme":"https","requestMethod":"GET","ua":{"os":"Other","build":"","name":"Other","os_name":"Other","device":"Other"},"geoip":{"timezone":"America/New_York","ip":"66.132.195.103","latitude":25.7741,"coordinates":[-80.1817,25.7741],"continent_code":"NA","city_name":"Miami","dma_code":528,"country_code2":"US","country_name":"United States","country_code3":"US","region_name":"Florida","location":{"lon":-80.1817,"lat":25.7741},"postal_code":"33102","longitude":-80.1817,"region_code":"FL"},"httpUserAgent":"Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)","protocol":"HTTP/1.1","contentType":"","responsetime":"0.006","cache":"","ip":"66.132.195.103","url":"/","size":3641,"domain":"lwtest.ruisuyun.com","serverPort":"443","requestId":"b5f3a26bf782cf77de0b86e7eaa68c26","referer":"","status":200,"timestamp":"2026-05-11 19:15:11"},{"scheme":"http","requestMethod":"GET","ua":{"os":"Other","build":"","name":"Other","os_name":"Other","device":"Other"},"geoip":{"timezone":"America/New_York","ip":"66.132.224.237","latitude":25.7741,"coordinates":[-80.1817,25.7741],"continent_code":"NA","city_name":"Miami","dma_code":528,"country_code2":"US","country_name":"United States","country_code3":"US","region_name":"Florida","location":{"lon":-80.1817,"lat":25.7741},"postal_code":"33102","longitude":-80.1817,"region_code":"FL"},"httpUserAgent":"Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)","protocol":"HTTP/1.1","contentType":"","responsetime":"0.009","cache":"","ip":"66.132.224.237","url":"/","size":3641,"domain":"lwtest.ruisuyun.com","serverPort":"80","requestId":"4412f84ab4fae698c62ad97c4f8f13c3","referer":"","status":200,"timestamp":"2026-05-11 18:25:39"}]}]}
返回结果¶
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | OK | Inline |
| 201 | Created | Created | - |
| 401 | Unauthorized | Unauthorized | - |
| 403 | Forbidden | Forbidden | - |
| 404 | Not Found | Not Found | - |
返回数据结构¶
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » msg | string | true | - | - | |
| » code | integer | true | - | - | |
| » data | [object] | true | - | 数据 | - |
| »» metricName | string | true | - | 名称 | - |
| »» objectArrayList | [array] | false | - | 日志趋势图 | - |
| »» count | integer | false | - | 数量 | - |
| »» list | [object] | false | - | 日志数据列表 | - |
| »»» scheme | string | true | - | 场景 | - |
| »»» requestMethod | string | true | - | 请求方法 | - |
| »»» ua | object | true | - | - | |
| »»»» patch | string | false | - | - | |
| »»»» minor | string | false | - | - | |
| »»»» os | string | true | - | - | |
| »»»» major | string | false | - | - | |
| »»»» build | string | true | - | - | |
| »»»» name | string | true | - | - | |
| »»»» os_name | string | true | - | - | |
| »»»» device | string | true | - | - | |
| »»» geoip | object | true | - | 经纬度 | - |
| »»»» timezone | string | true | - | - | |
| »»»» ip | string | true | - | - | |
| »»»» latitude | number | true | - | - | |
| »»»» coordinates | [number] | true | - | - | |
| »»»» continent_code | string | true | - | - | |
| »»»» city_name | string | true | - | - | |
| »»»» country_code2 | string | true | - | - | |
| »»»» country_name | string | true | - | - | |
| »»»» country_code3 | string | true | - | - | |
| »»»» region_name | string | true | - | - | |
| »»»» location | object | true | - | - | |
| »»»»» lon | number | true | - | - | |
| »»»»» lat | number | true | - | - | |
| »»»» longitude | number | true | - | - | |
| »»»» region_code | string | true | - | - | |
| »»»» dma_code | integer | true | - | - | |
| »»»» postal_code | string | true | - | - | |
| »»» httpUserAgent | string | true | - | 客户端 | - |
| »»» protocol | string | true | - | 协议版本 | - |
| »»» contentType | string | true | - | 内容类型 | - |
| »»» responsetime | string | true | - | 请响应时长 | - |
| »»» cache | string | true | - | 缓存 | - |
| »»» ip | string | true | - | ip | - |
| »»» url | string | true | - | 请求资源路径 | - |
| »»» size | integer | true | - | 峰值 | - |
| »»» domain | string | true | - | 域名 | - |
| »»» serverPort | string | true | - | 来源端口 | - |
| »»» requestId | string | true | - | 请求ID | - |
| »»» referer | string | true | - | 来源地址 | - |
| »»» status | integer | true | - | 状态码 | - |
| »»» timestamp | string | true | - | 请求时间 | - |
数据模型¶
Action
动作
属性¶
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| metricName | string | true | - | MetricName | 二值可先: metricName:logs 表示数据列表 metricName:logTread表示数据趋势图 |
| pageNo | integer(int32) | false | - | 当前页数 | - |
| pageSize | integer(int32) | false | - | 每页显示条目个数 | - |
L7QueryLogVO
{
"action": [
{
"metricName": "string",
"pageNo": 0,
"pageSize": 0
}
],
"domainName": "string",
"otherFilter": [
{
"oneVal": "string",
"threeVal": ["string"],
"twoVal": "string"
}
],
"pageNum": 0,
"pageSize": 0,
"params": {
"beginTime": "string",
"endTime": "string"
},
"searchAll": "string",
"searchHeader": {},
"searchType": "string",
"searchValue": "string",
"terminal": "string",
"userId": 0
}
L7QueryLogVO
属性¶
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| action | [Action] | false | - | 操作名称 | - |
| domainName | string | false | - | - | |
| otherFilter | [object] | false | - | 筛选条件 | - |
| » oneVal | string | false | - | 标识符 | oneVal: request_id:表示请求ID domain:表示域名 ip:表示IP server_port::表示来源端口 http_user_agent:表示客户端 referer:表示来源地址 country_name:表示国家/地区 status:表示状态码 url:表示请求资源路径 cache:表示缓存 |
| » threeVal | [string] | false | - | 值 | - |
| » twoVal | string | false | - | 操作 | eq:表示等于 ne:表示不等于 contain:表示包含 |
| pageNum | integer(int32) | false | - | - | |
| pageSize | integer(int32) | false | - | - | |
| params | object | false | - | - | |
| » beginTime | string | true | - | 开始时间 | - |
| » endTime | string | true | - | 结束时间 | - |
| searchAll | string | false | - | - | |
| searchHeader | object | false | - | - | |
| searchType | string | false | - | - | |
| searchValue | string | false | - | - | |
| terminal | string | false | - | - | |
| userId | integer(int64) | false | - | - |
StatisticOtherFilterVO
StatisticOtherFilterVO
属性¶
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| oneVal | string | false | - | 标识符 | - |
| threeVal | [string] | false | - | 值 | - |
| threeVals | [string] | false | - | - | |
| twoVal | string | false | - | 操作 | eq:表示等于 ne:表示不等于 contain:表示包含 |