Overview
You can call this API to query the root cause analysis (RCA) result of an exception event that occurred on a specified OceanBase Cloud database instance. By providing the event ID, you can obtain the detailed RCA report of the event, which helps you diagnose and resolve database performance or stability issues.
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}/rcaResult
Request parameters
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | string | Yes | The ID of the OceanBase Cloud database instance. | obcluster-***** |
| requestId | string | Yes | The request ID for tracing the request. | dc302d76-66b5-48d8-ab53-a035******** |
| eventId | string | Yes | The ID of the event for which you want to query the RCA result. | {eventId} |
| httpServletRequest | unknown | Yes | The Http servlet request parameter. | {httpServletRequest} |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | object | The detailed data object of the RCA result. |
| requestId | string | The request ID, which is the same as the input parameter. |
| 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 \
-H "Content-Type: application/json" \
-u '<Your ak:sk>' \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/rcaResult?requestId={requestId}&eventId={eventId}&httpServletRequest={httpServletRequest}'
Response example
{
"data": {
"eventId": "{eventId}",
"rootCause": "The CPU usage surged due to slow queries.",
"analysisTime": "2023-10-12T09:45:30Z",
"details": {
"metric": "cpu_usage",
"threshold": 80,
"actualValue": 95,
"suggestions": ["Optimize SQL statements", "Upgrade the instance specification"]
}
},
"requestId": "{requestId}",
"server": "xxx.xxx.x.xxx:xxxx",
"success": true
}
