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

ResourceList

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

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

调用ResourceList接口获取静态资源列表。

使用说明

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

请求参数

Query

参数

类型

是否必选

示例值

描述

Action

String

ResourceList

请求名称。

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

慢加载阈值。

pgno

i64

1

页号。

pgsz

i64

10

每页项数。

filter_conditions

object of filter_conditions

-

筛选条件。

order_by

string

count

排序依据。

  • count
  • slow_rate
  • slow_value
  • 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

object of data

-

静态资源列表。

total

i64

10

静态资源聚类总数。

data

参数

类型

示例值

描述

name

string

data:image/svg+xml

静态资源地址。

type

string

resource

静态资源类型。

value

string

1000

静态资源耗时。

indicators

array of indicators

-

静态资源指标总览值。

indicators

参数

类型

示例值

描述

label

string

加载数

指标名。

value

i64

1000

指标值。

请求示例

POST https://open.volcengineapi.com/?Action=ResourceList&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,
    "order_by": "count,slow_rate,slow_value,avg,pct25,pct50,pct70,pct90,pct99",
    "filter_conditions": {
        "type": "and",
        "field": "pid",
        "children": [
            {
                "type": "and",
                "children": [],
                "values": "[数据探索]",
                "field": "pid",
                "groupKey": "context",
                "op": "in"
            }
        ],
        "op": "in",
        "groupKey": "context",
        "values": "[数据探索]"
    }
}

返回示例

正常返回示例

{
    "error_msg": "",
    "error_no": 0,
    "data": {
        "data": [
            {
                "name": "data:image/svg+xml",
                "value": "1000",
                "indicators": [
                    {
                        "label": "加载数",
                        "value": 1000
                    }
                ],
                "type": "resource",
                "from_cache": true
            }
        ],
        "total": 10
    }
}

异常返回示例

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