> ## 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 tasks

> The tasks a run finished, and the one it stopped at.

Same visibility as `GET /api/crew-runs/{run_id}`: your own runs, or any
run with `nx1_crew_admin`. `replayable` says whether the run can be
restarted at a task, and `reason` says why not when it cannot.



## OpenAPI

````yaml get /api/crew-runs/{run_id}/tasks
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}/tasks:
    get:
      tags:
        - Crew runs
      summary: List a run's tasks
      description: |-
        The tasks a run finished, and the one it stopped at.

        Same visibility as `GET /api/crew-runs/{run_id}`: your own runs, or any
        run with `nx1_crew_admin`. `replayable` says whether the run can be
        restarted at a task, and `reason` says why not when it cannot.
      operationId: list_run_tasks_api_crew_runs__run_id__tasks_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.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrewRunTasksResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '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:
    CrewRunTasksResponse:
      properties:
        run_id:
          type: string
          format: uuid
          title: Run Id
          description: The run these tasks belong to.
        replayable:
          type: boolean
          title: Replayable
          description: >-
            Whether this run can be restarted at a task: a custom crew with at
            least one kept task.
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: Why it cannot be restarted, when it cannot.
        parent_run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Run Id
          description: The run this one replayed, if any.
        replayed_from_task:
          anyOf:
            - type: integer
            - type: 'null'
          title: Replayed From Task
          description: The task index this run started at, if a replay.
        tasks:
          items:
            $ref: '#/components/schemas/CrewRunTaskResponse'
          type: array
          title: Tasks
          description: The tasks, in the order they ran.
      type: object
      required:
        - run_id
        - replayable
      title: CrewRunTasksResponse
      description: A run's kept tasks, and whether it can be restarted at one.
    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
    CrewRunTaskResponse:
      properties:
        task_index:
          type: integer
          title: Task Index
          description: The task's position in the crew, from zero. Replay starts here.
        task_key:
          type: string
          title: Task Key
          description: The task's name, or its trimmed description.
        agent:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent
          description: The agent that produced it.
        raw:
          anyOf:
            - type: string
            - type: 'null'
          title: Raw
          description: The task's output text.
        raised:
          type: boolean
          title: Raised
          description: The task raised instead of finishing; it has no output.
          default: false
        was_replayed:
          type: boolean
          title: Was Replayed
          description: The output came from a replay.
          default: false
        finished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished At
          description: When the task finished.
      type: object
      required:
        - task_index
        - task_key
      title: CrewRunTaskResponse
      description: |-
        One task a run finished, or the one it stopped at.

        The raw output is a model's own text, so these are returned only to
        people who can already see the run.
    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.