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

> Retrieve template information. Query parameters let you specify the type of template and if it is published or unpublished (staging).



## OpenAPI

````yaml /api-reference/5.9/fusion-api-templating.json get /templates
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:
    get:
      tags:
        - templates-controller
      summary: Get template information
      description: >-
        Retrieve template information. Query parameters let you specify the type
        of template and if it is published or unpublished (staging).
      operationId: get-template-information
      parameters:
        - name: context
          in: query
          description: >-
            The context parameter retrieves templates for the specified
            application. The parameter format is `app:your-app-name`. Only the
            first application listed in the context is displayed even if a
            comma-delimited list is entered in the parameter. 
          schema:
            type: string
            example: your-app-name
        - name: hideStaging
          in: query
          description: >-
            This field indicates if the request is set to retrieve published or
            unpublished (staging) templates. The default of `false` retrieves
            published templates. If set to `true`, the request retrieves
            unpublished (staging) templates.
          schema:
            type: boolean
            default: false
        - name: showDirtyOnly
          in: query
          description: >-
            This field indicates if the request is set to retrieve published or
            unpublished (staging) templates. The default of `false` retrieves
            published templates. If set to `true`, the request retrieves
            unpublished (staging) templates.
          schema:
            type: boolean
            default: false
        - name: showPublished
          in: query
          description: >-
            This field indicates if the request is set to retrieve published or
            unpublished (staging) templates. If set to `true`, only published
            templates are retrieved. If set to `false`, the request retrieves
            unpublished (staging) templates.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/templateResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
components:
  schemas:
    templateResponse:
      title: Template Response
      x-stoplight:
        id: 28883f5c621ca
      type: object
      required:
        - app
        - id
      properties:
        app:
          type: string
          description: The Fusion application associated with this template.
        id:
          type: string
          description: The universal unique identifier (UUID) of the Fusion application.
          format: uuid
          example: 6a163bd4-5098-466c-22aa-40bf68294303
        name:
          type: string
          description: The name of the template in this application.
          example: Item-Detail Page
        all:
          type: boolean
          description: >-
            This field indicates if the response 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.
          default: false
        priority:
          type: integer
          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.
          example: 10
        dirty:
          type: boolean
          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.
        templateDirty:
          type: boolean
          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.
        markedForDeletion:
          type: boolean
          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.
        neverPublished:
          type: boolean
          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.
        type:
          type: string
          description: >-
            The type of template associated with the response. Examples include
            landing and item-detail.
          example: landing
        zoneIds:
          type: array
          description: >-
            The comma-delimited list of universal unique identifiers (UUIDs) of
            the zones (query profiles) that are associated with the template.
          items:
            type: string
            example: >-
              ab6d0e24-9e7a-35h9-a2e7-5hjl72b8a3ea,
              2abc1e65-162d-3a8e-76f0-6a962e0f43c5
        dirtyZoneIds:
          type: array
          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:
            type: string
            example: >-
              a3e0e22-9e6a-45h9-a2e7-5hjk72b9a3ea,
              5avc1e65-162d-5b8e-92f0-6a962e0f43c5
        metadata:
          type: object
          description: Additional data associated with the template.
          properties:
            layout:
              type: string
              x-stoplight:
                id: zv42tz5888nn5
              description: >-
                The type of layout for the template. Values include grid and
                list.
              example: list
        staging:
          type: boolean
          description: >-
            This field indicates if the template is a staging template. If
            `true`, this template has a status of staging. If `false`, this
            template is not a template with a status of staging.
        published:
          type: boolean
          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.
        startTime:
          type: string
          description: >-
            The beginning date and time (in Epoch time format) when the template
            can be used.
          format: date-time
          example: '2024-08-24T14:15:22Z'
        endTime:
          type: string
          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'
        triggers:
          type: array
          description: Only one trigger needs to be satisfied for this template to trigger.
          items:
            $ref: '#/components/schemas/trigger'
    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

````