Cockroach Labs · Schema
ListSessionsResponse
List of active SQL sessions across all cluster nodes.
Cluster ManagementCloudDatabaseDistributed SQLInfrastructurePostgreSQL CompatibleSQL
Properties
| Name | Type | Description |
|---|---|---|
| sessions | array | Array of active session objects. |
| errors | array | Errors encountered while collecting session data from individual nodes. Sessions from healthy nodes are still returned. |
| next | integer | Pagination cursor for the next page of session results. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/cockroach-labs/main/json-schema/cockroach-labs-list-sessions-response-schema.json",
"title": "ListSessionsResponse",
"description": "List of active SQL sessions across all cluster nodes.",
"x-generated": "2026-10-04",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/cockroach-labs-sessions-api-openapi.yml#/components/schemas/ListSessionsResponse",
"type": "object",
"properties": {
"sessions": {
"type": "array",
"description": "Array of active session objects.",
"items": {
"$ref": "#/$defs/Session"
}
},
"errors": {
"type": "array",
"description": "Errors encountered while collecting session data from individual nodes. Sessions from healthy nodes are still returned.",
"items": {
"type": "object",
"properties": {
"node_id": {
"type": "integer",
"description": "Node ID that returned an error."
},
"message": {
"type": "string",
"description": "Error message from the node."
}
}
}
},
"next": {
"type": "integer",
"description": "Pagination cursor for the next page of session results."
}
},
"$defs": {
"Session": {
"type": "object",
"description": "An active SQL session on the CockroachDB cluster, representing a connection from a client application.",
"properties": {
"node_id": {
"type": "integer",
"description": "Node ID where this session is being served."
},
"username": {
"type": "string",
"description": "SQL username of the session."
},
"client_address": {
"type": "string",
"description": "Network address of the client (host:port)."
},
"application_name": {
"type": "string",
"description": "Application name reported by the SQL client driver."
},
"start": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the session was established."
},
"last_active_query": {
"type": "string",
"description": "Most recently executed SQL query in this session."
},
"id": {
"type": "string",
"description": "Unique identifier of the session."
},
"alloc_bytes": {
"type": "integer",
"format": "int64",
"description": "Memory allocated by this session in bytes."
},
"max_alloc_bytes": {
"type": "integer",
"format": "int64",
"description": "Peak memory allocation for this session in bytes."
},
"active_queries": {
"type": "array",
"description": "Currently executing queries within this session.",
"items": {
"type": "object"
}
},
"active_txn": {
"type": "object",
"description": "Currently active transaction within this session, if any."
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/cockroach-labs-list-sessions-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.