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

ActionDetail

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

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

调用ActionDetail接口获取具体action下的资源加载情况。

使用说明

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

请求参数

Query

参数

类型

是否必选

示例值

描述

Action

String

ActionDetail

请求名称。

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

-

时间区间。

action_id

string

84c701d6-c23f-44b7-936b-c01234567e2f

Action ID。

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。

返回参数

参数

类型

示例值

描述

data

object of data

-

具体action的资源加载情况。

error_msg

string

-

错误信息,成功为空。

error_no

i32

0

错误码,成功为0。

data

参数

类型

示例值

描述

resources_waterfall

object of resources_waterfall

-

资源加载情况。

resources_waterfall

参数

类型

示例值

描述

fields

array of fields

-

折线图/饼图维度,len(fields)=len(source[i])。

source

array of string

[["1668355200","js_error","0","0"]]

趋势图具体点的集合,len(source)为折线图点的数量或者饼图中块数量。

fields

参数

类型

示例值

描述

id

string

date

维度key。

dataType

string

string

维度类型。

name

string

日期

维度名。

aggregate

string

-

聚合方式。

请求示例

POST https://open.volcengineapi.com/?Action=ActionDetail&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
    },
    "action_id": "84c701d6-c23f-44b7-936b-c01234567e2f"
}

返回示例

正常返回示例

{
    "error_msg": "",
    "error_no": 0,
    "data": {
        "resources_waterfall": {
            "source": [
                [
                    "1668355200",
                    "js_error",
                    "0",
                    "0"
                ]
            ],
            "fields": [
                {
                    "id": "date",
                    "aggregate": "",
                    "dataType": "string",
                    "name": "日期"
                }
            ]
        }
    }
}

异常返回示例

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