> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nasiko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List chat sessions



## OpenAPI

````yaml /api-reference/openapi.json get /api/observability/session/list
openapi: 3.1.0
info:
  title: Nasiko API
  description: >-
    HTTP API for the Nasiko OpenRuntime: agents, coding harnesses, TokenOps,
    routing, MCP, and secrets. Spec is generated from annotated routes; some
    surfaces are documented on the hand-written pages alongside this file.
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://free.app.nasiko.com
    description: Nasiko Cloud Free
  - url: https://{workspace}.app.nasiko.com
    description: Nasiko Cloud paid workspace
    variables:
      workspace:
        default: your-workspace
        description: >-
          Your workspace's subdomain, as shown in the connect command on the
          dashboard's Nasiko CLI page
security:
  - bearer_auth: []
tags:
  - name: secrets
    description: Encrypted per-user agent secrets
  - name: catalog
    description: >-
      Agent catalog: registration, discovery, versions, per-agent secrets, and
      source import
  - name: agents
    description: >-
      Agent lifecycle: deployments, LLM routing config, update/rollback,
      upload-and-deploy
  - name: orchestrator
    description: >-
      A2A dispatch: routing-engine/ReAct orchestrator and direct agent chat,
      plus routing stats
  - name: users
    description: >-
      User management: CRUD, roles, credentials, accessible agents
      (superuser-only)
  - name: usage
    description: Per-user token usage and cost reporting
  - name: observability
    description: Sessions, traces, spans, agent logs, and FinOps reporting
  - name: llm-router
    description: LLM routing presets, provider/model catalog, and tier→model registry
  - name: context-selection
    description: >-
      Per-user chat-history selection preferences: strategy, PACMS budget tier,
      the on/off switch, a dry-run preview, and settings-change history
  - name: coding-agents
    description: >-
      The progress local clients report while they bring in the caller's coding
      agents
  - name: settings
    description: >-
      Workspace-wide settings, including the Optimization tiers a user's PACMS
      budget level resolves against
  - name: mcp
    description: >-
      MCP gateway: agent-facing JSON-RPC tool calls, connector
      registration/upload/sharing, credentials & OAuth, and per-agent tool
      permissions
paths:
  /api/observability/session/list:
    get:
      tags:
        - observability
      summary: List chat sessions
      operationId: get_all_sessions
      parameters:
        - name: start_time
          in: query
          description: 'ISO-8601 window start (default: 7 days ago).'
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: end_time
          in: query
          description: 'ISO-8601 window end (default: open-ended).'
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: limit
          in: query
          description: Page size (default 25, max 100).
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
        - name: offset
          in: query
          description: |-
            Rows to skip, for offset paging (default 0). Superseded by `cursor`,
            which pages on the sort key instead; kept because the Sessions page
            still sends it. `cursor` wins when both are given.
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
        - name: cursor
          in: query
          description: >-
            Keyset cursor on `(created_at, session_id)` — the `end_cursor` of
            the

            previous page.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: status
          in: query
          description: >-
            `failed` | `ok` | `running` | `timed_out`. Filtered in SQL, so
            `matching_count` counts

            every match in the window rather than the rows on this page.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: sort
          in: query
          description: Sort order. Only `created_at` (the default) is supported.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: parent
          in: query
          description: >-
            A session id: list that session's subagent sessions instead of the
            top

            level. The window does not apply; ownership does, as for any list.
          required: false
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: Sessions in the window
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionListResponse'
        '400':
          description: Unknown status, sort or cursor value
        '401':
          description: Missing or invalid session
