Applicability
Deleting a user from a standby instance is not supported in the current version.
Overview
You can call this API to delete one or more database accounts.
Notice
After this operation is successfully called, the users will be immediately removed and will no longer be able to log in. Please make sure that the users are no longer in use to avoid affecting business operations.
API details
Constraints
The caller must have an AccessKey for accessing APIs of OceanBase Cloud. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
DELETE /api/v2/instances/{instanceId}/tenants/{tenantId}/tenantUsers
Request parameters
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | String | Yes | The ID of the tenant. | t4pnum**** |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | String | Yes | The ID of the tenant. | t4pnum**** |
| users | String | Yes | The list of usernames. | ["aaa", "bbb"] |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| instanceId | String | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | String | The ID of the tenant. | t4pnum**** |
| success | Boolean | Indicates whether the specified one or more accounts are successfully deleted. | true |
Examples
Request example
curl -v --request DELETE \
--digest -u 'ak:sk' \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/tenantUsers' \
-H 'X-Ob-Project-Id: <Project ID>'
--data \ '{"instanceId":"ob4ioyiw82yhuo","tenantId":"t4ismze9nltds","users":["aaa", "bbb"]}'
Note
- A project ID uniquely identifies a project. For information about how to obtain the project ID of an instance, see Manage projects.
- Make sure that the project ID corresponding to the specified instanceId is consistent with the specified project ID.
Response example
JSON format
{
"success":true
}