> ## 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 triggered template using your-app-name

> Retrieve the template that should trigger for the specified Fusion application name using `your-app-name`. Query parameters let you specify status (published or unpublished(staging)) of the templates of the zone. 



## OpenAPI

````yaml /api-reference/5.9/fusion-api-templating.json get /trigger/{app}
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:
  /trigger/{app}:
    parameters:
      - schema:
          type: string
        name: app
        in: path
        required: true
        description: The Fusion application name.
    get:
      tags:
        - trigger-controller
      summary: Get triggered template using your-app-name
      description: >-
        Retrieve the template that should trigger for the specified Fusion
        application name using `your-app-name`. Query parameters let you specify
        status (published or unpublished(staging)) of the templates of the
        zone. 
      operationId: get-trigger-by-applicationName
      parameters:
        - name: params
          in: query
          description: Query parameters
          required: true
          schema: {}
        - name: showInactive
          in: query
          description: >-
            The legacy parameter that is the same as the staging parameter. 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: staging
          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: templateTypes
          in: query
          description: >-
            The comma-separated list of template types to retrieve. Options
            include item-detail, landing, and typeahead. The default is
            `landing`.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/triggerResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
components:
  schemas:
    triggerResponse:
      title: triggerResponse
      x-stoplight:
        id: 287809fb042eb
      type: object
      properties:
        triggered:
          $ref: '#/components/schemas/templateWithZones'
      description: ''
    templateWithZones:
      title: templateWithZones
      x-stoplight:
        id: 83da126f6b52c
      type: object
      description: Ordered list of zones with associated trigger criteria.
      required:
        - app
        - id
      properties:
        app:
          type: string
          description: The Fusion application name.
          example: your-app-name
        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.
        priority:
          type: integer
          format: int64
          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.
          default: true
        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.
          default: false
        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.
          default: false
        type:
          type: string
          description: >-
            The type of template associated with the response. Examples include
            landing and item-detail.
          example: lan
        metadata:
          type: object
          description: Additional data associated with the template.
          properties:
            type:
              type: string
              x-stoplight:
                id: 33ngpb0pkd3t7
              description: >-
                The type of template associated with the response. Examples
                include landing and item-detail.
              example: landing
        zones:
          type: array
          items:
            $ref: '#/components/schemas/zone'
        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.
          default: false
        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.
        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.
        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
        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: >-
            Triggers - only one trigger needs to be satisfied in order for this
            template to trigger.
          items:
            $ref: '#/components/schemas/trigger'
    zone:
      title: Zone
      x-stoplight:
        id: 7d2ff9dde3cbb
      type: object
      required:
        - id
      properties:
        name:
          type: string
          description: >-
            The name of the zone that contains the specified query profiles to
            search in the query.
          example: Results List
        id:
          type: string
          description: The universal unique identifier (UUID) of the zone.
          example: 6a092bd4-5098-466c-94aa-40bf68294303
          format: uuid
        type:
          type: string
          description: >-
            Read-only value that classifies the zone in the Fusion Predictive
            Merchandiser UI. This value does not affect the triggering/rendering
            logic. 
          example: result-list
        queryProfile:
          type: string
          x-stoplight:
            id: zi250yjpgkfrx
          description: >-
            The query profile for this zone, that designates the endpoint that
            is searched.
          example: fusion-query-profile-name
        omitFilters:
          type: boolean
          x-stoplight:
            id: qoqbd8mfoq6b2
          description: >-
            Specifies whether to include filters `fq` parameters in the search.
            If set to `Off`, all query parameters in the original request are
            passed on to the defined query profile when a template is being
            rendered. If set to `On`, all filters (`fq` parameters) from the
            original request are omitted from the query to the query profile.
            For example, if you have a category landing page where the category
            is used to filter the displayed items, this setting can allow a zone
            to display items outside of that category (by omitting the category
            filter).
          default: false
        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.
        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.
        metadata:
          type: object
          description: Additional data associated with this zone.
          properties:
            image:
              type: string
              x-stoplight:
                id: ng7twgf49w0wo
              description: ID for the image associated with the zone.
              example: image-id
            primary:
              type: string
              x-stoplight:
                id: pd68k7gfs977m
              description: The unique ID for the primary metadata associated with the zone.
              example: primary-metadata-id
            secondary:
              type: string
              x-stoplight:
                id: za5f0vppycwja
              description: Additional text data for the zone.
              example: _text_
        inTemplates:
          type: array
          description: >-
            IDs of the staging and/or published templates in which this zone
            appears. The IDs are not displayed in any particular order. The
            `staging` and `published` boolean fields specify if that type of
            template ID is returned in this field.
          items:
            type: string
            example: >-
              e123f4bc-5e7e-46dd-9be8-71a4f73e511a,
              8084969c-bd23-40f7-9acf-c68d6798bec2,
              441eb3be-7de6-470a-8141-e416a15c7db1,
              fb148491-b39e-46d1-af33-44cd964d8ee0
        staging:
          type: boolean
          description: >-
            Specifies if IDs are returned for staging templates associated with
            this zone.
          default: false
        published:
          type: boolean
          description: >-
            Specifies if IDs are returned for published templates associated
            with this zone.
          default: false
        layout:
          type: string
          x-stoplight:
            id: fpwelumw4uze6
          description: The type of layout for the template. Values include grid and list.
          example: grid
    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

````