Updated on 2025-11-25 GMT+08:00

Obtaining User Events

Function

This API is used to obtain user events.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/events

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For how to obtain it, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 1 to 64 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. For details, see Token-based Authentication.

Constraints

N/A

Range

The value can contain 1 to 32,768 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

count

Integer

Definition

Number of event records

Constraints

A maximum of 1,000 events in the last 15 days are displayed.

Range

The value is an integer ranging from 0 to 1,000.

Default Value

N/A

Example Requests

Obtain user events.

GET https://{Endpoint}/v1/{project_id}/events

Example Responses

Status code: 200

Normal response

{
  "count" : 3,
  "events" : {
    "id" : "din2BpkxuPmgS5bsRvl",
    "severity" : 0,
    "category" : 1,
    "description" : "call scale from 2 to 1",
    "type_name" : "Auto scaling succeeded",
    "type_id" : "dis_event.004",
    "occur_time" : 1756386086191,
    "source_name" : "dis-6JVW",
    "source_id" : "i0ZVgb1OwCllXVuUgZI"
  }
}

Status Codes

Status Code

Description

200

Normal response

Error Codes

See Error Codes.