dots.v2.actionGateway.sessions.search.get()

Generated on 13 Nov 2026 from DoTs version v1.24.0

deprecated

Usage

client.v2.actionGateway.sessions.search.get(requestConfiguration?: RequestConfiguration<SearchRequestBuilderGetQueryParameters>): Promise<undefined | Search_sessions_response>

Description

Deprecated: use GET /v2/action-gateway/endpoints/search for endpoints. This route continues to search legacy sessions with its existing fields and pagination. Returns the sessions you can see whose name, actor_id, session_urn, or agentName contains query, case-insensitively, ranked across the whole result set. Cursor-paged with page_size and page_token; no total is reported.

Parameters

query string optional

Example: search

Matched case-insensitively as a substring of name, actor_id, session_urn, or agentName. Empty matches every session you can see. Results are ordered by match quality (an exact name, session_urn, or actor_id match, then a prefix, then a substring), then by name, across the whole result set, so a client must not re-sort a page to rank it.

endUserId string optional

Example: alice

end_user_id, when set, is an exact filter on actor_id (the same filter as on the session list) and combines with query as AND.

pageSize integer optional

Example: 20

Page size, 1 to 100. Defaults to 20 when omitted or 0; other values are rejected with 400.

Default: 20

Min: 1

Max: 100

pageToken string optional

Example: ZXhhX3dlYl9zZWFyY2hAMQ

next_page_token from the previous response. Valid only with the same query and end_user_id; otherwise the request is rejected with 400.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.actionGateway.sessions.search.get();

Response Example

Show Response Example
{
  "sessions": [
    {
      "sessionUrn": "do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b",
      "policy": {
        "defaultAction": "ask",
        "rules": [
          {
            "tool": "toolbelt:search-toolbelt@1",
            "match": {},
            "action": "allow"
          },
          {
            "tool": "jira_create_issue",
            "match": {},
            "action": "ask"
          }
        ]
      },
      "createdAt": "2026-09-24T12:00:00Z",
      "updatedAt": "2026-09-24T12:00:00Z",
      "name": "support-bot-alice",
      "actorId": "alice",
      "tools": {
        "references": [
          {
            "kind": "SESSION_TOOL_REFERENCE_KIND_TOOLBELT",
            "name": "search-toolbelt",
            "version": "1"
          },
          {
            "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL",
            "name": "jira_create_issue",
            "version": "1"
          }
        ]
      },
      "config": {
        "preloadTools": [
          "exa_web_search"
        ],
        "outputViews": {
          "exa_web_search": "titles-and-urls"
        }
      },
      "agentUrn": "",
      "agentName": "",
      "owning_user_id": "2f8e1c3a-6b4d-4f7e-9a1c-5d3b7e9f1a2c"
    }
  ],
  "next_page_token": ""
}

More Information

See /v2/action-gateway/sessions/search in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.