Description
You can call this operation to add a connectable OceanBase cluster for an OBProxy cluster.
Call description
Prerequisite
You have passed the authentication for the OCP application service.
Request path
POST /api/v2/obproxy/clusters/{id}/obLinks/batchAdd
Request parameters
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The ID of the OBProxy cluster. |
body:
The ObLink array.
Data structure of ObLink
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| clusterName | String | Yes | foo | The name of the OceanBase cluster. |
| obClusterId | Integer | Yes | 1 | The ID of the OceanBase cluster. |
| username | String | Yes | proxyro | The username used to connect to the cluster. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An 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. |
Examples
Sample request
POST /api/v2/obproxy/clusters/1/obLinks/batchAdd
[{
"username": "proxyro",
"clusterId": 1,
"obClusterId": 1,
"clusterName": "hooray"
}]
Sample response
{
"duration": 121,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-03T16:48:32.957+08:00",
"traceId": "87dbc0dd2459490c"
}