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.
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
Token for logged-in REST session. Use /login/ to log in and get a session token. For additional information, see cockroachlabs.com/docs/stable/cluster-api.
Query Parameters
Username of user to return sessions for; if unspecified, sessions from all users are returned.
Maximum number of results to return in this call.
Continuation token for results after a past limited run.
Response
List sessions response.
Any errors that occurred during fan-out calls to other nodes.
Show child attributes
Show child attributes
The continuation token, for use in the next paginated call in the start
parameter.
A list of sessions on this node or cluster.
Show child attributes
Show child attributes

