Overview
This API submits an asynchronous task to detach a standby instance from its primary instance. Check the task or instance status to confirm that the standby instance has been detached.
API details
Constraints
Authenticate with your AccessKey ID and AccessKey Secret. For instructions on obtaining these credentials, see Manage AccessKeys.
Request path
POST /api/v2/instances/{instanceId}/disconnectStandbyInstance
Request parameters
Path
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| instanceId | String | Yes | Primary instance ID used for the permission check. | obcluster-source |
Body
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| instanceId | String | Yes | Primary instance ID. Must match instanceId in the request path. |
obcluster-source |
| targetInstanceId | String | Yes | ID of the standby instance to detach. | obcluster-target |
| UID | String | No | User ID. | 20000600**** |
| User_ID | String | No | User ID. | 20000600**** |
| requestId | String | No | Request ID used for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
| callerType | String | No | Caller type. | sub |
| accessKeyId | String | No | AccessKey ID. | ak-xxxxx**** |
| securityToken | String | No | Security token. | sts-token-xxxxxxxx |
| callerUid | String | No | Caller ID. | 20000600**** |
| callerBid | String | No | Caller BID. | xxxxxx |
| stsTokenCallerUid | String | No | UID of the STS token caller. | 20000600**** |
| stsTokenCallerBid | String | No | BID of the STS token caller. | xxxxxx |
| acceptLanguage | String | No | Language used in the request or response. | zh-CN |
| pageNumber | Integer | No | Page number. | 1 |
| pageSize | Integer | No | Page size. | 10 |
| mergedCallerBid | String | No | Merged caller business identity ID. | xxxxxx |
Response parameters
Field |
Type |
Description |
Example value |
|---|---|---|---|
| success | Boolean | Whether the API call succeeded. | true |
| errorCode | String | Error code. | INVALID_PARAMETER |
| errorMessage | String | Error message. | Invalid parameter |
| data | Object | Result of the detach request. | None |
| cost | Number | Elapsed time. | 1.0 |
| server | String | Server address, typically the IP address of an OBServer node. | 10.0.0.10 |
| requestId | String | Request ID. | d04eabba**** |
| totalCount | Number | Total number of records. | 100.0 |
| extra | Object | Additional information. | {} |
data object fields
Field |
Type |
Description |
Example value |
|---|---|---|---|
| Success | Boolean | Whether the detach request was submitted successfully. | true |
| Message | String | Response message. Empty when the detach request is submitted successfully. | "" |
Examples
Request example
This example submits a request to detach standby instance obcluster-target from primary instance obcluster-source. Replace the credentials and instance IDs with your own values.
curl --digest -u '<AccessKey ID>:<AccessKey Secret>' -X POST \
'https://api-cloud.oceanbase.com/api/v2/instances/obcluster-source/disconnectStandbyInstance' \
-H 'Content-Type: application/json' \
-d '{
"instanceId": "obcluster-source",
"targetInstanceId": "obcluster-target"
}'
Response example
JSON format
{
"success": true,
"data": {
"Success": true,
"Message": ""
},
"requestId": "d04eabba-acef-4f4b-96f1-c657876ca6f1",
"extra": {}
}