Description
You can call this operation to change the administrator password of the sys tenant under an OceanBase cluster.
Call description
Prerequisites
You have the Update permission on the OceanBase cluster.
For more information about the permissions, see Roles overview and Users Overview.
You have passed the authentication for the OCP application service.
Request path
POST /api/v2/ob/clusters/{id}/changePassword
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1 | The ID of the OceanBase cluster. |
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| newPassword | String | Yes | foo | The new password. |
| saveToCredential | Boolean | No | true | Specifies whether to save the password in the password box. |
Response parameters
Basic data structure
| 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/ob/clusters/1/changePassword
Sample response
{
"duration": 425,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-05T22:56:48.538+08:00",
"traceId": "bfc0defbcd0a453d"
}