调用ListTopics获取或搜索事件列表。
接口说明
前置条件:调用本接口前,请先开通 DataWorks 企业版或旗舰版;未开通时服务会返回 403 Forbidden.Access。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| BeginTime |
string |
是 |
起始发现时间,需要使用 UTC 格式(yyyy-MM-dd'T'HH:mm:ssZ)。 |
2019-03-24T00:00:00+0800 |
| EndTime |
string |
是 |
截止发现时间,需要使用 UTC 格式(yyyy-MM-dd'T'HH:mm:ssZ)。 |
2019-03-25T23:00:00+0800 |
| TopicTypes |
string |
否 |
事件的类型,包括 SLOW(变慢)和 ERROR(出错)。多个事件类型之间使用英文逗号(,)分隔。 |
ERROR,SLOW |
| TopicStatuses |
string |
否 |
事件的状态,包括 IGNORE(已忽略)、NEW(新发现)、FIXING(处理中)和 RECOVER(已恢复)。多个事件状态之间使用英文逗号(,)分隔。 |
IGNORE,NEW,FIXING,RECOVER |
| NodeId |
integer |
否 |
事件关联的任务节点 ID,与参数 InstanceId 互斥。 |
1234 |
| InstanceId |
integer |
否 |
事件关联的实例 ID,与参数 NodeId 互斥。 |
12345 |
| Owner |
string |
否 |
事件责任人的阿里云 UID。 |
952795**** |
| PageNumber |
integer |
是 |
分页的页数。默认值为 1,最小值为 1,最大值为 30。 |
1 |
| PageSize |
integer |
是 |
每页显示的条数,默认为 10 条,最大 100 条。 |
10 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| HttpStatusCode |
integer |
HTTP 返回码。 |
200 |
| RequestId |
string |
本次调用的唯一 ID。出现错误后,您可以根据该 ID 排查问题。 |
0000-ABCD-EFG**** |
| ErrorMessage |
string |
错误信息。 |
The specified parameters are invalid. |
| ErrorCode |
string |
错误码。 |
1031203110005 |
| Success |
boolean |
调用是否成功。 |
true |
| Data |
object |
返回的事件列表。 |
|
| PageNumber |
integer |
当前的页数。 |
1 |
| PageSize |
integer |
每页的大小。 |
10 |
| TotalCount |
integer |
事件的总数。 |
100 |
| Topics |
array<object> |
事件列表。 |
|
|
object |
|||
| TopicName |
string |
事件的名称。 |
1234出错 |
| ProjectId |
integer |
任务节点所在工作空间的 ID。 |
1234 |
| NodeOwner |
string |
任务节点责任人的阿里云 UID |
952795**** |
| InstanceId |
integer |
事件关联的实例 ID。 |
12345 |
| FixTime |
integer |
事件恢复的时间戳。 |
1553508465000 |
| TopicType |
string |
事件的类型,包括 SLOW(变慢)和 ERROR(出错)。 |
ERROR |
| TopicStatus |
string |
事件的状态,包括 IGNORE(已忽略)、NEW(新发现)、FIXING(处理中)和 RECOVER(已恢复)。 |
NEW |
| HappenTime |
integer |
事件发生的时间戳,事件发生和被发现存在一定的时间差。 |
1553508465000 |
| NodeName |
string |
任务节点的名称。 |
节点名称 |
| TopicId |
integer |
事件的 ID。 |
1234 |
| AddTime |
integer |
事件发现的时间戳。 |
1553524393000 |
| NodeId |
integer |
事件关联的任务节点 ID。 |
1234 |
示例
正常返回示例
JSON格式
{
"HttpStatusCode": 200,
"RequestId": "0000-ABCD-EFG****",
"ErrorMessage": "The specified parameters are invalid.",
"ErrorCode": "1031203110005",
"Success": true,
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 100,
"Topics": [
{
"TopicName": "1234出错",
"ProjectId": 1234,
"NodeOwner": "952795****",
"InstanceId": 12345,
"FixTime": 1553508465000,
"TopicType": "ERROR",
"TopicStatus": "NEW",
"HappenTime": 1553508465000,
"NodeName": "节点名称",
"TopicId": 1234,
"AddTime": 1553524393000,
"NodeId": 1234
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 500 | Forbidden.Not.Server | The dataworksAPI service is not available in this area. Please try it in another area. | |
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | 没有权限,请授权 |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.Api.Risk | The request for this resource has exceeded your daily available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。