components:
  schemas:
    SessionListResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/SessionListData'
    SessionListData:
      type: object
      required:
        - sessions
        - total_agents
        - successful_agents
        - matching_count
        - pagination
      properties:
        matching_count:
          type: integer
          format: int64
          description: >-
            Rows matching the filters, so a caller can say "3 failed sessions"
            from

            one request instead of counting a sampled page. Exact when `status`

            narrows the set; otherwise capped (see `sessions_sql`).
        pagination:
          $ref: '#/components/schemas/Pagination'
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/SessionSummary'
        successful_agents:
          type: integer
          minimum: 0
        total_agents:
          type: integer
          minimum: 0
    Pagination:
      type: object
      required:
        - has_next_page
      properties:
        end_cursor:
          type:
            - string
            - 'null'
        has_next_page:
          type: boolean
    SessionSummary:
      type: object
      required:
        - id
        - session_id
        - agent_id
        - token_usage
        - cost_summary
        - failed_flows
        - flow_count
        - subagent_count
        - subagents
        - session_annotations
        - session_annotation_summaries
      properties:
        agent_id:
          type: string
        cost_summary:
          $ref: '#/components/schemas/SimpleCostSummary'
        duration_ms:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        end_time:
          type:
            - string
            - 'null'
        error_count:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Unrecovered error spans across the session's traces. `null` while
            they haven't been computed yet: "not yet known", never "zero".
          minimum: 0
        failed_flows:
          type: integer
          format: int32
          description: Requests in this session that ended in an error.
          minimum: 0
        first_input:
          type:
            - string
            - 'null'
        flow_count:
          type: integer
          format: int32
          description: |-
            Requests the proxy recorded for this session. `0` for a session that
            never crossed it, which has no flow to open.
          minimum: 0
        id:
          type: string
        last_output:
          type:
            - string
            - 'null'
        num_traces:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        parent_session_id:
          type:
            - string
            - 'null'
          description: >-
            The session that spawned this one, when it is a subagent; `null` at
            the top level.
        session_annotation_summaries:
          type: array
          items:
            type: object
        session_annotations:
          type: array
          items:
            type: object
        session_id:
          type: string
        spawn_tool_call_id:
          type:
            - string
            - 'null'
          description: The parent's tool call that spawned this session.
        start_time:
          type:
            - string
            - 'null'
        status:
          type:
            - string
            - 'null'
          description: >-
            `running` | `ok` | `failed` | `timed_out`, derived from the
            session's flow rows — the

            outcome recorded at the proxy. `null` when the session has no
            recorded

            flow, which is "unknown", never "ok".
        subagent_count:
          type: integer
          format: int32
          description: Sessions this one spawned.
          minimum: 0
        subagent_type:
          type:
            - string
            - 'null'
          description: The subagent's kind as the coding agent names it (e.g. "Explore").
        subagents:
          $ref: '#/components/schemas/SubagentTotals'
          description: |-
            Those sessions' own totals. Never included in this row's own
            `num_traces`, `token_usage` or `cost_summary`.
        token_usage:
          $ref: '#/components/schemas/TokenUsageSummary'
        trace_latency_ms_p50:
          type:
            - number
            - 'null'
          format: double
        trace_latency_ms_p99:
          type:
            - number
            - 'null'
          format: double
    SimpleCostSummary:
      type: object
      required:
        - total
      properties:
        total:
          $ref: '#/components/schemas/CostEntry'
    SubagentTotals:
      type: object
      description: >-
        What a session's children add up to, beside (never inside) its own
        totals.
      required:
        - turns
      properties:
        cost:
          type:
            - number
            - 'null'
          format: double
          description: '`null` while no child turn is priced.'
        tokens:
          type:
            - integer
            - 'null'
          format: int64
          description: '`null` while no child turn reported token counts.'
          minimum: 0
        turns:
          type: integer
          format: int32
          minimum: 0
    TokenUsageSummary:
      type: object
      properties:
        total:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
    CostEntry:
      type: object
      properties:
        cost:
          type:
            - number
            - 'null'
          format: double
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Session JWT. After `nasiko auth login`, print it with `jq -r
        '.clusters[.active].token' ~/.nasiko/config.json`. API keys aren't
        supported.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.