Querying Historical Wait Events
Function
This API is used to query historical wait events.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about the request header parameters.
Authorization Information
- 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:instance:getWaitEvent | list | - | g:EnterpriseProjectId g:ResourceTag/<tag-key> | - | - |
Constraints
This API is available only for RDS for PostgreSQL.
URI
- URI format
GET /v3/{project_id}/instances/{instance_id}/history-wait-event?start_time={start_time}&end_time={end_time}
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
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
instance_id
Yes
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
start_time
Yes
Definition
Start time.
Constraints
The value is in the UTC timestamp format.
Range
N/A
Default Value
N/A
end_time
Yes
Definition
End time.
Constraints
The value is in the UTC timestamp format.
Range
N/A
Default Value
N/A
offset
No
Definition
Index offset. If offset is set to N, the query starts from the N+1 piece of data. The value 0 indicates that the query starts from the first piece of data.
Constraints
The value must be a non-negative number.
Range
An integer greater than or equal to 0
Default Value
0
limit
No
Definition
Number of records returned by a query.
Constraints
N/A
Range
[1, 1000]
Default Value
100
Request
None
Example Request
Query historical wait events.
GET https://{Endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/24c6678f474241fe89ee9c42f768022ein03/history-wait-event?start_time=1764669600000&end_time=1765249000000 Response
- Normal response
Table 2 Parameters Parameter
Type
Description
total_count
Integer
Definition
Total number of records.
Range
N/A
events
Array of objects
Definition
Event list.
For details, see Table 3.
Table 3 events field description Parameter
Type
Description
sample_time
String
Definition
Sampling time.
Range
N/A
count
Integer
Definition
Quantity.
Range
N/A
session_status
String
Definition
Session status.
Range
N/A
wait_event_type
String
Definition
Type of the wait event.
Range
N/A
wait_event_name
String
Definition
Name of the wait event.
Range
N/A
- Example normal response
{ "events" : [ { "sample_time" : "2025-12-02 18:03:27", "count" : 1, "session_status" : "", "wait_event_type" : "", "wait_event_name" : "" } ], "total_count" : 1 } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot