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

> Get a single crew template by ID.



## OpenAPI

````yaml get /api/crew-templates/{template_id}
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}:
    get:
      tags:
        - Crew templates
      summary: Get template
      description: Get a single crew template by ID.
      operationId: get_template_api_crew_templates__template_id__get
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Template Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrewTemplateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    CrewTemplateResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        crew_config:
          $ref: '#/components/schemas/CrewConfig'
        tags:
          items:
            type: string
          type: array
          title: Tags
        variables:
          items:
            $ref: '#/components/schemas/TemplateVariable'
          type: array
          title: Variables
        is_shared:
          type: boolean
          title: Is Shared
        created_by:
          type: string
          title: Created By
        updated_by:
          type: string
          title: Updated By
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
        lint_warnings:
          items:
            type: string
          type: array
          title: Lint Warnings
          description: >-
            Authoring-time warnings about drift between the declared variables
            and the ``{placeholders}`` referenced by tasks. Surfaced on create
            or update. Usually empty on read.
      type: object
      required:
        - id
        - name
        - description
        - crew_config
        - tags
        - is_shared
        - created_by
        - updated_by
        - created_at
        - updated_at
      title: CrewTemplateResponse
      description: Response model for a crew template returned from the API.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CrewConfig:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Optional unique identifier for the crew.
        agents:
          items:
            $ref: '#/components/schemas/AgentConfig'
          type: array
          title: Agents
          description: List of agent configurations that make up the crew.
        tasks:
          items:
            $ref: '#/components/schemas/TaskConfig'
          type: array
          title: Tasks
          description: List of task configurations the crew executes.
        verbose:
          type: boolean
          title: Verbose
          description: Whether to enable detailed logging output.
          default: false
        process:
          type: string
          title: Process
          description: Execution process type for tasks.
          default: sequential
      type: object
      required:
        - agents
        - tasks
      title: CrewConfig
      description: Configuration model for a CrewAI crew with agents and tasks.
    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.
    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
    AgentConfig:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Optional unique identifier for the agent.
        role:
          type: string
          title: Role
          description: The agent's role or job title within the crew.
        goal:
          type: string
          title: Goal
          description: The primary objective the agent should achieve.
        backstory:
          type: string
          title: Backstory
          description: Background context that shapes the agent's behavior.
        verbose:
          type: boolean
          title: Verbose
          description: Whether to enable detailed logging output.
          default: false
        allow_delegation:
          type: boolean
          title: Allow Delegation
          description: Whether the agent can delegate tasks to others.
          default: false
        tools:
          items:
            type: string
          type: array
          title: Tools
          description: >-
            Explicit tool ids to grant this agent, drawn from the unified tool
            catalog (GET /api/tools/catalog). Combined with tool_categories as a
            union. When both are empty the agent receives the default crew
            toolset (backward compatible).
        tool_categories:
          items:
            type: string
          type: array
          title: Tool Categories
          description: >-
            Catalog category keys whose tools should all be granted to this
            agent (e.g. "trino", "data_quality").
        use_default_mcps:
          type: boolean
          title: Use Default Mcps
          description: Whether to automatically load tools from MCP servers.
          default: true
      type: object
      required:
        - role
        - goal
        - backstory
      title: AgentConfig
      description: Configuration model for a CrewAI agent with role, goals, and tools.
    TaskConfig:
      properties:
        description:
          type: string
          title: Description
          description: Detailed description of what the task should accomplish.
        agent_index:
          type: integer
          title: Agent Index
          description: Index of the agent in the crew's agent list to handle this task.
          default: 0
        expected_output:
          type: string
          title: Expected Output
          description: Description of the expected task output format.
          default: ''
        tools:
          items:
            type: string
          type: array
          title: Tools
          description: List of additional tool names specific to this task.
      type: object
      required:
        - description
      title: TaskConfig
      description: >-
        Configuration model for a CrewAI task with description and agent
        assignment.
  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

````