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

# Runs grouped by crew

> How often each crew ran, and how those runs ended.

The Runs list starts here: a row per crew, newest activity first. Your
own runs, or everyone's with `nx1_crew_admin`, like the runs list.
Counted in SQL over every run, so a busy crew's total is not the size
of one page.

Declared before `/{run_id}` so `by-crew` is not read as a run id.



## OpenAPI

````yaml get /api/crew-runs/by-crew
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/by-crew:
    get:
      tags:
        - Crew runs
      summary: Runs grouped by crew
      description: |-
        How often each crew ran, and how those runs ended.

        The Runs list starts here: a row per crew, newest activity first. Your
        own runs, or everyone's with `nx1_crew_admin`, like the runs list.
        Counted in SQL over every run, so a busy crew's total is not the size
        of one page.

        Declared before `/{run_id}` so `by-crew` is not read as a run id.
      operationId: list_runs_by_crew_api_crew_runs_by_crew_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CrewRunCountResponse'
                type: array
                title: Response List Runs By Crew Api Crew Runs By Crew Get
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    CrewRunCountResponse:
      properties:
        template_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Template Id
          description: >-
            The saved crew. Null for runs that had no template: an ad-hoc crew
            from the canvas, or a preset crew.
        name:
          type: string
          title: Name
          description: The crew's name, or a label for untemplated runs.
        runs:
          type: integer
          title: Runs
          description: How many times it has run.
        completed:
          type: integer
          title: Completed
          description: Runs that finished with a result.
        failed:
          type: integer
          title: Failed
          description: Runs that failed.
        running:
          type: integer
          title: Running
          description: Runs in flight now.
        last_run_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Run At
          description: When it last started.
      type: object
      required:
        - name
        - runs
        - completed
        - failed
        - running
      title: CrewRunCountResponse
      description: |-
        One crew in the Runs list: how often it ran, and how those ended.

        Counted in SQL over every run, not over a page of them, so a busy
        crew's total is the real one.
  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.