调用PCAlarmCandidate接口查看过滤项的可选值。
请求参数
Query
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
Action | String | 是 | PCAlarmCandidate | 请求名称 |
Version | String | 是 | 2022-10-28 | 请求版本 |
Body
common
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
aid | i64 | 是 | 12345 | App ID |
env | string | 否 | crash | 环境信息 |
os | string | 是 | pc | 系统 |
flex_param
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
start_time | i32 | 是 | 1668156081 | 开始时间 |
end_time | i32 | 是 | 1668156081 | 结束时间 |
measure_list | array of measure_list | 是 | - | 相关指标列表 |
filter_name | string | 是 | os | 过滤字段名称 |
measure_list
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
type | string | 是 | monomial | 指标类型 monomial polynomial |
raw_measure_list | array of raw_measure_list | 是 | - | 具体查询指标 |
name | string | 是 | 崩溃影响用户数 | 指标名称 |
customId | string | 否 | xe3ejx98 | 前端用于还原页面 |
raw_measure_list
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
measure_name | string | 是 | "{\metric\:\pc_flexible.count\,\event_dimension\:\pc_flexible.event_name\,\event_name\:\test_service_gyf\}" | 具体的指标计算值 |
filter_list | array of filter_list | 否 | - | 过滤条件 |
event_name | string | 否 | test_service_gyf | 前端传了此参数, 后端没有用到,但是还原图表的时候是从这个字段读的事件名 |
filter_list
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
op | string | 是 | in | 过滤方式 |
filter_name | string | 是 | cpu | 用于表明filter的哪个维度 |
values | array of string | 是 | ["intel", "Qualcomm"] | 过滤值 |
返回参数
参数 | 类型 | 示例值 | 描述 |
---|
data | object of data | - | 返回内容 |
errmsg | string | "" | 错误信息,成功为空 |
errno | i32 | 200 | 错误码,成功为200 |
data
candidate_list
参数 | 类型 | 示例值 | 描述 |
---|
label | string | windows | 展示值 |
value | string | windows | 候选值 |
示例
请求示例
POST /?Action=PCAlarmCandidate&Version=2022-10-28
{
"common": {
"aid": 12345,
"os": "pc",
"env": "crash",
"site_type": ""
},
"flex_param": {
"start_time": 1668156081,
"end_time": 1668156081,
"measure_list": [
{
"type": "monomial",
"raw_measure_list": [
{
"measure_name": "\"{\\metric\\:\\pc_flexible.count\\,\\event_dimension\\:\\pc_flexible.event_name\\,\\event_name\\:\\test_service_gyf\\}\"",
"filter_list": [
{
"op": "in",
"filter_name": "cpu",
"values": [
"intel",
"Qualcomm"
]
}
],
"event_name": "test_service_gyf"
}
],
"name": "崩溃影响用户数",
"customId": "xe3ejx98"
}
],
"filter_name": "os"
}
}
正常返回示例
{
"errno": 200,
"data": {
"candidate_list": [
{
"value": "windows",
"label": "windows"
}
]
},
"errmsg": ""
}
异常返回示例
{
"ResponseMetadata": {
"RequestId": "201806041104200100100232280022D30",
"Action": "PCAlarmCandidate",
"Version": "2022-10-28",
"Service": "***",
"Region": "cn-north-1",
"Error": {
"Code": "200000",
"Message": "参数异常"
}
}
}