Overview
You can call this API to query historical event information.
API details
Constraints
The caller must have an AccessKey for accessing APIs of OceanBase Cloud. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/operationEvents
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| resourceIdOrName | string | No | Resource ID or resource name | ob6******** |
| callerUids | array | No | List of caller UIDs | ["200006001454"] |
| eventTypes | array | No | Event types | ["INSTANCE_MANAGEMENT"] |
| eventOperations | array | No | List of event operations | ["DeleteInstance"] |
| startTime | string | No | Start time (UTC string format) | 2024-12-20T09:29:57Z |
| endTime | string | No | End time (UTC string format) | 2025-03-20T09:29:57Z |
| eventStatus | string | No | Event status | SUCCESS |
| sortField | string | No | Field to sort by | FINISHED_TIME |
| sortOrder | string | No | Sort order | DESCEND |
| pageNumber | int | No | Page index (1-based) | 1 |
| pageSize | int | No | Number of items per page | 10 |
| queryKey | string | No | Query condition | ob6******** |
| uid | string | No | Primary account ID / Project owner ID | 200006001454 |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | The response data. | ||
| datalist | The response data. | ||
| resourceType | enum | The type of the resource.
|
CLUSTER |
| currentLanguageResourceType | string | The type of the resource in the current language. | Cluster |
| resourceId | string | The ID of the resource. | ******** |
| instanceId | string | The instance ID, returns the corresponding instance ID to the tenant when the resource type is a tenant. | ******** |
| clusterRole | enum | The cluster role. This parameter is displayed only when the resource type is a cluster.
|
NORMAL |
| isExist | boolean | Whether the resource exists.
|
false |
| resourceName | string | The name of the resource. | ******** |
| eventType | string | The type of the event. | INSTANCE_MANAGEMENT |
| currentLanguageEventType | string | The description of the event type in the current language. | Instance management |
| eventDescription | string | The operation of the event. | DeleteInstance |
| currentLanguageEventDescription | string | The description of the event operation in the current language. | Delete instance |
| eventSource | enum | The source of the event.
|
SYSTEM |
| eventStatus | enum | The status of the event.
|
SUCCESS |
| resultCode | int | The result code. | 0 |
| resultMessage | string | The result information. | |
| uid | string | The ID of the primary account. | ******** |
| callerUid | string | The ID of the caller. | 200006001454 |
| phoneNumber | string | The mobile number or email address. | obc***@oceanbase.com |
| projectMemberName | string | The name of the project member. | obc***@oceanbase.com |
| requestId | string | The request ID. | _** |
| params | string | The request parameters. | |
| gmtCreate | long | The creation time in GMT. | ******** |
| gmtModified | long | The modification time in GMT. | ******** |
| createTime | string | The creation time. | 2025-03-20T02:58:49Z |
| finishedTime | string | The completion time. | 2025-03-20T02:58:49Z |
| projectId | string | The ID of the project. | ******** |
| requestId | string | The request ID. | 71f8acbe-e009-4a88-b417-8cbaf1b8ac3d |
| success | boolean | The execution status of the request. | true |
Examples
Request example
curl --digest -u 'ak:sk' \
--request GET \
--url https://api-cloud.oceanbase.com/api/v2/operationEvents
-H 'X-Ob-Project-Id: <Project ID>'
-G -d 'startTime=xx' -d 'endTime=xxx'
Response example
JSON format
{
"data":{
"dataList":[
{
"callerUid":"200006001454",
"clusterRole":"NORMAL",
"createTime":"2025-03-20T02:58:49Z",
"currentLanguageEventDescription":"Delete instance",
"currentLanguageEventType":"Instance Management",
"currentLanguageResourceType":"Cluster",
"eventDescription":"DeleteInstance",
"eventSource":"SYSTEM",
"eventStatus":"SUCCESS",
"eventType":"INSTANCE_MANAGEMENT",
"finishedTime":"2025-03-20T02:58:49Z",
"gmtCreate":*********,
"gmtModified":*********,
"isExist":false,
"params":"",
"phoneNumber":"obc***@oceanbase.com",
"projectId":"*************",
"projectMemberName":"obc***@oceanbase.com",
"requestId":"*******_*********",
"resourceId":"**********",
"resourceName":"**********",
"resourceType":"CLUSTER",
"resultCode":0,
"resultMessage":"",
"uid":"*********"
}
],
"total":275
},
"requestId":"71f8acbe-e009-4a88-b417-8cbaf1b8ac3d",
"success":true
}