获取指定Action的数量趋势。
请求说明 请求方式:POST 请求地址:https://open.volcengineapi.com/?Action=GetTrendPerAction&Version=2022-10-12 ServiceName: apmplus_openapi
Region: cn-beijing
X-App-Ids: xxx
Content-Type: application/json
请求参数 Query 参数 类型 是否必选 示例值 描述 Action String 是 GetTrendPerAction
接口名称。当前 API 的名称为 GetTrendPerAction
。 Version String 是 2022-10-12
接口版本。当前 API 的版本为 2022-10-12
。
Body 参数 类型 是否必选 示例值 描述 action_type String 是 clik
Action类型。调用GetActionOverviewList
接口查看取值。 pid String 是 数据探索
页面ID。调用GetActionOverviewList
接口查看取值。 action_target_name String 是 描述
Action名字。调用GetActionOverviewList
接口查看取值。 common Object of CommonParams 是 -
通用参数。 time_filter Object of TimeFilter 是 -
时间区间。 filter_conditions Object of FilterCondition 否 -
筛选条件。 metric_type String 否 avg
耗时指标统计方式。支持avg (默认)、pct50 、pct75 、pct90 和pct95 。
CommonParams 参数 类型 是否必选 示例值 描述 aid Long 是 12345
应用ID。 site_type String 是 web
站点类型。 env String 是 online
环境,填""时为全部。 os String 否 webpro
服务类型,可选值为webpro ,app ,minipro 。 user String 否 test_user
用户名。
TimeFilter 参数 类型 是否必选 示例值 描述 start_time Integer 是 1665485413
起始时间,单位s。 end_time Integer 是 1665744613
终止时间,单位s。 granularity Integer 否 3600
聚合时间粒度,单位s。
FilterCondition 参数 类型 是否必选 示例值 描述 type String 是 and
筛选条件类型,可选值为and 和rule ,只支持两层,第一层的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 FilterCondition 否 -
如果下层还有条件,则放入该处,即type为and 时必填。这一层与field,op,groupkey以及values不能同时存在。
返回参数 OverviewTrendResponseData OverviewTrendInfoItem 参数 类型 示例值 描述 id String count
汇总值key。 name String 白屏数
汇总值名。 unit String ms
汇总值单位。 count String 1
汇总值。 change String 1.0
环比。
ChartData 参数 类型 示例值 描述 fields Array of Field -
折线图/饼图维度,len(fields)=len(source[i])。 source Array of String [["1668355200","js_error","0","0"]]
趋势图具体点的集合,len(source)为折线图点的数量或者饼图中块数量。
Field 参数 类型 示例值 描述 id String date
维度key。 name String 日期
维度名。 dataType String string
维度类型。 aggregate String -
聚合方式。
ReleaseInfo 参数 类型 示例值 描述 env String test
版本发布环境。 commit String []
版本相关commit。 release String v2.2.123
版本。 create_at Integer 1668483578
版本发布时间。
请求示例 POST https:
{
"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
}
错误码 本接口无特有的错误码。更多信息请参见错误码 。