Feature description
Adds a connectable OceanBase cluster to the specified OBProxy cluster.
Call description
Prerequisites
The caller needs to be authenticated through OCP application services.
Request path
POST /api/v2/obproxy/clusters/{id}/obLinks/batchAdd
Request parameters
path:
| Parameter | Type | Required | Example Value | Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The ID of the OBProxy cluster. |
body:
| Parameter | Type | Required | Example Value | Description |
|---|---|---|---|---|
| obLinks | Array | Yes | - | Information about the connectable OceanBase cluster. |
| ├─ clusterName | String | Yes | foo | The cluster name. |
| ├─ obClusterId | Integer | - | 1 | The cluster ID on OceanBase. |
| ├─ username | String | Yes | proxyro | The username for connecting 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 | The HTTP status code that conforms to the HTTP status specification. |
| traceId | String | The Trace ID of the request, which is used for troubleshooting. |
| server | String | The address of the application service that responded to the request. |
Examples
Request example
POST /api/v2/obproxy/clusters/1/obLinks/batchAdd
{
"username": "proxyro",
"obClusterId": 1,
"clusterName": "hooray"
}
Response example
{
"duration": 121,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-03T16:48:32.957+08:00",
"traceId": "87dbc0dd2459490c"
}