Updated on 2026-08-25 GMT+08:00

Querying Events

Function

This API is used to query events of a DB instance.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

rds:event:list

list

-

-

-

-

URI

  • URI format

    GET /v3/{project_id}/schedule-events

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    id

    No

    String

    Definition

    Event ID.

    To query information about a specified event, log in to the RDS console and choose Events in the navigation pane on the left to obtain the event ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    If this parameter is not specified, all events are queried.

    instance_id

    No

    String

    Definition

    Instance ID.

    You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    status

    No

    String

    Definition

    Event status.

    Constraints

    N/A

    Range

    • WAITING: The event is waiting.
    • INQUIRING: The event is to be authorized.
    • SCHEDULED: The event is to be executed.
    • EXECUTING: The event is being executed.
    • COMPLETED: The event is complete.
    • FAILED: The event failed.
    • CANCELED: The event is canceled.

    Default Value

    If this parameter is left blank, all statuses are queried.

    type

    No

    String

    Definition

    Event type.

    Constraints

    N/A

    Range

    RESTAT_NODE: Restart an instance node.

    Default Value

    If this parameter is left blank, all types are queried.

    level

    No

    String

    Definition

    Event severity.

    Constraints

    N/A

    Range

    • CRITICAL
    • MAJOR
    • MINOR
    • INFO

    Default Value

    If this parameter is left blank, all severities are queried.

    sort_field

    No

    String

    Definition

    Sorting field.

    Constraints

    N/A

    Range

    • planned_execution_time: sorting by planned execution time
    • created_time: sorting by execution time
    • latest_execution_time: sorting by latest execution time

    Default Value

    Empty: indicates that no sorting is performed.

    order

    No

    String

    Definition

    Sorting order.

    Constraints

    N/A

    Range

    • DESC: descending order
    • ASC: ascending order

    Default Value

    DESC

    offset

    No

    Integer

    Definition

    Index offset. The query starts from the next piece of data indexed by this parameter.

    Constraints

    N/A

    Range

    The value is greater than or equal to 0.

    Default Value

    0: The query starts from the first data record.

    limit

    No

    Integer

    Definition

    Number of records returned by a query.

    Constraints

    N/A

    Range

    1~100

    Default Value

    10

Request

None

Example Request

Query events of a DB instance.

GET https://{Endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/schedule-events?id=67323a8c-75aa-4d81-941e-02621ccd4d07&instance_id=6970e9cf7adc41a78e0f1f50215c9d3bin03&status=INQUIRING&type=RESTAT_NODE&offset=0&limit=50

Response

  • Normal response
    Table 2 Response body parameters

    Parameter

    Type

    Description

    total_count

    Integer

    Definition

    Total number of events.

    Range

    N/A

    inquiring_count

    Integer

    Definition

    Number of events to be authorized.

    Range

    N/A

    schedule_count

    Integer

    Definition

    Number of events to be executed.

    Range

    N/A

    executing_count

    Integer

    Definition

    Number of events being executed.

    Range

    N/A

    failed_count

    Integer

    Definition

    Number of events that failed to be executed.

    Range

    N/A

    events

    Array of objects

    Definition

    Event details list. For details, see Table 3.

    Table 3 events field description

    Parameter

    Type

    Description

    id

    String

    Definition

    Event ID.

    Range

    N/A

    instance_id

    String

    Definition

    Instance ID.

    Range

    N/A

    instance_name

    String

    Definition

    Instance name.

    Range

    N/A

    db_type

    String

    Definition

    DB engine type.

    Range

    • mysql
    • postgresql
    • sqlserver

    created_time

    String

    Definition

    Event creation time.

    Range

    The value is in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.

    update_time

    String

    Definition

    Event update time.

    Range

    The value is in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.

    type

    String

    Definition

    Event type.

    Range

    RESTAT_NODE: Restart an instance node.

    impact

    String

    Definition

    Impact of the event on the system.

    Range

    N/A

    status

    String

    Definition

    Event status.

    Range

    • WAITING: The event is waiting.
    • INQUIRING: The event is to be authorized.
    • SCHEDULED: The event is to be executed.
    • EXECUTING: The event is being executed.
    • COMPLETED: The event is complete.
    • FAILED: The event failed.
    • CANCELED: The event is canceled.

    reason

    String

    Definition

    Cause of the event.

    Range

    N/A

    level

    String

    Definition

    Event severity.

    Range

    • CRITICAL
    • MAJOR
    • MINOR
    • INFO

    execute_time

    String

    Definition

    Event execution time.

    Range

    N/A

    latest_execution_time

    String

    Definition

    Time when the event was last executed.

    Range

    N/A

    execution_time_window

    Array of objects

    Definition

    Time window for event execution. For details, see Table 4.

    Table 4 execution_time_window field description

    Parameter

    Type

    Description

    planned_execution_day

    String

    Definition

    Date of the execution time window.

    Range

    N/A

    start_time

    String

    Definition

    Start time of the time window.

    Range

    The value is a UTC time in the format of HH:mm.

    end_time

    String

    Definition

    End time of the time window.

    Range

    The value is a UTC time in the format of HH:mm.

  • Example normal response
    {
      "total_count": 1,
      "inquiring_count": 1,
      "schedule_count": 0,
      "executing_count": 0,
      "failed_count": 0,
      "events": [
        {
          "id": "created_time",
          "instance_name": "TestInstance",
          "db_type": "postgresql",
          "created_time": "2024-06-30T09:04:35+0800",
          "update_time": "2024-06-30T09:04:35+0800",
          "type": "RESTAT_NODE",
          "impact": "Instance Intermittent Disconnection",
          "status": "INQUIRING",
          "reason": "ECS_RESTART",
          "level": "MAJOR",
          "execute_time": "",
          "latest_execution_time": "",
          "execution_time_window": [{
            "planned_execution_day": "2026-02-14",
            "start_time": "02:00",
            "end_time": "06:00"
          }]
        }
      ]
    }
  • Abnormal response

    For details, see Abnormal Response Results.

Status Code

Error Code

For details, see Error Codes.