获取错误新增报警情况概览及趋势图。
请求说明 请求方式:POST 请求地址:https://open.volcengineapi.com/?Action=GetWebProNewErrorAlertTrend&Version=2022-10-12 ServiceName : apmplus_openapi
Region : cn-beijing
X-App-Ids : xxx
Content-Type : application/json
请求参数 Query 参数 类型 是否必选 示例值 描述 Action String 是 GetWebProNewErrorAlertTrend
接口名称。当前 API 的名称为 GetWebProNewErrorAlertTrend
。 Version String 是 2022-10-12
接口版本。当前 API 的版本为 2022-10-12
。
Body TimeFilter 参数 类型 是否必选 示例值 描述 start_time Integer 是 1665485413
起始时间,单位s。 end_time Integer 是 1665744613
终止时间,单位s。 granularity Integer 否 3600
聚合时间粒度,单位s。
CommonParams 参数 类型 是否必选 示例值 描述 aid Long 是 12345
应用ID。 site_type String 是 web
站点类型。 env String 是 online
环境,填""时为全部。 os String 否 webpro
服务类型,可选值为webpro ,app ,minipro 。 user String 否 test_user
用户名。
返回参数 AlertTrendResponseData 参数 类型 示例值 描述 alert_trend Object of ChartData -
报警趋势详情。
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 -
聚合方式。
请求示例 POST https:
{
"common" : {
"aid" : 1 ,
"os" : "webpro"
} ,
"time_filter" : {
"start_time" : 1719936000 ,
"end_time" : 1720072371 ,
"granularity" : 3600
} ,
"id" : 1
}
返回示例 {
"alert_trend" : {
"fields" : [
{
"id" : "date" ,
"dataType" : "string" ,
"name" : "date"
} ,
{
"id" : "alarm_count" ,
"dataType" : "number" ,
"name" : "报警总数"
}
] ,
"source" : [
[
"2024-07-03 00:00:00" ,
"0"
] ,
[
"2024-07-04 13:00:00" ,
"0"
]
]
}
}
错误码 本接口无特有的错误码。更多信息请参见错误码 。