最近更新时间:2023.04.11 16:29:05
首次发布时间:2022.11.18 15:32:35
调用ResourceItemTrend接口获取指定静态资源趋势。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 |
| 请求名称。 |
Version | String | 是 |
| 请求版本。 |
ServiceName : apmplus_openapi Region : cn-beijing X-App-Ids : xxx Content-Type : application/json
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
name | string | 是 |
| 静态资源地址。 |
type | string | 是 |
| 静态资源类型。 |
common | object of common | 是 | - | 通用参数。 |
time_filter | object of time_filter | 是 | - | 时间区间。 |
filter_conditions | object of filter_conditions | 否 | - | 筛选条件。 |
pick_type | string | 是 |
| 加载总耗时聚合方式。
|
slow_duration | i64 | 是 |
| 慢加载阈值。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
aid | i64 | 是 |
| 应用ID。 |
site_type | string | 是 |
| 站点类型。 |
env | string | 是 |
| 环境,填""时为全部。 |
os | string | 否 |
| 服务类型,可选值为webpro,app,minipro。 |
user | string | 否 |
| 用户名。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
start_time | i32 | 是 |
| 起始时间,单位s。 |
granularity | i32 | 否 |
| 聚合时间粒度,单位s。 |
end_time | i32 | 是 |
| 终止时间,单位s。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
type | string | 是 |
| 筛选条件类型,可选值为and和rule,只支持两层,第一层的type必须为and,第二层的type必须为rule。 |
field | string | 否 |
| 条件字段key,可选值集合由 |
op | string | 否 |
| 条件符号,可选值有eq,neq,lt,lte,gt,gte,in,not_in,regex,not_regex。 |
groupKey | string | 否 |
| map类型字段key,可选值集合由 |
values | array of string | 否 |
| 条件值,可选值集合由 |
children | array of children | 否 | - | 如果下层还有条件,则放入该处,这一层与field,op,groupkey以及values不能同时存在。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
type | string | 是 |
| 筛选条件类型,可选值为and和rule,只支持两层,第一层的type必须为and,第二层的type必须为rule。 |
field | string | 否 |
| 条件字段key,可选值集合由 |
op | string | 否 |
| 条件符号,可选值有eq,neq,lt,lte,gt,gte,in,not_in,regex,not_regex。 |
groupKey | string | 否 |
| map类型字段key,可选值集合由 |
values | array of string | 否 |
| 条件值,可选值集合由 |
children | array of string | 否 | - | 如果下层还有条件,则放入该处,这一层与field,op,groupkey以及values不能同时存在。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | object of data | - | 静态资源各阶段耗时趋势及总加载耗时分布情况。 |
error_msg | string | - | 错误信息,成功为空。 |
error_no | i32 |
| 错误码,成功为0。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
trend | object of trend | - | 静态资源各阶段耗时趋势。 |
distribution | object of distribution | - | 静态资源总加载耗时分布情况。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
fields | array of fields | - | 折线图/饼图维度,len(fields)=len(source[i])。 |
source | array of string |
| 趋势图具体点的集合,len(source)为折线图点的数量或者饼图中块数量。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
distribution | object of distribution | - | 请求耗时分布。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
id | string |
| 维度key。 |
dataType | string |
| 维度类型。 |
name | string |
| 维度名。 |
aggregate | string | - | 聚合方式。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
fields | array of fields | - | 折线图/饼图维度,len(fields)=len(source[i])。 |
source | array of string |
| 趋势图具体点的集合,len(source)为折线图点的数量或者饼图中块数量。 |
POST https://open.volcengineapi.com/?Action=ResourceItemTrend&Version=2022-10-12 { "name": "data:image/svg+xml", "type": "resource", "common": { "aid": 12345, "site_type": "web", "env": "online", "user": "test_user", "os": "webpro" }, "time_filter": { "start_time": 1665485413, "end_time": 1665744613, "granularity": 3600 }, "pick_type": "avg,pct25,pct50,pct70,pct90,pct99", "slow_duration": 3000, "filter_conditions": { "type": "and", "values": "[数据探索]", "op": "in", "field": "pid", "children": [ { "type": "and", "children": [], "groupKey": "context", "field": "pid", "values": "[数据探索]", "op": "in" } ], "groupKey": "context" } }
{ "error_msg": "", "error_no": 0, "data": { "distribution": { "distribution": { "fields": [ { "name": "日期", "id": "date", "aggregate": "", "dataType": "string" } ], "source": [ [ "1668355200", "js_error", "0", "0" ] ] }, "extra": { "benchmark": 184, "value": 723, "label": "plankton" } }, "trend": { "fields": [ { "name": "日期", "aggregate": "", "id": "date", "dataType": "string" } ], "source": [ [ "1668355200", "js_error", "0", "0" ] ] } } }
{ "ResponseMetadata": { "RequestId": "201806041104200100100232280022D30", "Action": "ResourceItemTrend", "Version": "2022-10-12", "Service": "***", "Region": "cn-north-1", "Error": { "Code": "200000", "Message": "参数异常" } } }