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

PCAlarmMetricTrend

最近更新时间2023.12.26 19:24:29

首次发布时间2022.11.15 20:38:48

调用PCAlarmMetricTrend接口查看报警指标趋势。

请求参数

Query

参数

类型

是否必选

示例值

描述

Action

String

PCAlarmMetricTrend

请求名称。

Version

String

2022-10-28

请求版本。

Body

参数

类型

是否必选

示例值

描述

common

object of common

-

通用参数。

time_filter

object of time_filter

-

时间过滤。

id

i64

1

报警规则ID。

common

参数

类型

是否必选

示例值

描述

aid

i64

12345

App ID。

env

string

crash

环境信息。

os

string

pc

系统。

time_filter

参数

类型

是否必选

示例值

描述

start_time

i32

1655308800

开始时间。

granularity

i32

3

聚合颗粒度,单位为秒。

end_time

i32

1655971939

结束时间。

返回参数

参数

类型

示例值

描述

data

string

success

返回数据。

error_msg

string

""

错误信息。

error_no

i64

200

错误码。

请求示例

POST /?Action=PCAlarmMetricTrend&Version=2022-10-28 
{
    "common": {
        "aid": 12345,
        "os": "pc",
        "env": "crash",
        "site_type": ""
    },
    "time_filter": {
        "start_time": 1655308800,
        "end_time": 1655971939,
        "granularity": 3
    },
    "id": 1
}

返回示例

正常返回示例

{
    "data": {},
    "errmsg": "",
    "errno": 200
}

异常返回示例

{
    "ResponseMetadata": {
        "RequestId": "2018****22D30",
        "Action": "PCAlarmMetricTrend",
        "Version": "2022-10-28",
        "Service": "***",
        "Region": "cn-north-1",
        "Error": {
            "Code": "200000",
            "Message": "参数异常"
        }
    }
}