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

# Get Session

> Retrieve a single session with its full traces (including spans).

Summary fields (trace_count, latency, error, tags, tokens, cost)
are computed via SQL aggregation over *all* traces in the session,
regardless of the pagination window.

Auth: `Bearer` + `X-Project-ID` | `X-API-Key` + `X-Project-Name`



## OpenAPI

````yaml /openapi.json get /sessions/{session_id}
openapi: 3.1.0
info:
  title: PandaProbe API
  description: >-
    Open-source agent engineering platform — trace LLM calls, evaluate agent
    performance, and monitor AI pipelines.
  version: 0.1.0
  contact:
    name: PandaProbe
    url: https://www.pandaprobe.com
    email: support@pandaprobe.com
servers:
  - url: https://api.pandaprobe.com
    description: Production
security: []
tags:
  - name: health
    description: Service health and readiness probes.
  - name: user
    description: Authenticated user profile.
  - name: traces
    description: Trace ingestion, querying, updating, and analytics.
  - name: sessions
    description: Session-based trace aggregation and analytics.
  - name: evaluations
    description: Evaluation runs, scores, analytics, and monitoring.
  - name: organizations
    description: Organization management and membership.
  - name: projects
    description: Project CRUD within organizations.
  - name: api-keys
    description: API key lifecycle management.
paths:
  /sessions/{session_id}:
    get:
      tags:
        - sessions
      summary: Get Session
      description: |-
        Retrieve a single session with its full traces (including spans).

        Summary fields (trace_count, latency, error, tags, tokens, cost)
        are computed via SQL aggregation over *all* traces in the session,
        regardless of the pagination window.

        Auth: `Bearer` + `X-Project-ID` | `X-API-Key` + `X-Project-Name`
      operationId: get_session_sessions__session_id__get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 200
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
        - ApiKey: []
        - ProjectID: []
        - ProjectName: []
components:
  schemas:
    SessionDetail:
      properties:
        session_id:
          type: string
          title: Session Id
        trace_count:
          type: integer
          title: Trace Count
        first_trace_at:
          type: string
          title: First Trace At
        last_trace_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Trace At
        total_latency_ms:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Latency Ms
        has_error:
          type: boolean
          title: Has Error
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        tags:
          items:
            type: string
          type: array
          title: Tags
        total_span_count:
          type: integer
          title: Total Span Count
          default: 0
        total_tokens:
          type: integer
          title: Total Tokens
          default: 0
        total_cost:
          type: number
          title: Total Cost
          default: 0
        traces:
          items:
            $ref: '#/components/schemas/TraceResponse'
          type: array
          title: Traces
      type: object
      required:
        - session_id
        - trace_count
        - first_trace_at
        - last_trace_at
        - total_latency_ms
        - has_error
        - user_id
        - tags
      title: SessionDetail
      description: Single session with its ordered traces (full detail).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TraceResponse:
      properties:
        trace_id:
          type: string
          format: uuid
          title: Trace Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        name:
          type: string
          title: Name
        status:
          $ref: '#/components/schemas/TraceStatus'
        input:
          anyOf:
            - {}
            - type: 'null'
          title: Input
        output:
          anyOf:
            - {}
            - type: 'null'
          title: Output
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        started_at:
          type: string
          title: Started At
        ended_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Ended At
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        tags:
          items:
            type: string
          type: array
          title: Tags
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
        release:
          anyOf:
            - type: string
            - type: 'null'
          title: Release
        spans:
          items:
            $ref: '#/components/schemas/SpanResponse'
          type: array
          title: Spans
      type: object
      required:
        - trace_id
        - project_id
        - name
        - status
        - input
        - output
        - metadata
        - started_at
        - ended_at
        - session_id
        - user_id
        - tags
      title: TraceResponse
      description: Public trace representation (single-item detail).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TraceStatus:
      type: string
      enum:
        - PENDING
        - RUNNING
        - COMPLETED
        - ERROR
      title: TraceStatus
      description: High-level status of a trace.
    SpanResponse:
      properties:
        span_id:
          type: string
          format: uuid
          title: Span Id
        trace_id:
          type: string
          format: uuid
          title: Trace Id
        parent_span_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Span Id
        name:
          type: string
          title: Name
        kind:
          $ref: '#/components/schemas/SpanKind'
        status:
          $ref: '#/components/schemas/SpanStatusCode'
        input:
          anyOf:
            - {}
            - type: 'null'
          title: Input
        output:
          anyOf:
            - {}
            - type: 'null'
          title: Output
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        token_usage:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Token Usage
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        started_at:
          type: string
          title: Started At
        ended_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Ended At
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        completion_start_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Completion Start Time
        model_parameters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Model Parameters
        cost:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          title: Cost
        latency_ms:
          anyOf:
            - type: number
            - type: 'null'
          title: Latency Ms
        time_to_first_token_ms:
          anyOf:
            - type: number
            - type: 'null'
          title: Time To First Token Ms
      type: object
      required:
        - span_id
        - trace_id
        - parent_span_id
        - name
        - kind
        - status
        - input
        - output
        - model
        - token_usage
        - metadata
        - started_at
        - ended_at
        - error
        - completion_start_time
        - model_parameters
        - cost
      title: SpanResponse
      description: Public span representation.
    SpanKind:
      type: string
      enum:
        - AGENT
        - TOOL
        - LLM
        - RETRIEVER
        - CHAIN
        - EMBEDDING
        - OTHER
      title: SpanKind
      description: Categorises what a span represents in an agentic workflow.
    SpanStatusCode:
      type: string
      enum:
        - UNSET
        - OK
        - ERROR
      title: SpanStatusCode
      description: Mirrors the OTel StatusCode for a span's outcome.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
    ProjectID:
      type: apiKey
      in: header
      name: X-Project-ID
    ProjectName:
      type: apiKey
      in: header
      name: X-Project-Name

````