Applicability
Deleting users is not supported for standby clusters.
Overview
You can call this API to delete one or more database accounts.
Notice
After you call the DeleteTenantUsers API, the specified user is immediately deleted and cannot log in. Make sure that the user is no longer in use to avoid affecting business operations.
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
DELETE /api/v2/instances/{instanceId}/tenants/{tenantId}/tenantUsers
Request parameters
Path parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| instanceId | string | Yes | The ID of the OceanBase cluster. | obcluster-***** |
| tenantId | string | Yes | The ID of the tenant. | t4louaeei**** |
Request body parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| users | string | Yes | The list of usernames to be deleted. The value is a JSON array. | ["user1", "user2"] |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the operation was successful. |
Examples
Request example
curl -v --request DELETE \
--digest -u '<Your ak:sk>' \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/tenantUsers' \
-H 'Content-Type: application/json' \
-H 'X-Ob-Project-Id: <Project ID>' \
--data '{"users": ["user1", "user2"]}'
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
}
