> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cnap.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Get template details

> Returns template with its helm sources.



## OpenAPI

````yaml /openapi.json get /v1/templates/{id}
openapi: 3.1.0
info:
  title: CNAP API
  version: 1.0.0
  description: >-
    Public API for managing CNAP workspaces, clusters, templates, products, and
    deployments.


    Authenticate with a Personal Access Token via the `Authorization: Bearer
    cnap_pat_...` header.


    Workspace-scoped endpoints require the `X-Workspace-Id` header.
servers:
  - url: https://api.cnap.tech
    description: Production
security: []
paths:
  /v1/templates/{id}:
    get:
      tags:
        - Templates
      summary: Get template details
      description: Returns template with its helm sources.
      parameters:
        - schema:
            type: string
            description: Template ID
          required: true
          description: Template ID
          name: id
          in: path
      responses:
        '200':
          description: Template details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateDetail'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    TemplateDetail:
      allOf:
        - $ref: '#/components/schemas/Template'
        - type: object
          properties:
            helm_sources:
              type: array
              items:
                $ref: '#/components/schemas/HelmSource'
              description: Helm chart sources for this template
          required:
            - helm_sources
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: not_found
            message:
              type: string
              example: Resource not found
            param:
              type: string
              description: The request field that caused the error
              example: name
            suggestion:
              type: string
              example: Run `cnap clusters list` to see available clusters
            details: {}
          required:
            - code
            - message
      required:
        - error
    Template:
      type: object
      properties:
        id:
          type: string
          example: j572abc123def456
        name:
          type: string
          example: PostgreSQL HA
        workspace_id:
          type: string
          example: j572abc123def456
        registry_proxy_mode:
          type:
            - string
            - 'null'
          enum:
            - auto
            - always
            - never
            - null
          example: auto
          description: OCI registry proxy mode for image pulls
        created_at:
          type: number
          description: Unix timestamp (seconds)
      required:
        - id
        - name
        - workspace_id
        - registry_proxy_mode
        - created_at
    HelmSource:
      type: object
      properties:
        id:
          type: string
          example: j572abc123def456
        chart:
          $ref: '#/components/schemas/HelmSourceChart'
        values:
          type: object
          additionalProperties: {}
          description: Helm values override
        metadata:
          type: object
          additionalProperties: {}
          description: Source metadata (ArtifactHub info, image details)
      required:
        - id
        - chart
    HelmSourceChart:
      type: object
      properties:
        repo_url:
          type: string
          example: https://charts.bitnami.com/bitnami
          description: Helm repository URL or Git repository URL
        chart:
          type: string
          example: postgresql
          description: Chart name within the repository
        target_revision:
          type: string
          example: 15.5.0
          description: Chart version or Git revision
        path:
          type: string
          example: charts/my-chart
          description: Path within a Git repository to the chart
      required:
        - repo_url
        - target_revision
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at
        https://cnap.tech/account/tokens

````