1. 接口描述
接口请求域名: rum.tencentcloudapi.com 。
错误指纹或 API/资源 URL(含按访问页、状态、标签)排行。读 tdem_events,不走主分析立方 GroupBy。Kind:error/api/resource/api_page/resource_page/api_status/api_status_top/resource_status/tag。 Kind=exception_dimension返回当前普通维度或标签值的同批完整分类计数;展开不另行取数。
默认接口请求频率限制:20次/秒。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| Action | 是 | String | 公共参数,本接口取值:DescribeTDEMEventRank。 |
| Version | 是 | String | 公共参数,本接口取值:2021-06-22。 |
| Region | 否 | String | 公共参数,此参数为可选参数。 |
| AppId | 是 | String | 应用 ID(必填) 示例值:17 |
| StartTime | 是 | Integer | 开始时间 Unix 毫秒(必填) 示例值:1789660800000 |
| EndTime | 是 | Integer | 结束时间 Unix 毫秒(必填) 示例值:1792252800000 |
| Kind | 是 | String | 排行类型:error/api/resource/api_page/resource_page/api_status/api_status_top/resource_status/tag;exception_dimension 为异常维度同源统计,使用 ExceptionDistribution 返回结果。 示例值:exception_dimension |
| EventTypes.N | 否 | Array of String | 旧 Kind 保持既有错误类型过滤规则;Kind=exception_dimension 标签模式必填,允许 js_error、promise_error、api_error、resource_error、blank_screen、log、native_crash、crash、no_response、lag_detected、app_launch。合法重复值去重,未知值拒绝;普通维度模式不传。 示例值:["api_call"] |
| TagKey | 否 | String | 旧 Kind=tag 保持既有标签查询;Kind=exception_dimension 标签模式必填,与 GroupBy 二选一。使用既有标签名规范,长度 1–64,允许字母数字及 _-.;标签值保留原始内容。 示例值:appVersion |
| Limit | 否 | Integer | 返回条数,上限100。旧 Kind 缺省50;Kind=exception_dimension 缺省100,显式值为1–100,限制完整归一化维度行数,不裁剪分类向量。 示例值:100 |
| Granularity | 否 | String | 旧 Kind 可选粒度5m/1h/1d;Kind=exception_dimension 不支持,传非空值返回 InvalidParameter。 示例值:5m |
| Filters | 否 | String | 筛选条件 JSON 字符串,走 events 表白名单 示例值:[{"Key":"app_version","Op":"in","Values":["1.7.0"]},{"Key":"os","Op":"in","Values":["Mac OS X"]},{"Key":"device_type","Op":"in","Values":["Mac"]},{"Key":"resource_url","Op":"in","Values":["xxx"]}] |
| CostType | 否 | String | 旧 Kind 耗时口径 avg/p50/p75/p95/p99;Kind=exception_dimension 不支持,传非空值返回 InvalidParameter。 示例值:avg |
| GroupBy | 否 | String | 异常分布的聚合维度,仅 Kind=exception_dimension 的普通维度模式使用且必填。标签模式只传 TagKey,不传 GroupBy。 枚举值:
示例值:os |
| ProjectType | 否 | String | 仅 Kind=exception_dimension 普通维度模式必填。允许 web、android、ios,须与应用平台及 CategoryKeys 目录一致。标签模式不传。 示例值:web |
| CategoryKeys.N | 否 | Array of String | 仅 Kind=exception_dimension 普通维度模式必填,为页面实际有效的异常目录 key 非空去重集合。仅接受对应 ProjectType 的固定目录,包含项须同时选择父项;未知、重复、空目录及互斥参数组合返回 InvalidParameter。标签模式不传。 示例值:["js_error","promise_error","api_error.http","api_error.business","resource_error.script","resource_error.image","resource_error.stylesheet","resource_error.media","resource_error.lazy_load","blank_screen","log.report","js_error.page_not_found"] |
3. 输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Items | Array of EventRankItem | 排行行 |
| ExceptionDistribution | ExceptionDistribution | 仅 Kind=exception_dimension 返回。Rows 为完整维度行及固定分类向量;空数据返回 Rows=[]。父行 TotalCount 等于 IncludedInTotal=true 的主项 Count 之和,包含项仅展示且不重复计总。所有计数为0至9007199254740991的整数。旧 Kind 继续使用 Items。 |
| RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 查询事件排行
输入示例
POST / HTTP/1.1
Host: rum.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTDEMEventRank
<公共请求参数>
{
"AppId": "7",
"StartTime": 1787404860000,
"EndTime": 1789996860000,
"Kind": "api"
}
输出示例
{
"Response": {
"Items": [
{
"Count": 70,
"Duration": 458.09171540396557,
"URL": "https:******************************************"
}
],
"RequestId": "41829edb-5f4e-43d1-9afa-9ce22fa55f3e"
}
}
示例2 查询异常维度完整分类与包含项
按精确半开时间窗查询Web OS异常分布,返回完整主项、0计数及页面不存在包含项;主项计总,包含项不重复计总。
输入示例
POST / HTTP/1.1
Host: rum.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTDEMEventRank
<公共请求参数>
{
"AppId": "17",
"StartTime": 1789660800000,
"EndTime": 1792252800000,
"Kind": "exception_dimension",
"GroupBy": "os",
"ProjectType": "web",
"CategoryKeys": [
"js_error",
"promise_error",
"api_error.http",
"api_error.business",
"resource_error.script",
"resource_error.image",
"resource_error.stylesheet",
"resource_error.media",
"resource_error.lazy_load",
"blank_screen",
"log.report",
"js_error.page_not_found"
],
"Limit": 100
}
输出示例
{
"Response": {
"ExceptionDistribution": {
"Rows": [
{
"Items": [
{
"Count": 51,
"IncludedInTotal": true,
"Key": "js_error"
},
{
"Count": 0,
"IncludedInTotal": false,
"Key": "js_error.page_not_found",
"ParentKey": "js_error"
},
{
"Count": 49,
"IncludedInTotal": true,
"Key": "promise_error"
},
{
"Count": 282,
"IncludedInTotal": true,
"Key": "api_error.http"
},
{
"Count": 0,
"IncludedInTotal": true,
"Key": "api_error.business"
},
{
"Count": 0,
"IncludedInTotal": true,
"Key": "resource_error.script"
},
{
"Count": 54,
"IncludedInTotal": true,
"Key": "resource_error.image"
},
{
"Count": 0,
"IncludedInTotal": true,
"Key": "resource_error.stylesheet"
},
{
"Count": 0,
"IncludedInTotal": true,
"Key": "resource_error.media"
},
{
"Count": 0,
"IncludedInTotal": true,
"Key": "resource_error.lazy_load"
},
{
"Count": 0,
"IncludedInTotal": true,
"Key": "blank_screen"
},
{
"Count": 0,
"IncludedInTotal": true,
"Key": "log.report"
}
],
"RowKey": "exd1.b3JkaW5hcnk6d2Vi.b3M.TWFjIE9TIFg",
"TotalCount": 436,
"Value": "Mac OS X"
}
]
},
"Items": [],
"RequestId": "1095ed90-eb47-4bc0-a9c1-a038dbae5f90"
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Java: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for PHP: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Go: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Node.js: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for .NET: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for C++: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Ruby: CNB, GitHub, Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
| 错误码 | 描述 |
|---|---|
| AuthFailure | CAM签名/鉴权错误。 |
| AuthFailure.UnauthorizedOperation | 请求未CAM授权 |
| FailedOperation | 操作失败。 |
| FailedOperation.DataBaseException | 数据操作异常 |
| InternalError | 内部错误。 |
| InvalidParameter | 参数错误。 |
| InvalidParameterCombination | 无效参数组合 |
| InvalidParameterValue | 参数取值错误。 |
| LimitExceeded | 超过配额限制。 |
| MissingParameter | 缺少参数错误。 |
| OperationDenied | 操作被拒绝。 |
| RequestLimitExceeded | 请求的次数超过了频率限制。 |
| ResourceInUse | 资源被占用。 |
| ResourceNotFound | 资源不存在。 |
| ResourceUnavailable | 资源不可用。 |
| UnauthorizedOperation | 未授权操作。 |
| UnknownParameter | 未知参数错误。 |