Lists the historical sessions for a Livy Gateway.
Try it now
Test
RAM authorization
Request syntax
GET /api/v1/workspaces/{workspaceId}/livycompute/{livyComputeId}/session HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspaceId |
string |
No |
The workspace ID. |
w-d80f373d3ace824f |
| livyComputeId |
string |
No |
The ID of the Livy Gateway. |
lc-zm4dzdiubu73w2yx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| pageNum |
integer |
No |
The page number. The default value is 1. |
1 |
| pageSize |
integer |
No |
The number of entries per page. Default value: 20. Minimum value: 1. Maximum value: 100. |
20 |
| regionId |
string |
No |
The region ID. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| requestId |
string |
The request ID. |
8FAA8EEC-3026-5D15-8733-4E2A3DD970A1 |
| totalCount |
integer |
The total number of entries. |
10 |
| sessions |
array<object> |
The list of sessions. |
|
|
object |
|||
| name |
string |
The session name. |
test_session |
| computeId |
string |
The ID of the Livy Gateway. |
lc-xxxxxx |
| sessionId |
string |
The ID of the Livy Gateway session. |
livy-xxxxxx |
| sparkConf |
string |
The Spark job configuration. |
{ "proxyUser": "test", "conf": { "spark.driver.cores": 1 } } |
| state |
string |
The session state.
|
running |
| info |
string |
The runtime information. |
null |
| createTime |
integer |
The time when the session was created. This is a UNIX timestamp in milliseconds. |
1768213240000 |
| webUI |
string |
The web UI URL of the session. |
http://emr-spark-ui-cn-hangzhou.data.aliyun.com |
| endTime |
integer |
The time when the session ended. This is a UNIX timestamp in milliseconds. |
1768213240000 |
| queue |
string |
The queue name. |
root_queue |
| cuHours |
number |
The number of compute units (CUs) consumed during the task execution. This is an estimated value. The actual value is subject to the bill. |
322.5 |
| vcoreSeconds |
integer |
The total number of vCores allocated to the task multiplied by the number of seconds the task has been running. |
343 |
| mbSeconds |
integer |
The total amount of memory in MB allocated to the task multiplied by the number of seconds the task has been running. |
1098888 |
Examples
Success response
JSON format
{
"requestId": "8FAA8EEC-3026-5D15-8733-4E2A3DD970A1",
"totalCount": 10,
"sessions": [
{
"name": "test_session",
"computeId": "lc-xxxxxx",
"sessionId": "livy-xxxxxx",
"sparkConf": "{\n \"proxyUser\": \"test\",\n \"conf\": {\n \"spark.driver.cores\": 1\n }\n}",
"state": "running",
"info": "null",
"createTime": 1768213240000,
"webUI": "http://emr-spark-ui-cn-hangzhou.data.aliyun.com",
"endTime": 1768213240000,
"queue": "root_queue",
"cuHours": 322.5,
"vcoreSeconds": 343,
"mbSeconds": 1098888
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.