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

MiniProJsTrendOverview

最近更新时间2024.05.08 17:48:42

首次发布时间2024.04.03 17:37:04

调用MiniProJsTrendOverview查看JS错误趋势总览。

请求说明

  • 请求方式:POST
  • 请求地址:?Action=MiniProJsTrendOverview&Version=2024-03-12

请求参数

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

Query

参数类型是否必选示例值描述
ActionStringMiniProJsTrendOverview接口名称。当前 API 的名称为 MiniProJsTrendOverview
VersionString2024-03-12接口版本。当前 API 的版本为 2024-03-12

Body

参数类型是否必选示例值描述
commonObject of Common-通用参数。
time_filterObject of Time_filter-时间区间。
filter_conditionsObject of Filter_conditions-筛选条件。

Common

参数类型是否必选示例值描述
aidLong12345应用ID。
site_typeStringweb站点类型。
envStringonline环境,填""时为全部。
osStringwebpro服务类型。可选值为appwebprominipro
userStringtest_user用户名。

Time_filter

参数类型是否必选示例值描述
start_timeInteger1665485413起始时间。单位s。
granularityInteger3600聚合时间粒度。单位s。
end_timeInteger1665744613终止时间。单位s。

Filter_conditions

参数类型是否必选示例值描述

type

String

and

筛选条件类型。

  • and:children中的条件为“与”关系。
  • rule:当前条件为原子条件。
    只支持两层,第一层的type必须为and,第二层的type必须为rule。
childrenArray of Children-子参数。当type值为and时必填。

Children

参数类型是否必选示例值描述

type

String

rule

筛选条件类型。

  • and:children中的条件为“与”关系。
  • rule:当前条件为原子条件。
    只支持两层,第一层的type必须为and,第二层的type必须为rule。
fieldStringpid条件字段key,可选值集合由GetFieldKeys方法获取。
opStringin条件符号,可选值有eq,neq,lt,lte,gt,gte,in,not_in,regex,not_regex。
groupKeyStringcontextmap类型字段key,可选值集合由GetFieldKeys方法获取。
valuesArray of String[数据探索]条件值,可选值集合由GetFieldValues方法获取。

children

Array of Children

-

筛选条件类型。

  • and:children中的条件为“与”关系。
  • rule:当前条件为原子条件。

    只支持两层,第一层的type必须为and,第二层的type必须为rule。

返回参数

参数类型示例值描述
dataObject of Data-总览趋势。
error_noInteger0错误码。0为成功。
error_msgString-错误信息。空为成功。

Data

参数类型示例值描述
chartObject of Chart-自定义事件上报趋势。
infoArray of Info-自定义事件总览值。
extraObject of Extra-自定义事件额外信息。

Chart

参数类型示例值描述
fieldsArray of Fields-折线图/饼图维度,len(fields)=len(source[i])。
sourceArray of String[["1668355200","js_error","0","0"]]趋势图具体点的集合,len(source)为折线图点的数量或者饼图中块数量。

Info

参数类型示例值描述
idStringcount汇总值key。
nameString白屏数汇总值名。
countString1汇总值。
unitStringms汇总单位。
changeString1.0环比。

Extra

参数类型示例值描述
release_infoArray of Release_info-版本发布情况。

Fields

参数类型示例值描述
idStringdate维度key。
dataTypeStringstring维度类型。
nameString日期维度名。
aggregateString-聚合方式。

Release_info

参数类型示例值描述
create_atInteger1668483578版本发布时间。
releaseStringv2.2.123版本。
envStringtest版本发布环境。
commitString[]版本相关commit。

请求示例

POST ?Action=MiniProJsTrendOverview&Version=2024-03-12
{
    "common": {
        "aid": 12345,
        "site_type": "web",
        "env": "online",
        "os": "webpro",
        "user": "test_user"
    },
    "time_filter": {
        "start_time": 1665485413,
        "end_time": 1665744613,
        "granularity": 3600
    },
    "filter_conditions": {
        "type": "and",
        "op": "in",
        "children": [
            {
                "type": "and",
                "children": [
                    {
                        "type": "and",
                        "values": "[数据探索]",
                        "field": "pid",
                        "groupKey": "context",
                        "op": "in",
                        "children": [

                        ]
                    }
                ],
                "op": "in",
                "field": "pid",
                "values": "[数据探索]",
                "groupKey": "context"
            }
        ],
        "field": "pid",
        "groupKey": "context",
        "values": "[数据探索]"
    }
}

返回示例

{
    "error_msg": "",
    "error_no": 0,
    "data": {
        "chart": {
            "source": [
                [
                    "1668355200",
                    "js_error",
                    "0",
                    "0"
                ]
            ],
            "fields": [
                {
                    "dataType": "string",
                    "name": "日期",
                    "aggregate": "",
                    "id": "date"
                }
            ]
        },
        "extra": {
            "release_info": [
                {
                    "env": "test",
                    "create_at": 1668483578,
                    "release": "v2.2.123",
                    "commit": ""
                }
            ]
        },
        "info": [
            {
                "count": "1",
                "unit": "ms",
                "id": "count",
                "name": "白屏数",
                "change": "1"
            }
        ]
    }
}