Queries events.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListTopics

The operation that you want to perform. Set the value to ListTopics.

BeginTime String Yes 2019-03-24T00:00:00+0800

The beginning of the time range to query. Specify the time in the yyyy-MM-dd'T'HH:mm:ssZ format. The time must be in UTC.

EndTime String Yes 2019-03-25T23:00:00+0800

The end of the time range to query. Specify the time in the yyyy-MM-dd'T'HH:mm:ssZ format. The time must be in UTC.

TopicTypes String No ERROR,SLOW

The type of the event. Valid values: SLOW and ERROR. The value SLOW indicates that the duration of the task is significantly longer than the average duration of the task in previous cycles. The value ERROR indicates that the task fails to run. You can specify multiple types. Separate them with commas (,).

TopicStatuses String No IGNORE,NEW,FIXING,RECOVER

The status of the event. Valid values: IGNORE, NEW, FIXING, and RECOVER. The value IGNORE indicates that the event is ignored. The value NEW indicates that the event is a new event. The value FIXING indicates that the event is being processed. The value RECOVER indicates that the event is processed. You can specify multiple states. Separate them with commas (,).

NodeId Long No 1234

The ID of the node that triggers the event. If you configure this parameter, you do not need to configure the InstanceId parameter.

InstanceId Long No 12345

The ID of the node instance that triggers the event. If you configure this parameter, you do not need to configure the NodeId parameter.

Owner String No 952795****

The ID of the Alibaba Cloud account used by the event owner.

PageNumber Integer Yes 1

The number of the page to return. Valid values: 1 to 30. Default value: 1.

PageSize Integer Yes 10

The number of entries to return on each page. Default value: 10. Maximum value: 100.

Response parameters

Parameter Type Example Description
HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String 0000-ABCD-EFG****

The ID of the request. You can use the ID to troubleshoot issues.

ErrorMessage String The specified parameters are invalid.

The error message returned.

ErrorCode String 1031203110005

The error code returned.

Success Boolean true

Indicates whether the request was successful.

Data Object

The list of returned events.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

TotalCount Integer 100

The total number of events returned.

Topics Array of Topics

The list of events.

TopicName String 1234 error

The name of the event.

ProjectId Long 1234

The ID of the workspace to which the node belongs.

NodeOwner String 952795****

The ID of the Alibaba Cloud account used by the node owner.

InstanceId Long 12345

The ID of the instance that triggered the event.

FixTime Long 1553508465000

The timestamp when the event was processed.

TopicType String ERROR

The type of the event. Valid values: SLOW and ERROR. The value SLOW indicates that the duration of the task is significantly longer than the average duration of the task in previous cycles. The value ERROR indicates that the task fails to run.

TopicStatus String NEW

The status of the event. Valid values: IGNORE, NEW, FIXING, and RECOVER. The value IGNORE indicates that the event is ignored. The value NEW indicates that the event is a new event. The value FIXING indicates that the event is being processed. The value RECOVER indicates that the event is processed.

HappenTime Long 1553508465000

The timestamp when the event occurred. A time difference may exist between the time when the event occurred and the time when the event was found.

NodeName String Node name

The name of the node.

TopicId Long 1234

The ID of the event.

AddTime Long 1553524393000

The timestamp when the event was found.

NodeId Long 1234

The ID of the node that triggered the event.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTopics
&BeginTime=2019-03-24T00:00:00+0800
&EndTime=2019-03-25T23:00:00+0800
&TopicTypes=ERROR,SLOW
&TopicStatuses=IGNORE,NEW,FIXING,RECOVER
&NodeId=1234
&InstanceId=12345
&Owner=952795****
&PageNumber=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTopicsResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <RequestId>0000-ABCD-EFG****</RequestId>
    <ErrorMessage>The specified parameters are invalid.</ErrorMessage>
    <ErrorCode>1031203110005</ErrorCode>
    <Success>true</Success>
    <Data>
        <PageNumber>1</PageNumber>
        <PageSize>10</PageSize>
        <TotalCount>100</TotalCount>
        <Topics>
            <TopicName>1234 error</TopicName>
            <ProjectId>1234</ProjectId>
            <NodeOwner>952795****</NodeOwner>
            <InstanceId>12345</InstanceId>
            <FixTime>1553508465000</FixTime>
            <TopicType>ERROR</TopicType>
            <TopicStatus>NEW</TopicStatus>
            <HappenTime>1553508465000</HappenTime>
            <NodeName>Node name</NodeName>
            <TopicId>1234</TopicId>
            <AddTime>1553524393000</AddTime>
            <NodeId>1234</NodeId>
        </Topics>
    </Data>
</ListTopicsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/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 error",
      "ProjectId" : 1234,
      "NodeOwner" : "952795****",
      "InstanceId" : 12345,
      "FixTime" : 1553508465000,
      "TopicType" : "ERROR",
      "TopicStatus" : "NEW",
      "HappenTime" : 1553508465000,
      "NodeName" : "Node name",
      "TopicId" : 1234,
      "AddTime" : 1553524393000,
      "NodeId" : 1234
    }
  }
}

Error codes

HTTP status code Error code Error message Description
429 Throttling.Api The request for this resource has exceeded your available limit. The error message returned because the number of requests for the resource has exceeded the upper limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit. The error message returned because the number of requests per day for the resource has exceeded the upper limit.
429 Throttling.System The DataWorks system is busy. Try again later. The error message returned because the DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later. The error message returned because excessive requests have been submitted within a short period of time. Try again later.
500 Forbidden.Not.Server The dataworksAPI service is not available in this area. Please try it in another area. The error message returned because the DataWorks API is unavailable in this region. Try another region.
500 InternalError.System An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.

For a list of error codes, see Service error codes.