Description
You can call this operation to perform a precheck on arbitration service association for multiple OceanBase clusters.
Call description
Prerequisites
- You have the ARBITRATION:UPDATE permission on the target arbitration service.
- You have the CLUSTER:UPDATE permission on all clusters specified in the
clusterIdListparameter.
Request path
POST /api/v2/ob/clusters/batchAddArbitrationPreCheck
Request parameters
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| arbitrationServiceId | Long | Yes | 25 | The ID of the target arbitration service. |
| clusterIdList | List<Long> | Yes | 83,84 | The list of IDs of the OceanBase clusters to be associated with the arbitration service. Separate the cluster IDs with commas (,). |
| enabledArbitration | Boolean | Yes | true | Specifies whether to automatically enable the arbitration service for tenants with two or four full-featured replicas. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information, see the Precheck result section in this topic. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Precheck result
| Parameter | Type | Description |
|---|---|---|
| valid | Boolean | Indicates whether the precheck was passed. |
| checkResults | List<Object> | For more information, see the Errors section in this topic. |
Errors
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | The error code. |
| args | Object[] | The arguments of the error code. |
| errorMessage | String | The error message. |
| extraInfo | Object | The additional information. |
Examples
Sample request
POST /api/v2/ob/clusters/batchAddArbitrationPreCheck
{
"arbitrationServiceId":25,
"clusterIdList":[83,84],
"enabledArbitration":true
}
Sample response
{
"data": {
"checkResults": [],
"valid": true
},
"duration": 1068,
"server": "5e11a5f435",
"status": 200,
"successful": true,
"timestamp": "2025-01-22T18:14:03.274+08:00",
"traceId": "a976466db205775a"
}