All Products
Search
Document Center

:ListAppEvents

Last Updated:Nov 01, 2024

Queries the events that occurred in an application.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
sae:ListAppEventsget
  • All Resources
    *
    none
none

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
CurrentPageintegerNo

The page number of the page to return.

1
PageSizeintegerNo

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

10
AppIdstringNo

The application ID.

f7730764-d88f-4b9a-8d8e-cd8efbfe****
ObjectKindstringNo

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.
Pod
ObjectNamestringNo

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

errew-b86bf540-b4dc-47d8-a42f-b4997c14bd8f-5595cbddd6-x****
EventTypestringNo

The type of the event. Valid values:

  • Warning: an alert.
  • Normal: a normal event.
Warning
ReasonstringNo

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

Started
NamespacestringYes

The namespace ID.

cn-beijing

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

Messagestring

The returned message.

success
RequestIdstring

The request ID.

B4D805CA-926D-41B1-8E63-7AD0C1ED****
Dataobject

The events.

CurrentPageinteger

The number of the returned page.

1
AppEventEntityarray<object>

The events.

AppEventEntityobject

The events.

ObjectKindstring

The type of the object.

Pod
EventTypestring

The type of the event. Valid values:

Normal
LastTimestampstring

The timestamp of the last occurrence of the event.

2020-02-19T05:01:28Z
Messagestring

The information about the event.

Created container
ObjectNamestring

The name of the object.

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

The cause of the event.

Created
FirstTimestampstring

The timestamp of the first occurrence of the event.

2020-02-19T05:01:28Z
TotalSizeinteger

The total number of events that occurred in an application.

20
PageSizeinteger

The number of entries returned per page.

10
ErrorCodestring

The error code returned if the call failed. Take note of the following rules:

  • 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.
Codestring

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.
200
Successboolean

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.
true

Examples

Sample success responses

JSONformat

{
  "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
  },
  "ErrorCode": "",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status codeError codeError message
400get.event.errorFailed to obtain event information.
400InvalidParameter.NotEmptyYou must specify the parameter %s.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history