This topic describes how to delete a user in a tenant by using obshell.
Note
This API is supported starting with obshell V4.2.6.
API details
Constraints
Before you call this API, the obshell server performs security verification on the API. For more information, see API hybrid encryption.
Request path
DELETE /api/v1/tenant/{tenant_name}/user/{user_name}
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| root_password | string | No | ***** | The root user password of the tenant. This parameter is not required when you delete a user in the sys tenant. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Specifies whether the request is successful. |
| timestamp | time.Time | The timestamp indicating the time when the server finishes processing the request. |
| duration | int | The time taken by the server to process the request, in milliseconds. |
| status | int | The HTTP status code that conforms to the HTTP standard. |
| traceId | string | The Trace ID of the request. |
| error | ApiError | The error generated by the request, which contains the following information:
|
Examples
Request example
DELETE 10.10.10.1:2886/api/v1/tenant/sys/user/proxyro
Response example
{
"successful": true,
"timestamp": "2025-03-26T10:46:40.052855656+08:00",
"duration": 54,
"status": 200,
"traceId": "53b9e01e070daf7c"
}
References
In addition to using the CLI to call the API, you can also use the SDK. For more information about how to call the API through obshell-sdk-python, see Delete a user.