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

# Get templates schema

> Retrieve the detailed structure of the contents of a template.



## OpenAPI

````yaml /api-reference/5.9/fusion-api-templating.json get /templates/_schema
openapi: 3.0.1
info:
  title: Fusion Templating API
  description: >-
    This API lets you perform create, read, update, and delete (CRUD) operations
    on templates and zones, and retrieve and render templates for particular
    navigation states.
  termsOfService: https://lucidworks.com/legal/developer-license-agreement/
  contact:
    name: Lucidworks
    url: https://lucidworks.com
    email: support@lucidworks.com
  license:
    name: License of API
    url: https://lucidworks.com/legal/developer-license-agreement/
  version: '5.9'
servers:
  - url: https://{FUSION_HOST.com}/api/templating
    description: Fusion
    variables:
      FUSION_HOST.com:
        default: ''
security: []
tags:
  - name: page-metadata-controller
    description: Endpoints with this tag modify page metadata.
  - name: render-controller
    description: >-
      Endpoints with this tag use the GET and POST operations to retrieve,
      render, create, read, update, and delete Fusion application templates that
      are published or in staging (unpublished).
  - name: template-settings-controller
    description: >-
      Endpoints with this tag use the GET, POST, PUT, and DELETE operations to
      create, read, update, and delete configuration information for the Fusion
      Templating service.
  - name: templates-controller
    description: >-
      Endpoints with this tag use the GET, POST, PUT, and DELETE operations to
      create, read, update, and delete Fusion application template information.
  - name: trigger-controller
    description: >-
      Endpoints with this tag use the GET and POST operations to retrieve,
      create, read, and update the Fusion application templates that are
      published or in staging (unpublished) without rendering.
  - name: zones-controller
    description: >-
      Endpoints with this tag use the GET, POST, PUT, and DELETE operations to
      retrieve, create, read, update, and delete zone information (Fusion query
      profiles).
paths:
  /templates/_schema:
    get:
      tags:
        - template-settings-controller
      summary: Get templates schema
      description: Retrieve the detailed structure of the contents of a template.
      operationId: get-templates-schema
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/templatesSchemaResponse'
              examples: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      security: []
