Overview
You can call this API to query the anomaly events of an OceanBase Cloud instance in a specified time period. An anomaly event may be a performance anomaly, a resource alert, or a service status change. This helps you monitor the health status of the instance.
API details
Constraints
The caller must have an AccessKey for accessing multi-cloud APIs. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/instances/{instanceId}/anomalyEvents
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | string | Yes | The ID of the OceanBase Cloud instance. | obcluster-***** |
| requestId | string | Yes | The ID of the request, which is used for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
| startTime | string | Yes | The start time of the query period in UTC format. | 2026-02-25 15:40:43+00:00 |
| endTime | string | Yes | The end time of the query period in UTC format. | 2026-02-26 10:40:43+00:00 |
| pageNumber | integer | No | The number of the page to be returned. | 1 |
| pageSize | integer | No | The number of entries on a page. | 10 |
| httpServletRequest | unknown | Yes | The Http servlet request parameter. | - |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | object | The returned data. |
| data.total | integer | The total number of anomaly events. |
| data.list | array | The list of anomaly events. |
| data.list[].eventId | string | The ID of the anomaly event. |
| data.list[].eventType | string | The type of the anomaly event. |
| data.list[].eventLevel | string | The level of the anomaly event. |
| data.list[].eventTime | string | The time when the anomaly event occurred. |
| data.list[].eventDescription | string | The description of the anomaly event. |
| data.list[].instanceId | string | The ID of the OceanBase Cloud instance where the anomaly event occurred. |
| data.list[].instanceName | string | The name of the OceanBase Cloud instance where the anomaly event occurred. |
| data.list[].region | string | The region where the instance is located. |
| data.list[].suggestedAction | string | The recommended action. |
| data.list[].status | string | The status of the event. |
| message | string | The returned message. |
| requestId | string | The ID of the request. |
| server | string | The address of the server that processed the request. |
| success | boolean | Indicates whether the request was successful. |
Examples
Request example
curl -X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/anomalyEvents?requestId={requestId}&startTime={startTime}&endTime={endTime}&pageNumber={pageNumber}&pageSize={pageSize}' \
-H 'Content-Type: application/json' \
-u '<Your AccessKey ID:AccessKey secret>'
Response example
{
"data": {
"total": 2,
"list": [
{
"eventId": "xxxxxx",
"eventType": "CPU_USAGE_HIGH",
"eventLevel": "WARNING",
"eventTime": "2026-02-25 16:00:00+00:00",
"eventDescription": "The CPU usage of the OceanBase Cloud instance exceeds 80% and remains high for 5 minutes.",
"instanceId": "obcluster-*****",
"instanceName": "my-instance-01",
"region": "cn-hangzhou",
"suggestedAction": "We recommend that you check the business load or consider upgrading the instance specification.",
"status": "UNRESOLVED"
},
{
"eventId": "xxxxxx",
"eventType": "MEMORY_USAGE_HIGH",
"eventLevel": "CRITICAL",
"eventTime": "2026-02-26 09:30:00+00:00",
"eventDescription": "The memory usage of the OceanBase Cloud instance exceeds 90% and remains high for 3 minutes.",
"instanceId": "obcluster-*****",
"instanceName": "my-instance-01",
"region": "cn-hangzhou",
"suggestedAction": "We recommend that you immediately check the memory usage and optimize queries or scale out the instance.",
"status": "IN_PROGRESS"
}
]
},
"message": "Success",
"requestId": "xxxxxx",
"server": "xxx.xxx.x.xxx:xxxx",
"success": true
}
