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

# Get Observability Session Spans

> All spans within one session, ordered by ``(timestamp, call_sequence)``.

Tenant + service scoping happens via the WHERE clause - there's no
separate pre-check because a session_id from another tenant or sibling
service simply returns 0 rows (empty list), which the FE treats the
same as "session not found / expired". No leak.



## OpenAPI

````yaml /openapi/openapi.json get /agentic/observability/sessions/{session_id}
openapi: 3.1.0
info:
  title: Streamkap REST API
  description: >-
    The Streamkap REST API allows you to programmatically manage your CDC
    pipelines, sources, destinations, transforms, and more.


    Authenticate using a bearer token obtained from the [Access
    Token](/api-reference/auth/access-token) endpoint with your API client
    credentials.
  contact:
    name: Streamkap Support
    url: https://streamkap.com/
    email: support@streamkap.com
  license:
    name: Proprietary
  version: 2.0.0
servers:
  - url: https://api.streamkap.com
    description: Production
security: []
tags:
  - name: Agents
    description: Create, deploy, and manage Flink-based AI agents.
  - name: Agents Observability
    description: >-
      Read-only views over the MCP audit log: agent rollup, sessions, spans,
      histograms, external-agent verify.
  - name: Alerts
    description: Manage alert subscribers, preferences, and notification credentials.
  - name: Authentication
    description: Obtain and refresh access tokens, manage client credentials and roles.
  - name: Billing
    description: Retrieve usage metrics, summaries, and export billing data.
  - name: Consumer Groups
    description: List, inspect, and reset Kafka consumer group offsets.
  - name: Dashboard
    description: Retrieve organisation-level statistics and overview data.
  - name: Destinations
    description: Create, configure, and manage data destinations and their lifecycle.
  - name: Kafka Access
    description: Manage Kafka users and their access permissions.
  - name: Logs
    description: Query and summarise system logs.
  - name: Pipelines
    description: Create, configure, and manage CDC pipelines and their lifecycle.
  - name: Project Keys
    description: Manage project keys that bundle API credentials and optional Kafka access.
  - name: Schema Registry
    description: Browse schema subjects, versions, and retrieve schema definitions.
  - name: Services
    description: View and switch service metadata.
  - name: Sources
    description: >-
      Create, configure, and manage data sources, snapshots, and their
      lifecycle.
  - name: Tags
    description: Create, update, and manage resource tags for organisation.
  - name: Topics
    description: Browse topic details, statistics, configurations, metrics, and messages.
  - name: Transforms
    description: >-
      Create, deploy, and manage data transforms, unit tests, and implementation
      details.
paths:
  /agentic/observability/sessions/{session_id}:
    get:
      tags:
        - Agents Observability
      summary: Get Observability Session Spans
      description: |-
        All spans within one session, ordered by ``(timestamp, call_sequence)``.

        Tenant + service scoping happens via the WHERE clause - there's no
        separate pre-check because a session_id from another tenant or sibling
        service simply returns 0 rows (empty list), which the FE treats the
        same as "session not found / expired". No leak.
      operationId: getAgenticObservabilitySessionSpans
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ObservabilitySpan'
                title: Response Getagenticobservabilitysessionspans
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - FronteggHTTPAuthentication: []
components:
  schemas:
    ObservabilitySpan:
      properties:
        request_id:
          type: string
          title: Request Id
        tool_name:
          type: string
          title: Tool Name
        started_at:
          type: string
          format: date-time
          title: Started At
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        status:
          type: string
          title: Status
        response_size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Response Size Bytes
        response_truncated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Response Truncated
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        denied_by_profile:
          anyOf:
            - type: string
            - type: 'null'
          title: Denied By Profile
        parameters:
          title: Parameters
        call_sequence:
          anyOf:
            - type: integer
            - type: 'null'
          title: Call Sequence
        topic:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Id
        client_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Id
        project_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Key Id
        tool_profile:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Profile
        access_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Access Mode
      additionalProperties: false
      type: object
      required:
        - request_id
        - tool_name
        - started_at
        - status
      title: ObservabilitySpan
      description: |-
        One span row inside a session.

        ``parameters`` is whatever JSON shape the MCP server logged after its
        own regex + 100-char-truncation sanitiser. We render as-is - never
        re-sanitise on the BE.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    FronteggHTTPAuthentication:
      type: http
      scheme: bearer

````