> ## 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 what keeps going wrong with a crew

> Failures the crew's current version keeps repeating, most frequent
first: which task, after which tool, how, what to change, and the latest
run to look at. From your own runs (everyone's for a crew admin). Empty
when nothing has failed the same way twice.



## OpenAPI

````yaml get /api/crew-templates/{template_id}/insights
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/{template_id}/insights:
    get:
      tags:
        - Crew templates
      summary: Get what keeps going wrong with a crew
      description: |-
        Failures the crew's current version keeps repeating, most frequent
        first: which task, after which tool, how, what to change, and the latest
        run to look at. From your own runs (everyone's for a crew admin). Empty
        when nothing has failed the same way twice.
      operationId: get_insights_api_crew_templates__template_id__insights_get
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: ID of the crew template.
            title: Template Id
          description: ID of the crew template.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CrewInsight'
                title: >-
                  Response Get Insights Api Crew Templates  Template Id 
                  Insights Get
        '404':
          description: Template not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    CrewInsight:
      properties:
        task_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Task Index
          description: The task the runs stopped in, from 0.
        tool:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool
          description: The last tool those runs called.
        error_class:
          type: string
          title: Error Class
          description: >-
            `timeout`, `rate_limit`, `access`, `approval`, `limit`, `not_found`,
            `connection` or `error`.
        count:
          type: integer
          title: Count
          description: How many recent runs failed this way.
        runs:
          type: integer
          title: Runs
          description: How many recent runs were looked at.
        title:
          type: string
          title: Title
          description: The pattern, in a sentence.
        sample:
          type: string
          title: Sample
          description: The latest such run's error.
          default: ''
        hint:
          type: string
          title: Hint
          description: What to change.
        field:
          type: string
          title: Field
          description: >-
            Where in the builder to change it, e.g.
            `tasks[1].max_execution_time`.
        last_run_id:
          type: string
          title: Last Run Id
          description: The latest run that failed this way.
        last_at:
          type: string
          title: Last At
      type: object
      required:
        - error_class
        - count
        - runs
        - title
        - hint
        - field
        - last_run_id
        - last_at
      title: CrewInsight
      description: A way a crew keeps failing, and what to change.
    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.