You need to enable JavaScript to run this app.
导航

ReqList

最近更新时间2023.12.26 18:54:58

首次发布时间2022.11.18 15:32:34

调用ReqList接口获取请求列表。

使用说明

  • 接口名称:ReqList
  • 请求方式:POST
  • 接口地址:/?Action=ReqList&Version=2022-10-12

请求参数

Query

参数

类型

是否必选

示例值

描述

Action

String

ReqList

请求名称。

Version

String

2022-10-12

请求版本。

ServiceName : apmplus_openapi
Region : cn-beijing 
X-App-Ids : xxx
Content-Type : application/json

Body

参数

类型

是否必选

示例值

描述

common

object of common

-

通用参数。

time_filter

object of time_filter

-

时间区间。

slow_duration

i64

3000

慢请求阈值,单位为ms。

pgno

i64

1

页号。

pgsz

i64

10

每页项数。

filter_conditions

object of filter_conditions

-

筛选条件。

order_by

string

slow_value

排序方式。

  • slow_value
  • slow_rate
  • count
  • avg
  • pct25
  • pct50
  • pct70
  • pct90
  • pct99

common

参数

类型

是否必选

示例值

描述

aid

i64

12345

应用ID。

site_type

string

web

站点类型。

env

string

online

环境,填""时为全部。

os

string

webpro

服务类型,可选值为webproappminipro

user

string

test_user

用户名。

time_filter

参数

类型

是否必选

示例值

描述

start_time

i32

1665485413

起始时间,单位s。

granularity

i32

3600

聚合时间粒度,单位s。

end_time

i32

1665744613

终止时间,单位s。

filter_conditions

参数

类型

是否必选

示例值

描述

type

string

and

筛选条件类型,可选值为andrule,只支持两层,第一层的type必须为and,第二层的type必须为rule。

field

string

pid

条件字段key,可选值集合由GetFieldKeys方法获取。

op

string

in

条件符号,可选值有eq,neq,lt,lte,gt,gte,in,not_in,regex,not_regex。

groupKey

string

context

map类型字段key,可选值集合由GetFieldKeys方法获取。

values

array of string

[数据探索]

条件值,可选值集合由GetFieldValues方法获取。

children

array of children

-

如果下层还有条件,则放入该处,这一层与field,op,groupkey以及values不能同时存在。

children

参数

类型

是否必选

示例值

描述

type

string

and

筛选条件类型,可选值为andrule,只支持两层,第一层的type必须为and,第二层的type必须为rule。

field

string

pid

条件字段key,可选值集合由GetFieldKeys方法获取。

op

string

in

条件符号,可选值有eq,neq,lt,lte,gt,gte,in,not_in,regex,not_regex。

groupKey

string

context

map类型字段key,可选值集合由GetFieldKeys方法获取。

values

array of string

[数据探索]

条件值,可选值集合由GetFieldValues方法获取。

children

array of string

-

如果下层还有条件,则放入该处,这一层与field,op,groupkey以及values不能同时存在。

返回参数

参数

类型

示例值

描述

error_msg

string

-

错误信息,成功为空。

error_no

i32

0

错误码,成功为0。

data

object of data

-

请求列表。

data

参数

类型

示例值

描述

data

array of data

-

请求列表。

total

i64

-

请求聚类总数。

data

参数

类型

示例值

描述

method

string

POST

请求方法。

domain

string

www.test.com

请求域名。

path

string

-

请求路径。

value

string

2000

请求耗时。

indicators

array of indicators

-

请求指标总览值。

indicators

参数

类型

示例值

描述

label

string

慢请求数

请求指标名。

value

i64

1000

请求指标值。

请求示例

POST https://open.volcengineapi.com/?Action=ReqList&Version=2022-10-12 
{
    "common": {
        "aid": 12345,
        "site_type": "web",
        "env": "online",
        "os": "webpro",
        "user": "test_user"
    },
    "time_filter": {
        "start_time": 1665485413,
        "end_time": 1665744613,
        "granularity": 3600
    },
    "slow_duration": 3000,
    "pgno": 1,
    "pgsz": 10,
    "filter_conditions": {
        "type": "and",
        "op": "in",
        "values": "[数据探索]",
        "field": "pid",
        "groupKey": "context",
        "children": [
            {
                "type": "and",
                "groupKey": "context",
                "children": [],
                "op": "in",
                "field": "pid",
                "values": "[数据探索]"
            }
        ]
    },
    "order_by": "slow_value, slow_rate, count, avg, pct25,pct50,pct70,pct90,pct99"
}

返回示例

正常返回示例

{
    "data": {
        "data": [
            {
                "value": "2000",
                "domain": "www.test.com",
                "indicators": [
                    {
                        "value": 1000,
                        "label": "慢请求数"
                    }
                ],
                "method": "POST",
                "path": "",
                "from_cache": false
            }
        ],
        "total": 606
    },
    "error_msg": "",
    "error_no": 0
}

异常返回示例

{
    "ResponseMetadata": {
        "RequestId": "201806041104200100100232280022D30",
        "Action": "ReqList",
        "Version": "2022-10-12",
        "Service": "***",
        "Region": "cn-north-1",
        "Error": {
            "Code": "200000",
            "Message": "参数异常"
        }
    }
}