This topic describes how to terminate a tenant session by using an API.
Call the API
If a password is set, you must authenticate. For more information, see API hybrid encryption.
Request path
DELETE /api/v1/tenant/:name/sessions
Request parameters
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| name | string | Yes | t1 | The name of the tenant. This parameter is specified in the path. |
| session_ids | []int | Yes | [3221588508, 3221588509] | The list of session IDs of the sessions to be terminated. |
Response
Parameter |
Type |
Description |
|---|---|---|
| successful | bool | Indicates whether the request was successful. |
| timestamp | time.Time | The timestamp when the server completed the request. |
| duration | int | The time taken by the server to process the request, in milliseconds. |
| status | int | The HTTP status code. |
| traceId | string | The trace ID of the request. |
| error | ApiError | The error information returned in the response. The error information contains the following fields:
|
Examples
Request example
DELETE 10.10.10.1:2886/api/v1/tenant/t1/sessions
{
"session_ids": [3221588508, 3221588509]
}
Response example
{
"successful": true,
"timestamp": "2025-10-14T15:17:01.277047628+08:00",
"duration": 25,
"status": 200,
"traceId": "e6f64ba7f54e7a50"
}
