You can call this operation to close a session.
Operation description
为优化用户体验,云数据库对会话功能进行了升级,本接口将下线并由新的接口替代,详情请参见 【通知】云数据库会话管理 API 接口变更说明 。
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the OceanBase cluster. |
ob317v4uif**** |
| SessionList |
string |
Yes |
The list of the sessions that need to be closed. |
[ { "ServerIp": "192.***.**.***", "SessionId": "322161****" } ] |
| TenantId |
string |
Yes |
The ID of the tenant. |
t4louaeei**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
EE205C00-30E4-****-****-87E3A8A2AA0C |
| Data |
array<object> |
The data returned. |
|
|
object |
The data returned from the request. |
||
| SessionId |
integer |
The ID of the session. |
1123 |
| ServerIp |
string |
The IP address of the server. |
127.*.*.* |
| Status |
string |
The status of the task. |
SLEEP |
| ErrorMessage |
string |
The error message. |
Instance not found. |
| ClientIp |
string |
The client IP address. |
127.*.*.* |
| TenantId |
string |
The ID of the tenant. |
t3ogq******n4 |
| User |
string |
The database username. |
oas |
| Database |
string |
The name of the database. |
test |
| SqlText |
string |
The SQL statement. |
: |
| Command |
string |
The start command for the container of the application. |
select 1 |
| ExecuteTime |
string |
Execution time (UTC+8). If it is left empty, it means to execute immediately. |
142 |
Examples
Success response
JSON format
{
"RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
"Data": [
{
"SessionId": 1123,
"ServerIp": "127.*.*.*",
"Status": "SLEEP",
"ErrorMessage": "Instance not found.",
"ClientIp": "127.*.*.*",
"TenantId": "t3ogq******n4",
"User": "oas",
"Database": "test",
"SqlText": ":",
"Command": "select 1",
"ExecuteTime": "142"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 2014 | InternalError | The request processing has failed due to some unknown error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.