Overview
You can call this API to batch terminate the session processes of a specified tenant.
API details
Constraints
The caller must have an AccessKey for accessing the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
POST api/v2/instances/{instanceId}/tenants/{tenantId}/sessions/batchKill
Request parameters
Path
| Parameter | Type | Required | Description |
|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. |
| tenantId | String | Yes | The ID of the tenant. |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| sessionList | String | Yes | The list of sessions in JSON format. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| RequestId | String | The ID of the request. |
| Data | Array<Object> |
The result set. |
| Data[].Success | Boolean | Indicates whether the call was successful. |
Examples
Request example
curl --digest -u 'ak:sk' \
-X POST \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/sessions/batchKill' \
--data '{"sessionList":"[{\"ProxySessId\":\"752113700739156671\",\"SessionId\":3221555062,\"ServerIp\":\"xx.xxx.xx.xxx\"}]"}'
Response example
JSON format
{
"RequestId": "EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C",
"Data": [
{
"Success": true
}
]
}