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

PCTopAnalysis

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

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

调用PCTopAnalysis接口查看崩溃指标在多维分析后的分布情况。

请求参数

Query

参数

类型

是否必选

示例值

描述

Action

String

PCCrashTopAnalysis

请求名称。

Version

String

2022-10-28

请求版本。

Body

参数

类型

是否必选

示例值

描述

app_id

i32

12345

App ID。

error_field

string

user

统计字段。

  • user:用户数
  • count:总数

top_analysis_fields

array of string

["os", "cpu"]

维度字段。

start_time

i32

1656288235

开始时间。

end_time

i32

1656288235

结束时间。

filters

object of filters

-

过滤条件。

issue_ids

array of string

["bf1b6a03a99"]

分析崩溃ID。

region

string

cn

区域,默认cn。

crash_time_type

string

server_time

时间类型。

  • server_time:服务端时间
  • client_time:客户端时间

is_first_issue

boolean

false

是否为新发现的issue。

issue_levels

array of string

[]

过滤issue等级。

search_type

i32

1

堆栈过滤方式。

  • 0:字符串
  • 1:正则

search_text

string

stack info

堆栈过滤字段。

tag_op

string

not_in

tag 过滤方式。

  • not_in:不包含
  • in:包含

issue_tags

array of issue_tags

[{group_id: 99, tag_id: 146}]

tag列表。

top_analysis_context_fields

array of string

["contxt_key1"]

分析context中的字段列表。

lang

string

zh

国际化语言类型。

crash_type

string

""

崩溃类型,pc_jank或者空。

filters

参数

类型

是否必选

示例值

描述

type

string

and

条件类型。

  • and
  • or

op

string

in

查找类型。

  • in
  • >
  • <

dimension

string

dim1

过滤维度。

values

array of string

["1", "2"]

维度值。

sub_conditions

array of sub_conditions

[ { "dimension": "parse_success", "op": "in", "values": [ "1" ], "groupKey": "dimension" } ]

具体条件。

issue_tags

参数

类型

是否必选

示例值

描述

tag_id

i32

1

标签ID。

group_id

i32

1

标签组ID。

sub_conditions

参数

类型

是否必选

示例值

描述

type

string

and

条件类型。

  • and
  • or

op

string

in

查找类型。

  • in
  • >
  • <

dimension

string

dim1

过滤维度。

values

array of string

["1", "2"]

维度值。

sub_conditions

array of string

[ { "dimension": "parse_success", "op": "in", "values": [ "1" ], "groupKey": "dimension" } ]

具体条件。

返回参数

参数

类型

示例值

描述

data

object of data

-

返回内容。

errmsg

string

""

错误信息,成功为空。

errno

i32

200

错误码,成功为200。

data

参数

类型

示例值

描述

source

array of source

[{label: "系统", data: [{dimension_field: "windows", value: 1}]}]

分析结果。

source

参数

类型

示例值

描述

label

string

系统

维度名。

data

array of data

[{dimension_field: "windows", value: 1}]

维度值列表。

data

参数

类型

示例值

描述

dimension_field

string

windows

维度值。

count

i32

1

统计值。

请求示例

POST /?Action=PCCrashTopAnalysis&Version=2022-10-28 
{
    "app_id": 12345,
    "error_field": "user",
    "top_analysis_fields": [
        "os",
        "cpu"
    ],
    "start_time": 1656288235,
    "end_time": 1656288235,
    "lang": "zh",
    "search_type": 1,
    "top_analysis_context_fields": [
        "contxt_key1"
    ],
    "tag_op": "not_in",
    "search_text": "stack info",
    "issue_tags": [
        {
            "group_id": 1,
            "tag_id": 1
        }
    ],
    "issue_levels": [],
    "is_first_issue": true,
    "region": "cn",
    "filters": {
        "values": [
            "1",
            "2"
        ],
        "op": "in",
        "sub_conditions": [
            {
                "dimension": "parse_success",
                "op": "in",
                "values": [
                    "1"
                ],
                "groupKey": "dimension"
            }
        ],
        "type": "and",
        "dimension": "dim1"
    },
    "issue_ids": [
        "bf1b6a03a99"
    ],
    "crash_type": "",
    "crash_time_type": "server_time"
}

返回示例

正常返回示例

{
    "errmsg": "",
    "errno": 200,
    "data": {
        "source": [
            {
                "data": [
                    {
                        "dimension_field": "windows",
                        "count": 1
                    }
                ],
                "label": "系统"
            }
        ]
    }
}

异常返回示例

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