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 OB Cloud database instance. |
| tenantId | String | Yes | The ID of the tenant. |
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | The ID of the request, which is used for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| sessionList | String | Yes | The list of sessions in JSON format. | "[{\"ProxySessId\":\"xxxxx\",\"SessionId\":xxxx,\"ServerIp\":\"xx.xxx.xx.xxx\"}]" |
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 '<Your ak:sk>' \
-X POST \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/sessions/batchKill?requestId={requestId}' \
-H 'Content-Type: application/json' \
--data '{"sessionList":"[{\"ProxySessId\":\"752113700739156671\",\"SessionId\":3221555062,\"ServerIp\":\"xxx.xxx.x.xxx:xxxx\"}]"}'
Response example
JSON format
{
"RequestId": "EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C",
"Data": [
{
"Success": true
}
]
}
