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

GetAppExceptionalBatteryIssueDetail

最近更新时间2024.04.25 17:57:49

首次发布时间2024.04.25 17:57:49

获取App电量异常问题详情。

请求说明

  • 请求方式:POST
  • 请求地址:?Action=GetAppExceptionalBatteryIssueDetail&Version=2024-04-09

ServiceName : apmplus_openapi
Region : cn-beijing
X-App-Ids : xxx
Content-Type : application/json

请求参数

Query

参数

类型

是否必选

示例值

描述

Action

String

GetAppExceptionalBatteryIssueDetail

接口名称。当前 API 的名称为 GetAppExceptionalBatteryIssueDetail

Version

String

2024-04-09

接口版本。当前 API 的版本为 2024-04-09

Body

参数

类型

是否必选

示例值

描述

start_time

Integer

1619827200

查询起始时间(Unix时间戳)。

end_time

Integer

1619913600

查询结束时间(Unix时间戳)。

filters

Object of Condition

-

筛选条件,可以指定多个键值对来筛选数据。

is_new

Integer

1

新增issue。

  • 1:是新增issue
  • 0:不是新增issue

issue_id

String

issue_12345

问题标识ID。

token

String

keyword

搜索关键字。

Condition

参数

类型

是否必选

示例值

描述

op

String

in

操作符。

  • gt:大于
  • gte:大于等于
  • lt:小于
  • lte:小于等于
  • eq:等于
  • neq:不等于
  • in:包含
  • not_in:不包含
  • lk:like
  • nlk:not like
  • regex:正则匹配
  • not_null:非正则匹配

type

String

expression

筛选条件类型。

  • expression:当前condition是一个表达式
  • and:当前condition是一个复合表达式,多个sub_condition的逻辑关系是and
  • or:当前condition是一个复合表达式,多个sub_condition的逻辑关系是or
  • map:当前condition是map类型

value

String

123456

筛选值。

values

Array of String

[123456]

筛选值,支持多个。

map_key

String

key_1

map类型key,当type为map时必填。

dimension

String

aid

条件的名称。

sub_conditions

Array of Condition

-

子条件。

返回参数

参数

类型

示例值

描述

data

Object of BatteryTraceIssueDetailData

-

返回内容。

error_msg

String

-

错误信息。

error_no

Integer

0

错误码。

BatteryTraceIssueDetailData

参数

类型

示例值

描述

issue

Object of IssueInfo

-

问题状态相关信息,包括责任人和状态。

stack

Object of ParsedStack

-

堆栈相关信息。

trace_cnt

Integer

100

错误次数。

trace_user

Integer

50

影响人数。

trace_ratio

Double

0.05

错误率。

last_event_time

Integer

1619895600

最新事件时间(Unix时间戳)。

first_event_time

Integer

1619823600

首次事件时间(Unix时间戳)。

last_report_time

Integer

1619899200

最近一次报告时间(Unix时间戳)。

trace_user_ratio

Double

0.025

影响用户比例。

trace_cnt_compare

Double

0.1

错误次数变化率。

trace_user_compare

Double

0.2

影响人数变化率。

trace_ratio_compare

Double

0.01

错误率变化率。

trace_user_ratio_compare

Double

0.005

影响用户比例变化率。

IssueInfo

参数

类型

示例值

描述

id

Long

1112121

issue在mysql里的ID,不同于issue_id。

tag

Array of Tags

-

标签。

status

String

processing

issue状态。

  • pending:未修复
  • processing:修复中
  • ignored:已忽略
  • solved:已修复
  • reopen:重复出现

fixed_version

String

v1.1.2

修复版本号。

ParsedStack

参数

类型

示例值

描述

brief

String

Crash due to null object reference

堆栈的简要描述。

title

String

NullPointerException

堆栈标题。

detail

String

at com.example.myapp.MainActivity.onCreate

堆栈详情。

Tags

参数

类型

示例值

描述

id

Long

301

tag ID。

key

String

component

tag key。

values

Array of ValueId

-

tag value。

ValueId

参数

类型

示例值

描述

id

Long

201

tag valueID。

value

String

production

tag value。

请求示例

POST ?Action=GetAppExceptionalBatteryIssueDetail&Version=2024-04-09
{
    "start_time": 1619827200,
    "end_time": 1619913600,
    "filters": {
        "type": "and",
        "sub_conditions": [
            {
                "dimension": "apm_version",
                "type": "expression",
                "op": "in",
                "values": [
                    "1.4.5"
                ]
            },
            {
                "dimension": "device_model",
                "type": "expression",
                "op": "in",
                "values": [
                    "MI 5X"
                ]
            }
        ]
    },
    "is_new": 1,
    "issue_id": "issue_12345",
    "token": "keyword"
}

返回示例

{
    "data": {
        "issue": {
            "id": 1112121,
            "tag": [
                {
                    "id": 301,
                    "key": "component",
                    "values": [
                        {
                            "id": 201,
                            "value": "production"
                        }
                    ]
                }
            ],
            "status": "processing",
            "fixed_version": "v1.1.2"
        },
        "stack": {
            "brief": "Crash due to null object reference",
            "title": "NullPointerException",
            "detail": "at com.example.myapp.MainActivity.onCreate"
        },
        "trace_cnt": 100,
        "trace_user": 50,
        "trace_ratio": 0.05,
        "last_event_time": 1619895600,
        "first_event_time": 1619823600,
        "last_report_time": 1619899200,
        "trace_user_ratio": 0.025,
        "trace_cnt_compare": 0.1,
        "trace_user_compare": 0.2,
        "trace_ratio_compare": 0.01,
        "trace_user_ratio_compare": 0.005
    },
    "error_msg": "",
    "error_no": 0
}