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

> Retrieve templates with optional (hierarchical) fields to filter results. 

Each template can have a staging (unpublished) and a published version. A staging version with unpublished changes is considered to be dirty.



## OpenAPI

````yaml /api-reference/5.9/fusion-api-templating.json get /settings
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:
  /settings:
    get:
      tags:
        - template-settings-controller
      summary: Get templates
      description: >-
        Retrieve templates with optional (hierarchical) fields to filter
        results. 


        Each template can have a staging (unpublished) and a published version.
        A staging version with unpublished changes is considered to be dirty.
      operationId: get-settings-templates-optional-fields
      parameters:
        - name: allRequestParams
          in: query
          description: allRequestParams
          required: true
          schema: {}
        - 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: app: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
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/templateSettingsRequest'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
components:
  schemas:
    templateSettingsRequest:
      title: Template Settings Request
      x-stoplight:
        id: e84236f7f583a
      type: object
      description: ''
      properties:
        app:
          type: string
          description: The Fusion application name.
          example: your-app-name
        entityDirty:
          type: boolean
          description: >-
            Specifies the status of the entities requested. 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.
        hierarchyFields:
          type: array
          x-stoplight:
            id: bzyhjw9l4iipv
          items:
            x-stoplight:
              id: xul5uqx0vqlif
            type: object
            properties:
              field:
                type: string
                x-stoplight:
                  id: t2mdcss1n49dp
                description: 'Hierarchical field name associated with the template. '
                example: product_description
              fieldName:
                type: string
                x-stoplight:
                  id: ztz4erkcbb8wx
                description: 'Hierarchical field name associated with the template. '
                example: product_description
              separator:
                type: string
                x-stoplight:
                  id: tbr8knjclk5um
                description: >-
                  The character that separates each hierarchical field specified
                  for the template.
                example: ;
        id:
          type: string
          description: >-
            The version of the application that is sending the results. Because
            the application configuration can be changed, the version used for
            the query is helpful information if troubleshooting or investigation
            is necessary. The format is: "your-app-name:version".

````