import requests
url = "https://{FUSION_HOST.com}/api/templating/trigger/{app}"
response = requests.get(url)
print(response.text){
"triggered": {
"app": "your-app-name",
"id": "6a163bd4-5098-466c-22aa-40bf68294303",
"name": "Item-Detail Page",
"all": true,
"priority": 10,
"dirty": true,
"templateDirty": false,
"markedForDeletion": false,
"type": "lan",
"metadata": {
"type": "landing"
},
"zones": [
{
"id": "6a092bd4-5098-466c-94aa-40bf68294303",
"name": "Results List",
"type": "result-list",
"queryProfile": "fusion-query-profile-name",
"omitFilters": false,
"dirty": true,
"neverPublished": true,
"metadata": {
"image": "image-id",
"primary": "primary-metadata-id",
"secondary": "_text_"
},
"inTemplates": [
"e123f4bc-5e7e-46dd-9be8-71a4f73e511a, 8084969c-bd23-40f7-9acf-c68d6798bec2, 441eb3be-7de6-470a-8141-e416a15c7db1, fb148491-b39e-46d1-af33-44cd964d8ee0"
],
"staging": false,
"published": false,
"layout": "grid"
}
],
"neverPublished": false,
"published": true,
"staging": true,
"dirtyZoneIds": [
"a3e0e22-9e6a-45h9-a2e7-5hjk72b9a3ea, 5avc1e65-162d-5b8e-92f0-6a962e0f43c5"
],
"startTime": "2024-08-24T14:15:22Z",
"endTime": "2024-08-24T14:15:22Z",
"triggers": [
{
"exact": true,
"filters": [
{
"inheritable": true,
"key": "key1",
"value": "value1"
}
],
"matchMode": "all",
"search": "<string>",
"urlContext": "<string>",
"urlPath": "<string>"
}
]
}
}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.
import requests
url = "https://{FUSION_HOST.com}/api/templating/trigger/{app}"
response = requests.get(url)
print(response.text){
"triggered": {
"app": "your-app-name",
"id": "6a163bd4-5098-466c-22aa-40bf68294303",
"name": "Item-Detail Page",
"all": true,
"priority": 10,
"dirty": true,
"templateDirty": false,
"markedForDeletion": false,
"type": "lan",
"metadata": {
"type": "landing"
},
"zones": [
{
"id": "6a092bd4-5098-466c-94aa-40bf68294303",
"name": "Results List",
"type": "result-list",
"queryProfile": "fusion-query-profile-name",
"omitFilters": false,
"dirty": true,
"neverPublished": true,
"metadata": {
"image": "image-id",
"primary": "primary-metadata-id",
"secondary": "_text_"
},
"inTemplates": [
"e123f4bc-5e7e-46dd-9be8-71a4f73e511a, 8084969c-bd23-40f7-9acf-c68d6798bec2, 441eb3be-7de6-470a-8141-e416a15c7db1, fb148491-b39e-46d1-af33-44cd964d8ee0"
],
"staging": false,
"published": false,
"layout": "grid"
}
],
"neverPublished": false,
"published": true,
"staging": true,
"dirtyZoneIds": [
"a3e0e22-9e6a-45h9-a2e7-5hjk72b9a3ea, 5avc1e65-162d-5b8e-92f0-6a962e0f43c5"
],
"startTime": "2024-08-24T14:15:22Z",
"endTime": "2024-08-24T14:15:22Z",
"triggers": [
{
"exact": true,
"filters": [
{
"inheritable": true,
"key": "key1",
"value": "value1"
}
],
"matchMode": "all",
"search": "<string>",
"urlContext": "<string>",
"urlPath": "<string>"
}
]
}
}The Fusion application name.
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.
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.
The comma-separated list of template types to retrieve. Options include item-detail, landing, and typeahead. The default is landing.
OK
Ordered list of zones with associated trigger criteria.
Show child attributes
The Fusion application name.
"your-app-name"
The universal unique identifier (UUID) of the Fusion application.
"6a163bd4-5098-466c-22aa-40bf68294303"
The name of the template in this application.
"Item-Detail Page"
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.
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.
10
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.
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.
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.
The type of template associated with the response. Examples include landing and item-detail.
"lan"
Show child attributes
The universal unique identifier (UUID) of the zone.
"6a092bd4-5098-466c-94aa-40bf68294303"
The name of the zone that contains the specified query profiles to search in the query.
"Results List"
Read-only value that classifies the zone in the Fusion Predictive Merchandiser UI. This value does not affect the triggering/rendering logic.
"result-list"
The query profile for this zone, that designates the endpoint that is searched.
"fusion-query-profile-name"
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).
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.
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.
Additional data associated with this zone.
Show child attributes
ID for the image associated with the zone.
"image-id"
The unique ID for the primary metadata associated with the zone.
"primary-metadata-id"
Additional text data for the zone.
"_text_"
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.
Specifies if IDs are returned for staging templates associated with this zone.
Specifies if IDs are returned for published templates associated with this zone.
The type of layout for the template. Values include grid and list.
"grid"
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.
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.
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.
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.
The beginning date and time (in Epoch time format) when the template can be used.
"2024-08-24T14:15:22Z"
The template cannot be used after this date and time. The format is Epoch time format.
"2024-08-24T14:15:22Z"
Triggers - only one trigger needs to be satisfied in order for this template to trigger.
Show child attributes
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 (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.
Show child attributes
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.
The name of the property for the trigger.
"key1"
The value of the property of the trigger.
"value1"
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.
all, exact, phrase Search terms required in the query for this trigger to match. The configured analysis will be applied to tokenize and process these terms.
The context for the URL used in this trigger. The URL context and path must match the request to trigger this template.
The URL path for this trigger.
Was this page helpful?