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

# Get the crews hub

> Every crew you can see with how it is doing: its last run, runs in
progress, the outcome of its last 30 runs, its soonest schedule, and
whether a pinned registry version has an update. Also the four
activity tiles (running now, needs attention, next scheduled, updates
available) and, per crew, what you may do with it.

Runs and schedules counted are your own, or everyone's with
`nx1_crew_admin`.

Declared before `/{template_id}` so `hub` is not read as a template id.



## OpenAPI

````yaml get /api/crew-templates/hub
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-templates/hub:
    get:
      tags:
        - Crew templates
      summary: Get the crews hub
      description: |-
        Every crew you can see with how it is doing: its last run, runs in
        progress, the outcome of its last 30 runs, its soonest schedule, and
        whether a pinned registry version has an update. Also the four
        activity tiles (running now, needs attention, next scheduled, updates
        available) and, per crew, what you may do with it.

        Runs and schedules counted are your own, or everyone's with
        `nx1_crew_admin`.

        Declared before `/{template_id}` so `hub` is not read as a template id.
      operationId: get_hub_api_crew_templates_hub_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrewHubResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    CrewHubResponse:
      properties:
        tiles:
          $ref: '#/components/schemas/CrewHubTiles'
        crews:
          items:
            $ref: '#/components/schemas/CrewHubRow'
          type: array
          title: Crews
      type: object
      required:
        - tiles
        - crews
      title: CrewHubResponse
      description: 'The crews hub: activity tiles and one row per crew.'
    CrewHubTiles:
      properties:
        running_now:
          type: integer
          title: Running Now
          default: 0
        running_crews:
          items:
            $ref: '#/components/schemas/HubCrewRef'
          type: array
          title: Running Crews
        needs_attention:
          items:
            $ref: '#/components/schemas/HubCrewRef'
          type: array
          title: Needs Attention
        next_scheduled:
          anyOf:
            - $ref: '#/components/schemas/HubCrewRef'
            - type: 'null'
        next_scheduled_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Scheduled At
        active_schedules:
          type: integer
          title: Active Schedules
          default: 0
        updates_available:
          items:
            $ref: '#/components/schemas/HubCrewRef'
          type: array
          title: Updates Available
      type: object
      title: CrewHubTiles
      description: The four activity tiles above the crew table.
    CrewHubRow:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
          default: ''
        tags:
          items:
            type: string
          type: array
          title: Tags
        owner:
          type: string
          title: Owner
        is_shared:
          type: boolean
          title: Is Shared
          default: false
        current_version:
          type: integer
          title: Current Version
          default: 1
        version_saved_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Version Saved At
        updated_at:
          type: string
          title: Updated At
        updates_available:
          type: integer
          title: Updates Available
          description: Pinned registry versions that have a newer one.
          default: 0
        blocked:
          type: boolean
          title: Blocked
          description: A pinned version stops the crew from running.
          default: false
        variables:
          items:
            $ref: '#/components/schemas/TemplateVariable'
          type: array
          title: Variables
        schedule:
          anyOf:
            - $ref: '#/components/schemas/HubSchedule'
            - type: 'null'
        last_run:
          anyOf:
            - $ref: '#/components/schemas/HubRun'
            - type: 'null'
          description: The newest run that has ended.
        active_runs:
          items:
            $ref: '#/components/schemas/HubRun'
          type: array
          title: Active Runs
        health:
          $ref: '#/components/schemas/HubHealth'
        failure_rate:
          type: number
          title: Failure Rate
          description: Share of the last 30 ended runs that failed.
          default: 0
        permissions:
          $ref: '#/components/schemas/HubPermissions'
      type: object
      required:
        - id
        - name
        - owner
        - updated_at
      title: CrewHubRow
      description: One crew on the hub.
    HubCrewRef:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        count:
          type: integer
          title: Count
          default: 1
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
      type: object
      required:
        - id
        - name
      title: HubCrewRef
      description: A crew named on an activity tile.
    TemplateVariable:
      properties:
        name:
          type: string
          maxLength: 64
          minLength: 1
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
          title: Name
          description: >-
            The ``{placeholder}`` key in task descriptions. ``snake_case``, must
            be a valid Python identifier.
        label:
          type: string
          maxLength: 200
          minLength: 1
          title: Label
          description: Human-readable label rendered in the run form.
        description:
          type: string
          maxLength: 2000
          title: Description
          description: Optional help text shown under the form field.
          default: ''
        type:
          type: string
          enum:
            - string
            - text
            - number
            - integer
            - boolean
            - select
            - multi_select
            - domain
            - dataset
            - table
            - tag
            - glossary_term
            - document
          title: Type
          description: Drives the portal widget and backend coercion.
          default: string
        required:
          type: boolean
          title: Required
          description: When True, run requests must supply a value.
          default: true
        default:
          anyOf:
            - {}
            - type: 'null'
          title: Default
          description: >-
            Optional default value applied when the runner omits this variable.
            Coerced to the declared ``type``.
        choices:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Choices
          description: Allowed values for ``select`` / ``multi_select`` types.
        min_length:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Length
        max_length:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Length
        min_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Min Value
        max_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Value
        sensitive:
          type: boolean
          title: Sensitive
          description: >-
            When ``True``, portal masks the input as a password field and the
            backend redacts the value from any logged run record.
          default: false
        group:
          anyOf:
            - type: string
            - type: 'null'
          title: Group
          description: Optional bucket name. The portal renders fields in grouped sections.
        show_if:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Show If
          description: >-
            Optional conditional visibility. The portal hides the field unless
            every named variable currently has the listed value. For example,
            ``{"federated": true}``.
      type: object
      required:
        - name
        - label
      title: TemplateVariable
      description: |-
        One declared input on a user-saved crew template.

        Variables are the contract between the template author and the
        runner: the author lists the ``{placeholder}`` keys their tasks
        reference and the metadata the portal needs to render a form.
        The runner supplies values, which the backend validates against
        this spec before kicking off the crew.
    HubSchedule:
      properties:
        id:
          type: string
          title: Id
        cron:
          type: string
          title: Cron
        timezone:
          type: string
          title: Timezone
        next_run_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Run At
        active_count:
          type: integer
          title: Active Count
          description: Active schedules of the crew.
          default: 1
      type: object
      required:
        - id
        - cron
        - timezone
      title: HubSchedule
      description: The soonest active schedule of a crew.
    HubRun:
      properties:
        id:
          type: string
          title: Id
        status:
          $ref: '#/components/schemas/shared__models__crew_models__RunStatus'
        trigger:
          anyOf:
            - type: string
            - type: 'null'
          title: Trigger
        owner_id:
          type: string
          title: Owner Id
        created_at:
          type: string
          title: Created At
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Ended At
        current_task:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Task
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Why it failed, cut to one line.
        crew_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Crew Version
      type: object
      required:
        - id
        - status
        - owner_id
        - created_at
      title: HubRun
      description: 'A run as the hub shows it: enough for a status pill and a reason.'
    HubHealth:
      properties:
        ok:
          type: integer
          title: Ok
          default: 0
        failed:
          type: integer
          title: Failed
          default: 0
        running:
          type: integer
          title: Running
          default: 0
        total:
          type: integer
          title: Total
          default: 0
      type: object
      title: HubHealth
      description: How a crew's last 30 runs went.
    HubPermissions:
      properties:
        can_run:
          type: boolean
          title: Can Run
          default: true
        can_edit:
          type: boolean
          title: Can Edit
          default: false
        can_schedule:
          type: boolean
          title: Can Schedule
          default: true
      type: object
      title: HubPermissions
      description: What the viewer may do with a crew. The portal hides the rest.
    shared__models__crew_models__RunStatus:
      type: string
      enum:
        - queued
        - running
        - paused
        - awaiting_approval
        - succeeded
        - failed
        - cancelled
        - timed_out
      title: RunStatus
      description: |-
        The state of a crew run, as stored and as the runs API reports it.

        ``CrewRunStatusEnum`` above is the older four-value vocabulary. It is
        still what ``/api/crews/results`` and the background status tools
        answer with (see :func:`legacy_status`), because callers outside the
        portal read those.
  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.