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

# List recorded routing decisions (role-scoped)

> Recent router_replay rows. An ``nx1_airouter_admin`` sees everything;
any other authenticated caller is scoped to their own rows.



## OpenAPI

````yaml get /api/airouter/replay
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/airouter/replay:
    get:
      tags:
        - AI Router
      summary: List recorded routing decisions (role-scoped)
      description: |-
        Recent router_replay rows. An ``nx1_airouter_admin`` sees everything;
        any other authenticated caller is scoped to their own rows.
      operationId: list_replay_api_airouter_replay_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Offset
        - name: decision
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Decision
        - name: model
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Model
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReplayListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ReplayListResponse:
      properties:
        scope:
          type: string
          enum:
            - user
            - admin
          title: Scope
        available:
          type: boolean
          title: Available
          description: False when the replay store is unreachable.
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        records:
          items:
            $ref: '#/components/schemas/ReplayRecord'
          type: array
          title: Records
      type: object
      required:
        - scope
        - available
      title: ReplayListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ReplayRecord:
      properties:
        id:
          type: string
          title: Id
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
        timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: Timestamp
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        decision:
          anyOf:
            - type: string
            - type: 'null'
          title: Decision
        selected_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Selected Model
        response_status:
          anyOf:
            - type: integer
            - type: 'null'
          title: Response Status
        latency_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Latency Ms
        total_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Tokens
        from_cache:
          anyOf:
            - type: boolean
            - type: 'null'
          title: From Cache
        prompt_preview:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt Preview
        request_body:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Body
        response_body:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Body
      type: object
      required:
        - id
      title: ReplayRecord
      description: One recorded routing decision from the router_replay store.
    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:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

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