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

GetDurationTrendPerAction

最近更新时间2023.04.11 16:11:01

首次发布时间2022.11.01 11:26:00

调用GetDurationTrendPerAction接口获取指定Action的耗时趋势。

使用说明

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

请求参数

Query

参数

类型

是否必选

示例值

描述

Action

String

GetDurationTrendPerAction

请求名称。

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

-

时间区间。

filter_conditions

object of filter_conditions

-

筛选条件。

action_type

string

click

Action类型。调用GetActionOverviewList接口查看取值。

pid

string

数据探索

页面ID。调用GetActionOverviewList接口查看取值。

action_target_name

int32

描述

Action名字。调用GetActionOverviewList接口查看取值。

metric_type

string

avg

耗时指标统计方式。

  • avg(默认)
  • pct50
  • pct75
  • pct90
  • pct95

time_filter

参数

类型

是否必填

示例值

说明

start_time

int32

1666003194

起始时间。

end_time

int32

1666004994

终止时间。

granularity

int32

60

聚合时间粒度。

common

参数

类型

是否必填

示例值

说明

aid

int64

12345

应用ID。

filter_conditions

参数

类型

是否必填

示例值

说明

type

string

and

筛选条件类型。

  • and:children中的条件为与关系。
  • rule(默认):当前条件为原子条件。

children

object of children

-

type值为and时必填。

children

参数

类型

是否必填

示例值

说明

op

string

in

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

field

string

pid

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

values

[]string

["数据探索"]

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

返回参数

参数

类型

示例值

说明

err_detail

string

-

错误详情。

data

object of data

-

返回内容。

error_msg

string

-

错误信息。

error_no

int

0

错误码。0为成功。

data

参数

类型

示例值

说明

chart

object

-

图表详情。

info

object of info

-

信息。

extra

object of extra

{ "release_info":[ ] }

其他信息。

chart

参数

类型

示例值

说明

fields

object of fields

-

展示的指标。

source

object

[ "1665072000", "4" ]

与field对应的值。

info

参数

类型

示例值

说明

name

string

Action触发数

指标名称。

count

string

4

该指标对应值的数量。

change

string

-0.2632

环比的变化量。

extra

参数

类型

示例值

说明

release_info

object

[]

发布信息。

fields

参数

类型

示例值

说明

id

string

count

source对应的指标相关信息。

  • date:时间,为source[i][0]的值的含义
  • count:action触发数,为source[i][1]的值的含义

dataType

string

number

数据类型。

name

string

Action触发数

指标名称。

请求示例

POST https://open.volcengineapi.com/?Action=GetDurationTrendPerAction&Version=2022-10-12

{
    "common":{
        "aid":12345
    },
    "time_filter":{
        "start_time":1664621845,
        "end_time":1665140253,
        "granularity":86400
    },
    "action_type":"click",
    "pid":"数据探索",
    "action_target_name":"描述",
    "metric_type":"avg",
    "filter_conditions":{
        "type":"and",
        "children":[
            {
                "op":"in",
                "field":"pid",
                "values":[
                    "数据探索"
                ]
            }
        ]
    }
}

返回示例

{
    "err_detail":"",
    "data":{
        "chart":{
            "fields":[
                {
                    "id":"date",
                    "dataType":"string",
                    "name":""
                },
                {
                    "id":"count",
                    "dataType":"number",
                    "name":"Action 触发数"
                }
            ],
            "source":[
                [
                    "1665072000",
                    "4"
                ]
            ]
        },
        "info":[
            {
                "id":"count",
                "name":"Action 触发数",
                "count":"14",
                "change":"-0.2632"
            }
        ],
        "extra":{
            "release_info":[

            ]
        }
    },
    "error_msg":"",
    "error_no":0
}