JS错误

查询JS错误列表

方法:post

http://${域名}/browser-api/jserror/jsError-list

请求参数

示例:

{
    "datasource": "BRS_JSERR",
    "dimensions": [
        "fileName"
    ],
    "endTime": "2022-02-15 16:07",  //结束时间
    "filters": [
        {
            "name": "browserApplicationId",
            "operator": "IN",
            "value": [
                13   //应用id
            ]
        },
        {
            "name": "ignoreError",    //是否展示忽略的js错误,取消该参数:显示已忽略的JS错误 
            "operator": "=",
            "value": [
                1
            ]
        }
    ],
    "limit": -1,
    "metrics": [
        "uvTotal",
        "jsErrorCount",
        "errorPv",
        "fileErrorPv",
        "jserrorPercent"
    ],
    "render": "list",
    "timePeriod": 43200  //时间段
}

返回参数

字段 类型 说明
code Number 接口返回状态:200:成功;401:无权限;400:请求参数错误;其他:失败
msg String 成功返回:success
data Object 返回列表数据

请求示例

URL:

http://${域名}/browser-api/jserror/jsError-list

Body:

{"timePeriod":43200,"endTime":"2022-02-15 16:07","datasource":"BRS_JSERR","metrics":["uvTotal","jsErrorCount","errorPv","fileErrorPv","jserrorPercent"],"dimensions":["fileName"],"filters":[{"name":"browserApplicationId","operator":"IN","value":[13]}],"limit":-1,"render":"list"}

返回示例

{
    "code": 200,
    "data": [
        {
            "errorPv": 1,  
            "fileErrorPv": 1,
            "fileName": "http://127.0.0.1:8080/beta1/index_saas30_beta.html",  //js文件名
            "jsErrorCount": 1, //错误次数
            "jserrorPercent": 100.0,  //错误占比
            "uvTotal": 1 //影响用户数
        }
    ],
    "message": "success"
}
© 2007-2023 北京基调网络股份有限公司 all right reserved,powered by Gitbook本文档更新于: 2023-12-18 16:44

results matching ""

    No results matching ""