Overview
You can call this API to modify the number of nodes in a read-only instance.
API details
Constraints
The caller must have an AccessKey for accessing APIs. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
PUT api/v2/instances/{instanceId}/readonlyInstance/nodeNum
Request parameters
Path
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the instance. | obxxx |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| readonlyInstanceId | String | Yes | The ID of the read-only instance. | obxxx |
| targetNodeNum | Integer | Yes | The target number of nodes. | 2 |
| dryRun | Boolean | No | Specifies whether to perform a dry run. | false |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | object | The cluster information. | |
| orderId | string | The order ID. | NL25******** |
| instanceId | string | The instance ID. | ob******** |
| dryRun | Boolean | Specifies whether to perform a dry run. | NL25******** |
| dryRunResult | Boolean | The result of the dry run. | NL25******** |
Examples
Request example
curl --digest -u 'ak:sk' \
-X PUT \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/readonlyInstance/nodeNum' \
--data '{
"readonlyInstanceId": "obxxx",
"targetNodeNum": 2,
"dryRun": false
}'
Response example
JSON format
{
"data": {
"instanceId": "ob********",
"orderId": "NL25********"
},
"requestId": "f257f51e-****-****-8fba-ec1b9554cc78",
"success": true
}