Listing Sessions
Function
This API is used to list SQL sessions.
This API is synchronous. There are no accompanying APIs or specific scenarios.
Calling Method
For details, see Calling APIs.
URI
GET /v2/workspaces/{workspace_id}/aura-sessions
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| workspace_id | Yes | String | Definition: Workspace ID. For details about how to obtain the workspace ID, see Obtaining a Workspace ID. Constraints: N/A Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| endpoint_name | Yes | String | Definition: Endpoint name, used to filter endpoints by name. Constraints: N/A Range: 1 to 128 characters. Only letters, digits, periods (.), underscores (_), hyphens (-), and spaces are allowed. Default Value: N/A |
| session_id | No | String | Definition: Session ID. You can obtain the session ID by calling the Listing Sessions API. Constraints: N/A Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A |
| status | No | String | Definition: Status filter. Only one status can be queried at a time. Constraints: N/A Range Default Value: N/A |
| start_time_before | No | Integer | Definition: Queries records whose start time is earlier than or equal to this timestamp, in seconds. Constraints: N/A Range: 1 to 2,147,483,647. Default Value: N/A |
| start_time_after | No | Integer | Definition: Queries records whose start time is later than or equal to this timestamp, in seconds. Constraints: N/A Range: 1 to 2,147,483,647. Default Value: N/A |
| marker | No | String | Definition: ID of the last record on the previous page. Pass an empty value for the first page query. Constraints: N/A Range: 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Default Value: N/A |
| limit | No | Integer | Definition: Maximum number of records returned per page. Constraints: N/A Range: 1 to 100. Default Value: 10. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition: User token. It is obtained by calling the Obtaining an IAM User Token API. Constraints: N/A Range: N/A Default Value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| next_marker | String | Definition: Marker value for the next page query. An empty value indicates the current page is the last. Range: N/A |
| total | Integer | Definition: Total number of sessions in the current workspace. Range: 0 to 2,147,483,647. |
| sessions | Array of SqlSessionInfo objects | Definition: Session list. |
| Parameter | Type | Description |
|---|---|---|
| session_id | String | Definition: Session ID. You can obtain the session ID by calling the Listing Sessions API. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. |
| status | String | Definition: SQL session status. Range |
| create_time | String | Definition: Creation time, in ISO 8601 standard format. For example, 2023-05-30T12:24:30.401Z. Range: N/A |
| endpoint_info | endpoint_info object | Definition: Endpoint information. |
| error | ErrorMessage object | Definition: Error object returned on failure, including the error code, error description, and solution. Range: N/A |
| start_time | String | Definition: Start time. Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition: Endpoint ID. Range: 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed. |
| name | String | Definition: Endpoint name. Range: 1 to 128 characters. Only letters, digits, periods (.), underscores (_), hyphens (-), and spaces are allowed. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 408
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Example Requests
List sessions.
GET /v2/workspaces/{workspace_id}/aura-sessions Example Responses
Status code: 200
{
"sessions" : [ {
"session_id" : "284888e2-c36f-4bec-9b24-e5bf0b386ab0",
"status" : "RUNNING",
"create_time" : "2025-07-22T08:42:39.000+00:00",
"endpoint_info" : {
"id" : "0470d220-aaaa-410e-a417-0d69a0215683",
"name" : "test2"
}
}, {
"session_id" : "4e4b2770-702f-48b7-9737-db107cf63e24",
"status" : "CLOSED",
"create_time" : "2025-07-22T06:13:47.000+00:00",
"endpoint_info" : {
"id" : "0470d220-aaaa-410e-a417-0d69a0215683",
"name" : "test2"
}
} ],
"total" : 2,
"next_marker" : null
} Status code: 400
{
"error_code" : "AIDataLake.00092031",
"error_msg" : "Invalid parameter name",
"solution_msg" : "Please enter parameters in the correct format."
} Status code: 401
{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed.",
"solution_msg" : "Please obtain a valid token and retry."
} Status code: 403
{
"error_code" : "AIDataLake.00090030",
"error_msg" : "Unauthorized requests.",
"solution_msg" : "Check permissions and retry after authorization."
} Status code: 404
{
"error_code" : "AIDataLake.00090009",
"error_msg" : "The resource does not exists.",
"solution_msg" : "Please try to use correct info."
} Status code: 408
{
"error_code" : "common.00000408",
"error_msg" : "A timeout exception occurred.",
"solution_msg" : "The request timed out while waiting for a response — check the backend service status and network, then retry; if the operation is long-running, increase the client timeout or split the request."
} Status code: 500
{
"error_code" : "common.00000500",
"error_msg" : "internal error",
"solution_msg" : "An internal service error occurred. Please retry later; if the problem persists, contact technical support."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Invalid request. |
| 401 | Unauthorized. |
| 403 | Request denied. |
| 404 | The requested resource could not be found. |
| 408 | Request timeout. |
| 500 | Internal server error. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot