Sessions

List sessions

Returns a paginated list of sessions.

get/sessions

Request

  • Base URL
    https://api.metorial.com
  • Auth
    HTTP bearer

Query parameters

limitnumber
afterstring
beforestring
cursorstring
order'asc' | 'desc'
'active' | 'archived'
OR
string[]

Filter by status (active, archived)

string
OR
string[]

Filter by session ID(s)

string
OR
string[]

Filter by connected agent ID(s)

string
OR
string[]

Filter by connected identity actor ID(s)

string
OR
string[]

Filter by connected consumer ID(s)

string
OR
string[]

Filter by connected identity ID(s)

string
OR
string[]

Filter by session template ID(s)

string
OR
string[]

Filter by session provider ID(s)

string
OR
string[]

Filter by provider ID(s)

string
OR
string[]

Filter by provider deployment ID(s)

string
OR
string[]

Filter by provider config ID(s)

string
OR
string[]

Filter by provider auth config ID(s)

gtstring date-time

Only include records after this timestamp for session creation time

ltstring date-time

Only include records before this timestamp for session creation time

Filter session creation time by date range

gtstring date-time

Only include records after this timestamp for session last update time

ltstring date-time

Only include records before this timestamp for session last update time

Filter session last update time by date range

searchstring
Example:github

Search by session ID, or by the name of a related provider, auth method, deployment, config, auth config, agent, actor, identity, or consumer

Headers

Metorial-Versionstring
Example:2025-01-01

Pin the dated API version for this request, e.g. 2025-01-01. Defaults to the version configured for the environment.

Response

Successful response

Example response

{
  "items": [
    {
      "id": "ses_4dEfGhJkLmNpQrSt",
      "name": "Production Session",
      "description": "Session for production environment",
      "connection_url": "https://mcp.metorial.com/mcp/ses_4dEfGhJkLmNpQrSt",
      "client_secret": "metorial_fk_4eC39HqLyjWDarjtT1zdp7dc",
      "providers": [
        {
          "id": "spr_3cDeFgHjKlMnPqRs",
          "provider_id": "pro_5gHjKlMnPqRsTuVw",
          "session_id": "ses_4dEfGhJkLmNpQrSt",
          "from_template_id": "stm_2bCdEfGhJkLmNpQr",
          "from_template_provider_id": "stp_3cDeFgHjKlMnPqRs",
          "deployment": {
            "id": "pde_1aBcDeFgHjKlMnPq",
            "name": "Production",
            "description": "Production deployment",
            "provider_id": "pro_5gHjKlMnPqRsTuVw",
            "created_at": "2025-09-15T10:30:00.000Z",
            "updated_at": "2026-01-10T14:45:00.000Z"
          },
          "config": {
            "id": "pcf_7dEfGhJkLmNpQrSt",
            "name": "Production Config",
            "description": "Configuration for production environment",
            "provider_id": "pro_5gHjKlMnPqRsTuVw",
            "created_at": "2025-09-15T10:30:00.000Z",
            "updated_at": "2026-01-10T14:45:00.000Z"
          },
          "created_at": "2025-09-15T10:30:00.000Z",
          "updated_at": "2026-01-10T14:45:00.000Z"
        }
      ],
      "created_at": "2025-09-15T10:30:00.000Z",
      "updated_at": "2026-01-10T14:45:00.000Z"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.