dots.v2.agents.sessions.get()
Generated on 13 Nov 2026
from DoTs version
v1.24.0
Usage
client.v2.agents.sessions.get(requestConfiguration?: RequestConfiguration<SessionsRequestBuilderGetQueryParameters>): Promise<undefined | Definitions_list_sessions_response>Description
Keyset-paginated on an opaque cursor. Results are scoped to the authenticated team. Destroyed and failed sessions are omitted by default (matching the Cloud Console); pass status=SESSION_STATUS_ALL to list every session regardless of status, or an explicit status such as status=SESSION_STATUS_FAILED or status=SESSION_STATUS_DESTROYED to list only those.
Parameters
pageSizeinteger optionalExample:
50Page size. Defaults to 50 when omitted or non-positive; values above 200 are clamped to 200 (not rejected).
pageTokenstring optionalOpaque keyset cursor returned by the previous page. Empty starts from the beginning.
statusstring optionalOptional filter on session status. Empty / SESSION_STATUS_UNSPECIFIED means no explicit filter, which still hides destroyed and failed sessions by default; SESSION_STATUS_ALL opts out and returns every session regardless of status (no session is ever actually in this status; it only means something as a filter value here); any other explicit status overrides the default.
namestring optionalExample:
demo-agentOptional exact-name filter (case-insensitive). Returns the single live (non-terminal) session that currently holds this name for the caller's team, or an empty list if none does. Matches the live holder only, so historical terminal rows and reused names never make it ambiguous (per-team live-name uniqueness bounds it to at most one). This is how clients (doctl / Console) resolve a session name to its id; the {session_id} path stays UUID-only.
searchstring optionalExample:
demoOptional case-insensitive substring filter on session name (contains), for callers that don't know the exact name (e.g. a UI search box). Unlike
name, this may return zero, one, or many sessions, including terminal ones. Independent ofname; at most 64 characters.
Request Sample
Response Example
More Information
See /v2/agents/sessions in the API reference for additional detail on responses, headers, parameters, and more.