components:
  schemas:
    templatesSchemaResponse:
      title: Templates Schema Response
      x-stoplight:
        id: gaj5nltrhvcm5
      type: object
      required:
        - id
      properties:
        type:
          type: string
          default: object
          description: The type of object returned in the response.
          example: Templating Template
        title:
          type: string
          description: Description of what is returned in the schema response.
          example: Templating Template
        description:
          type: string
          description: Description of the information stored in the schema.
          example: Stores configuration of the templates.
        properties:
          type: object
          description: Properties stored in the schema.
          required:
            - app
          properties:
            dirty:
              type: boolean
              x-stoplight:
                id: 2j99g6nvqtzbd
              description: >-
                The status of the template. If `false`, the template is
                published. If `true`, this is the staging version of this
                template and it contains changes that have not yet been
                published.
            zoneIds:
              type: array
              x-stoplight:
                id: 0b8qms89nyo3a
              description: >-
                The comma-delimited list of universal unique identifiers (UUIDs)
                of the zones (query profiles) that are associated with the
                template.
              items:
                x-stoplight:
                  id: pdnj0ea0jhil1
                type: string
                example: >-
                  ab6d0e24-9e7a-35h9-a2e7-5hjl72b8a3ea,
                  2abc1e65-162d-3a8e-76f0-6a962e0f43c5
            metadata:
              type: object
              x-stoplight:
                id: bhqmnves4jswv
              description: Additional data associated with this template.
            isStaging:
              type: boolean
              x-stoplight:
                id: j1nyh5fk70z3z
              description: >-
                This field indicates if the templates is published or
                unpublished (staging). If set to `false`, the template is
                published. If set to `true`, the template is unpublished
                (staging).
            startTime:
              type: string
              x-stoplight:
                id: a55tqkfjyrvm7
              description: >-
                The beginning date and time (in Epoch time format) when the
                template can be used.
              format: date-time
            app:
              type: string
              x-stoplight:
                id: 8uzleshldc2v9
              description: The Fusion application associated with this template.
              example: application-id
            isPublished:
              type: boolean
              x-stoplight:
                id: r1qpedwkc37ks
              description: >-
                This field indicates if the template is a published template. If
                `true`, this template has a status of published. If `false`,
                this template is not a template with a status of published.
            triggers:
              $ref: '#/components/schemas/trigger'
        category:
          type: string
          description: The category of the object in the schema.
        categoryPriority:
          type: integer
          description: The importance (priority) of the object in the schema.
        unsafe:
          type: boolean
          description: >-
            The security status of the objects in the schema. If `false`, the
            schema contents are valid. If `true`, the schema contents are not
            valid.
        all:
          type: boolean
          x-stoplight:
            id: stn4zz9lgto5r
          description: >-
            This field indicates if the request includes published or
            unpublished (staging) templates. The default of `false` includes
            only published templates. If set to `true`, the request includes
            published and unpublished (staging) templates.
        isMarkedForDeletion:
          type: boolean
          x-stoplight:
            id: ez62vvjczqwgh
          description: >-
            This field indicates if the staging version of this template has
            been marked for deletion, but the deletion has not been completed
            because it has not been published yet. If `true`, the template has
            been marked for deletion, and when it is published, it will actually
            be deleted. If `false`, the template has not been marked for
            deletion.
        endTime:
          type: string
          x-stoplight:
            id: 9rj8golw45xoe
          description: >-
            The template cannot be used after this date and time. The format is
            Epoch time format.
          format: date-time
          example: '2024-08-24T14:15:22Z'
        dirtyZoneIds:
          type: array
          x-stoplight:
            id: nzuy3t2t9i2e3
          description: >-
            The comma-delimited list of universal unique identifiers (UUIDs) of
            the zones (query profiles) that are associated with the template and
            have unpublished changes. This only applies to zones and is
            different from the status of the template. Even if the associated
            template is dirty (contains some type of changes that have not yet
            been published), the zones and their respective changes are
            separate.
          items:
            x-stoplight:
              id: djkko5331vfgt
            type: string
            example: >-
              a3e0e22-9e6a-45h9-a2e7-5hjk72b9a3ea,
              5avc1e65-162d-5b8e-92f0-6a962e0f43c5
        templateDirty:
          type: boolean
          x-stoplight:
            id: 5nno5r2aykycx
          description: >-
            The status of the template. If `false`, the template does not have
            unpublished changes. If `true`, this is the staging version of this
            template and it contains changes that have not yet been published.
            This only applies to templates and is different from the status of
            the zone. Even if the associated zone (query profile) for this
            template is dirty (contains some type of changes that have not yet
            been published), the template and its status are separate.
          default: false
        neverPublished:
          type: boolean
          x-stoplight:
            id: 93io83q0hwua0
          description: >-
            The status of the template in the zone. If `false`, the template has
            been published at some point. If `true`, this template has never
            been published.
          default: false
        name:
          type: string
          x-stoplight:
            id: p62l84lz2c70j
          description: The Fusion application name.
          example: your-app-name
        priority:
          type: integer
          x-stoplight:
            id: ek677d02u2upz
          description: >-
            The order in which this template is processed when multiple
            templates with the same status (published or staging) are associated
            with the application. The higher the number, the earlier the
            template will be used. For example, a template with a priority of 10
            is triggered before a template with a priority of 3.
          format: int64
          example: 10
        id:
          type: string
          x-stoplight:
            id: ohmojz4vcy92z
          description: The universal unique identifier (UUID) of the Fusion application.
          format: uuid
          example: 6a163bd4-5098-466c-22aa-40bf68294303
    trigger:
      title: Trigger
      x-stoplight:
        id: c2653282c4224
      type: object
      description: >-
        An individual trigger criteria for a template. All the conditions
        indicated in the trigger must be met for the trigger to be a match on a
        particular nav state. A trigger consists of search (q) and filter (fq)
        criteria.
      properties:
        exact:
          type: boolean
          description: >-
            This field specifies if the template status (published or staging)
            must match this trigger's criteria. If `true`, the status must be an
            exact match. No extra filters are allowed, and no search terms are
            allowed if this trigger does not define them. This is not the same
            as `exact` match mode, which specifically defines the search term
            matching logic.
        filters:
          type: array
          description: >-
            Filters (fq) values required in the query for this trigger to match.
            Additional filters may be present in the query (and still satisfy
            this trigger) unless 'exact: true' is specified for this trigger, in
            which case the filters in the query must exactly match the filters
            in this trigger, no more and no less.
          items:
            $ref: '#/components/schemas/KeyAndValue'
        matchMode:
          type: string
          description: >-
            Defines search terms matching criteria. 'phrase' (the default)
            requires the search tokens of this trigger to exist as a phrase
            within the search terms of the query, in the same order. 'all'
            requires the search tokens of this trigger to exist within the
            search terms of the query in any order. 'exact' requires that the
            search tokens in this trigger exactly match the search tokens in the
            query, in the same order. As with all match modes, 'exact' still
            applies the configured analysis, such as stemming, so singular /
            plural forms will be considered identical despite not being
            'exactly' the same.
          enum:
            - all
            - exact
            - phrase
        search:
          type: string
          description: >-
            Search terms required in the query for this trigger to match. The
            configured analysis will be applied to tokenize and process these
            terms.
        urlContext:
          type: string
          description: >-
            The context for the URL used in this trigger. The URL context and
            path must match the request to trigger this template.
        urlPath:
          type: string
          description: The URL path for this trigger.
    KeyAndValue:
      title: KeyAndValue
      type: object
      properties:
        inheritable:
          type: boolean
          description: >-
            This field specifies if the `key:value` pair can be inherited or
            overridden based on the parent/child relationship. If `true`, the
            `key:value` pair can be inherited.
        key:
          type: string
          description: The name of the property for the trigger.
          example: key1
        value:
          type: string
          description: The value of the property of the trigger.
          example: value1
      x-stoplight:
        id: 8vlfjjk96dt0n

````