cURL
curl --request GET \
--url 'https://localhost/api/v2/sessions/?username=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&start=SOME_STRING_VALUE' \
--header 'X-Cockroach-API-Session: REPLACE_KEY_VALUE'{
"errors": [
{
"message": "<string>",
"node_id": 123
}
],
"next": "<string>",
"sessions": [
{
"active_queries": [
{
"id": "<string>",
"is_distributed": true,
"phase": 123,
"progress": 123,
"sql": "<string>",
"sql_no_constants": "<string>",
"start": "2023-11-07T05:31:56Z",
"txn_id": [
123
]
}
],
"active_txn": {
"alloc_bytes": 123,
"deadline": "2023-11-07T05:31:56Z",
"id": [
123
],
"implicit": true,
"is_historical": true,
"max_alloc_bytes": 123,
"num_auto_retries": 123,
"num_retries": 123,
"num_statements_executed": 123,
"priority": "<string>",
"read_only": true,
"start": "2023-11-07T05:31:56Z",
"txn_description": "<string>"
},
"alloc_bytes": 123,
"application_name": "<string>",
"client_address": "<string>",
"id": [
123
],
"last_active_query": "<string>",
"last_active_query_no_constants": "<string>",
"max_alloc_bytes": 123,
"node_id": 123,
"start": "2023-11-07T05:31:56Z",
"username": "<string>"
}
]
}List sessions
List all sessions on this cluster. If a username is provided, only sessions from that user are returned.
Client must be logged in as a user with admin privileges.
GET
/
sessions
/
cURL
curl --request GET \
--url 'https://localhost/api/v2/sessions/?username=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&start=SOME_STRING_VALUE' \
--header 'X-Cockroach-API-Session: REPLACE_KEY_VALUE'{
"errors": [
{
"message": "<string>",
"node_id": 123
}
],
"next": "<string>",
"sessions": [
{
"active_queries": [
{
"id": "<string>",
"is_distributed": true,
"phase": 123,
"progress": 123,
"sql": "<string>",
"sql_no_constants": "<string>",
"start": "2023-11-07T05:31:56Z",
"txn_id": [
123
]
}
],
"active_txn": {
"alloc_bytes": 123,
"deadline": "2023-11-07T05:31:56Z",
"id": [
123
],
"implicit": true,
"is_historical": true,
"max_alloc_bytes": 123,
"num_auto_retries": 123,
"num_retries": 123,
"num_statements_executed": 123,
"priority": "<string>",
"read_only": true,
"start": "2023-11-07T05:31:56Z",
"txn_description": "<string>"
},
"alloc_bytes": 123,
"application_name": "<string>",
"client_address": "<string>",
"id": [
123
],
"last_active_query": "<string>",
"last_active_query_no_constants": "<string>",
"max_alloc_bytes": 123,
"node_id": 123,
"start": "2023-11-07T05:31:56Z",
"username": "<string>"
}
]
}Authorizations
Query Parameters
Response
200 - application/json
List sessions response.

