> ## 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 a run's events

> Everything that happened in a run, in order: tasks, model calls, tool
calls with their arguments and results, approvals and warnings.

Page with `after_seq`: pass the last `seq` you received. Secrets are
masked before an event is stored. A large request or response is cut
(`truncated`); `GET /events/{seq}/payload` returns all of it.



## OpenAPI

````yaml get /api/crew-runs/{run_id}/events
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/crew-runs/{run_id}/events:
    get:
      tags:
        - Crew runs
      summary: List a run's events
      description: |-
        Everything that happened in a run, in order: tasks, model calls, tool
        calls with their arguments and results, approvals and warnings.

        Page with `after_seq`: pass the last `seq` you received. Secrets are
        masked before an event is stored. A large request or response is cut
        (`truncated`); `GET /events/{seq}/payload` returns all of it.
      operationId: list_events_api_crew_runs__run_id__events_get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: ID of the run record.
            title: Run Id
          description: ID of the run record.
        - name: after_seq
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Return events after this `seq`.
            default: 0
            title: After Seq
          description: Return events after this `seq`.
        - name: kind
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Keep only these kinds, e.g. `kind=tool&kind=llm`.
            title: Kind
          description: Keep only these kinds, e.g. `kind=tool&kind=llm`.
        - name: task
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: A task id, e.g. `t0`.
            title: Task
          description: A task id, e.g. `t0`.
        - name: agent
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: An agent id.
            title: Agent
          description: An agent id.
        - name: tool
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: A tool name.
            title: Tool
          description: A tool name.
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 200
              - type: 'null'
            description: Text in the title or summary.
            title: Q
          description: Text in the title or summary.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 500
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RunEventResponse'
                title: Response List Events Api Crew Runs  Run Id  Events Get
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    RunEventResponse:
      properties:
        run_id:
          type: string
          format: uuid
          title: Run Id
        seq:
          type: integer
          title: Seq
          description: Position in the run, from 1. Resume a stream from it.
        ts:
          type: string
          format: date-time
          title: Ts
        kind:
          type: string
          title: Kind
          description: >-
            `run`, `task`, `thought`, `llm`, `tool`, `approval`, `steer`,
            `warn`, `error` or `log`.
        phase:
          anyOf:
            - type: string
            - type: 'null'
          title: Phase
          description: '`start` or `end` of a paired event; else null.'
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
          description: '`t<index>` of its task.'
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Id
        parent_seq:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parent Seq
          description: The start event this end event closes.
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
          default: ''
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: '`ok`, `error` or null.'
        request:
          title: Request
          description: Secrets masked; may be cut.
        response:
          title: Response
          description: Secrets masked; may be cut.
        truncated:
          type: boolean
          title: Truncated
          description: The body was cut. Fetch `/events/{seq}/payload` for all of it.
          default: false
        usage:
          additionalProperties:
            type: integer
          type: object
          title: Usage
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        external_ref:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: External Ref
          description: '`{system, id, url}` of a job running elsewhere.'
      type: object
      required:
        - run_id
        - seq
        - ts
        - kind
        - title
      title: RunEventResponse
      description: One event of a run's timeline.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    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:
    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.