Queries the events that occurred in an application.

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 headers

This operation does not have operation-specific request headers and uses only common request headers. For more information, see Common request and response headers.

Request syntax

GET /pop/v1/sam/app/listAppEvents HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
CurrentPage Integer Query No 1

The number of the page to return.

PageSize Integer Query No 10

The number of entries to return on each page. Valid values: 0 to 10000.

AppId String Query No f7730764-d88f-4b9a-8d8e-cd8efbfe****

The ID of the application.

ObjectKind String Query No Pod

The type of the object. Valid values:

  • Deployment: an application.
  • Pod: an application instance.
  • Service: a Server Load Balancer (SLB) instance.
  • HorizontalPodAutoscaler: an auto scaling policy.
  • CloneSet: an application.
ObjectName String Query No errew-b86bf540-b4dc-47d8-a42f-b4997c14bd8f-5595cbddd6-x****

The name of the object. Fuzzy search by prefix is supported.

EventType String Query No Warning

The type of the event. Valid values:

  • Warning: an alert.
  • Normal: a normal event.
Reason String Query No Started

The cause of the event. Fuzzy search by prefix is supported.

Namespace String Query Yes cn-beijing

The ID of the namespace.

Response parameters

Parameter Type Example Description
Message String success

The returned information.

RequestId String B4D805CA-926D-41B1-8E63-7AD0C1ED****

The ID of the request.

Data Object

The events.

CurrentPage Integer 1

The page number of the returned page.

AppEventEntity Array of AppEventEntity

The events.

ObjectKind String Pod

The type of the object.

EventType String Normal

The type of the event.

LastTimestamp String 2020-02-19T05:01:28Z

The timestamp of the last occurrence of the event.

Message String Created container

The information about the event.

ObjectName String errew-b86bf540-b4dc-47d8-a42f-b4997c14bd8f-5595cbddd6-2****

The name of the object.

Reason String Created

The cause of the event.

FirstTimestamp String 2020-02-19T05:01:28Z

The timestamp of the first occurrence of the event.

TotalSize Integer 20

The total number of events that occurred in an application.

PageSize Integer 10

The number of entries returned per page.

ErrorCode String None

The error code. Valid values:

  • If the call is successful, the ErrorCode parameter is not returned.
  • If the call fails, the ErrorCode parameter is returned. For more information, see the "Error codes" section in this topic.
Code String 200

The HTTP status code. Valid values:

  • 2xx: The call was successful.
  • 3xx: The call was redirected.
  • 4xx: The call failed.
  • 5xx: A server error occurred.
Success Boolean true

Indicates whether the events that occurred in the application were queried. Valid values:

  • true: The events were queried.
  • false: The events failed to be queried.

Examples

Sample requests

GET /pop/v1/sam/app/listAppEvents?CurrentPage=1&PageSize=10&AppId=f7730764-d88f-4b9a-8d8e-cd8efbfe****&ObjectKind=Pod&ObjectName=errew-b86bf540-b4dc-47d8-a42f-b4997c14bd8f-5595cbddd6-x****&EventType=Warning&Reason=Started&Namespace=cn-beijing HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json

Sample success responses

XML format

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

<ListAppEventsResponse>
    <Message>success</Message>
    <RequestId>B4D805CA-926D-41B1-8E63-7AD0C1ED****</RequestId>
    <Data>
        <CurrentPage>1</CurrentPage>
        <AppEventEntity>
            <ObjectKind>Pod</ObjectKind>
            <EventType>Normal</EventType>
            <LastTimestamp>2020-02-19T05:01:28Z</LastTimestamp>
            <Message>Created container</Message>
            <ObjectName>errew-b86bf540-b4dc-47d8-a42f-b4997c14bd8f-5595cbddd6-2****</ObjectName>
            <Reason>Created</Reason>
            <FirstTimestamp>2020-02-19T05:01:28Z</FirstTimestamp>
        </AppEventEntity>
        <TotalSize>20</TotalSize>
        <PageSize>10</PageSize>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</ListAppEventsResponse>

JSON format

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

{
  "Message" : "success",
  "RequestId" : "B4D805CA-926D-41B1-8E63-7AD0C1ED****",
  "Data" : {
    "CurrentPage" : 1,
    "AppEventEntity" : [ {
      "ObjectKind" : "Pod",
      "EventType" : "Normal",
      "LastTimestamp" : "2020-02-19T05:01:28Z",
      "Message" : "Created container",
      "ObjectName" : "errew-b86bf540-b4dc-47d8-a42f-b4997c14bd8f-5595cbddd6-2****",
      "Reason" : "Created",
      "FirstTimestamp" : "2020-02-19T05:01:28Z"
    } ],
    "TotalSize" : 20,
    "PageSize" : 10
  },
  "Code" : "200",
  "Success" : true
}

Error codes

HTTP status code Error code Error message Description
400 get.event.error Failed to obtain event information. The error message returned because the events that occurred in the application failed to be obtained.
400 InvalidParameter.NotEmpty You must specify the parameter %s. The error message returned because the value of the %s parameter is invalid. This parameter cannot be left empty.

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