import requests
url = "https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}"
payload = {
"context": {},
"facets": {
"fields": [
{
"domain": {
"additionalFilters": [{ "type": "<string>" }],
"excludedFiltersByName": ["<string>"]
},
"ensuredValues": ["<string>"],
"field": "<string>",
"limit": 123,
"minCount": 123,
"missing": True,
"offset": 123,
"prefix": "<string>"
}
],
"groupFacets": True,
"ranges": [
{
"domain": {
"additionalFilters": [{ "type": "<string>" }],
"excludedFiltersByName": ["<string>"]
},
"end": "<string>",
"field": "<string>",
"gap": "<string>",
"hardEnd": True,
"include": [],
"minCount": 123,
"other": [],
"start": "<string>"
}
]
},
"params": {},
"queryDefinition": {
"boostsByQuery": [
{
"boost": 123,
"query": { "type": "<string>" },
"type": "<string>"
}
],
"boostsByValues": [
{
"boosts": [
{
"boost": 123,
"key": "<string>"
}
],
"field": "<string>"
}
],
"filters": [{ "type": "<string>" }],
"groupedFilters": [{ "type": "<string>" }],
"groupedQuery": { "type": "<string>" },
"main": { "type": "<string>" },
"namedFilters": [
{
"name": "<string>",
"query": { "type": "<string>" }
}
],
"userQuery": "<string>"
},
"results": {
"cursor": "<string>",
"fields": ["<string>"],
"group": {
"field": "<string>",
"leaderStrategy": { "type": "<string>" },
"size": 123,
"sort": [
{
"query": { "type": "<string>" },
"value": "<string>"
}
]
},
"highlight": {
"count": 123,
"defaultHighlight": True,
"fields": ["<string>"],
"length": 123,
"post": "<string>",
"pre": "<string>"
},
"includeRawResponse": True,
"returnScore": True,
"size": 123,
"sort": [
{
"query": { "type": "<string>" },
"value": "<string>"
}
],
"start": 123
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}")
.header("Content-Type", "application/json")
.body("{\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"field\": \"<string>\",\n \"limit\": 123,\n \"minCount\": 123,\n \"missing\": true,\n \"offset\": 123,\n \"prefix\": \"<string>\"\n }\n ],\n \"groupFacets\": true,\n \"ranges\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"end\": \"<string>\",\n \"field\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"include\": [],\n \"minCount\": 123,\n \"other\": [],\n \"start\": \"<string>\"\n }\n ]\n },\n \"params\": {},\n \"queryDefinition\": {\n \"boostsByQuery\": [\n {\n \"boost\": 123,\n \"query\": {\n \"type\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n ],\n \"boostsByValues\": [\n {\n \"boosts\": [\n {\n \"boost\": 123,\n \"key\": \"<string>\"\n }\n ],\n \"field\": \"<string>\"\n }\n ],\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"main\": {\n \"type\": \"<string>\"\n },\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"userQuery\": \"<string>\"\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ]\n },\n \"highlight\": {\n \"count\": 123,\n \"defaultHighlight\": true,\n \"fields\": [\n \"<string>\"\n ],\n \"length\": 123,\n \"post\": \"<string>\",\n \"pre\": \"<string>\"\n },\n \"includeRawResponse\": true,\n \"returnScore\": true,\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"start\": 123\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
context: {},
facets: {
fields: [
{
domain: {additionalFilters: [{type: '<string>'}], excludedFiltersByName: ['<string>']},
ensuredValues: ['<string>'],
field: '<string>',
limit: 123,
minCount: 123,
missing: true,
offset: 123,
prefix: '<string>'
}
],
groupFacets: true,
ranges: [
{
domain: {additionalFilters: [{type: '<string>'}], excludedFiltersByName: ['<string>']},
end: '<string>',
field: '<string>',
gap: '<string>',
hardEnd: true,
include: [],
minCount: 123,
other: [],
start: '<string>'
}
]
},
params: {},
queryDefinition: {
boostsByQuery: [{boost: 123, query: {type: '<string>'}, type: '<string>'}],
boostsByValues: [{boosts: [{boost: 123, key: '<string>'}], field: '<string>'}],
filters: [{type: '<string>'}],
groupedFilters: [{type: '<string>'}],
groupedQuery: {type: '<string>'},
main: {type: '<string>'},
namedFilters: [{name: '<string>', query: {type: '<string>'}}],
userQuery: '<string>'
},
results: {
cursor: '<string>',
fields: ['<string>'],
group: {
field: '<string>',
leaderStrategy: {type: '<string>'},
size: 123,
sort: [{query: {type: '<string>'}, value: '<string>'}]
},
highlight: {
count: 123,
defaultHighlight: true,
fields: ['<string>'],
length: 123,
post: '<string>',
pre: '<string>'
},
includeRawResponse: true,
returnScore: true,
size: 123,
sort: [{query: {type: '<string>'}, value: '<string>'}],
start: 123
}
})
};
fetch('https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"field\": \"<string>\",\n \"limit\": 123,\n \"minCount\": 123,\n \"missing\": true,\n \"offset\": 123,\n \"prefix\": \"<string>\"\n }\n ],\n \"groupFacets\": true,\n \"ranges\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"end\": \"<string>\",\n \"field\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"include\": [],\n \"minCount\": 123,\n \"other\": [],\n \"start\": \"<string>\"\n }\n ]\n },\n \"params\": {},\n \"queryDefinition\": {\n \"boostsByQuery\": [\n {\n \"boost\": 123,\n \"query\": {\n \"type\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n ],\n \"boostsByValues\": [\n {\n \"boosts\": [\n {\n \"boost\": 123,\n \"key\": \"<string>\"\n }\n ],\n \"field\": \"<string>\"\n }\n ],\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"main\": {\n \"type\": \"<string>\"\n },\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"userQuery\": \"<string>\"\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ]\n },\n \"highlight\": {\n \"count\": 123,\n \"defaultHighlight\": true,\n \"fields\": [\n \"<string>\"\n ],\n \"length\": 123,\n \"post\": \"<string>\",\n \"pre\": \"<string>\"\n },\n \"includeRawResponse\": true,\n \"returnScore\": true,\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"start\": 123\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}"
payload := strings.NewReader("{\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"field\": \"<string>\",\n \"limit\": 123,\n \"minCount\": 123,\n \"missing\": true,\n \"offset\": 123,\n \"prefix\": \"<string>\"\n }\n ],\n \"groupFacets\": true,\n \"ranges\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"end\": \"<string>\",\n \"field\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"include\": [],\n \"minCount\": 123,\n \"other\": [],\n \"start\": \"<string>\"\n }\n ]\n },\n \"params\": {},\n \"queryDefinition\": {\n \"boostsByQuery\": [\n {\n \"boost\": 123,\n \"query\": {\n \"type\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n ],\n \"boostsByValues\": [\n {\n \"boosts\": [\n {\n \"boost\": 123,\n \"key\": \"<string>\"\n }\n ],\n \"field\": \"<string>\"\n }\n ],\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"main\": {\n \"type\": \"<string>\"\n },\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"userQuery\": \"<string>\"\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ]\n },\n \"highlight\": {\n \"count\": 123,\n \"defaultHighlight\": true,\n \"fields\": [\n \"<string>\"\n ],\n \"length\": 123,\n \"post\": \"<string>\",\n \"pre\": \"<string>\"\n },\n \"includeRawResponse\": true,\n \"returnScore\": true,\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"start\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'context' => [
],
'facets' => [
'fields' => [
[
'domain' => [
'additionalFilters' => [
[
'type' => '<string>'
]
],
'excludedFiltersByName' => [
'<string>'
]
],
'ensuredValues' => [
'<string>'
],
'field' => '<string>',
'limit' => 123,
'minCount' => 123,
'missing' => true,
'offset' => 123,
'prefix' => '<string>'
]
],
'groupFacets' => true,
'ranges' => [
[
'domain' => [
'additionalFilters' => [
[
'type' => '<string>'
]
],
'excludedFiltersByName' => [
'<string>'
]
],
'end' => '<string>',
'field' => '<string>',
'gap' => '<string>',
'hardEnd' => true,
'include' => [
],
'minCount' => 123,
'other' => [
],
'start' => '<string>'
]
]
],
'params' => [
],
'queryDefinition' => [
'boostsByQuery' => [
[
'boost' => 123,
'query' => [
'type' => '<string>'
],
'type' => '<string>'
]
],
'boostsByValues' => [
[
'boosts' => [
[
'boost' => 123,
'key' => '<string>'
]
],
'field' => '<string>'
]
],
'filters' => [
[
'type' => '<string>'
]
],
'groupedFilters' => [
[
'type' => '<string>'
]
],
'groupedQuery' => [
'type' => '<string>'
],
'main' => [
'type' => '<string>'
],
'namedFilters' => [
[
'name' => '<string>',
'query' => [
'type' => '<string>'
]
]
],
'userQuery' => '<string>'
],
'results' => [
'cursor' => '<string>',
'fields' => [
'<string>'
],
'group' => [
'field' => '<string>',
'leaderStrategy' => [
'type' => '<string>'
],
'size' => 123,
'sort' => [
[
'query' => [
'type' => '<string>'
],
'value' => '<string>'
]
]
],
'highlight' => [
'count' => 123,
'defaultHighlight' => true,
'fields' => [
'<string>'
],
'length' => 123,
'post' => '<string>',
'pre' => '<string>'
],
'includeRawResponse' => true,
'returnScore' => true,
'size' => 123,
'sort' => [
[
'query' => [
'type' => '<string>'
],
'value' => '<string>'
]
],
'start' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request POST \
--url https://{FUSION_HOST.com}/api/templating/triggerDSL/{app} \
--header 'Content-Type: application/json' \
--data '
{
"context": {},
"facets": {
"fields": [
{
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
},
"ensuredValues": [
"<string>"
],
"field": "<string>",
"limit": 123,
"minCount": 123,
"missing": true,
"offset": 123,
"prefix": "<string>"
}
],
"groupFacets": true,
"ranges": [
{
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
},
"end": "<string>",
"field": "<string>",
"gap": "<string>",
"hardEnd": true,
"include": [],
"minCount": 123,
"other": [],
"start": "<string>"
}
]
},
"params": {},
"queryDefinition": {
"boostsByQuery": [
{
"boost": 123,
"query": {
"type": "<string>"
},
"type": "<string>"
}
],
"boostsByValues": [
{
"boosts": [
{
"boost": 123,
"key": "<string>"
}
],
"field": "<string>"
}
],
"filters": [
{
"type": "<string>"
}
],
"groupedFilters": [
{
"type": "<string>"
}
],
"groupedQuery": {
"type": "<string>"
},
"main": {
"type": "<string>"
},
"namedFilters": [
{
"name": "<string>",
"query": {
"type": "<string>"
}
}
],
"userQuery": "<string>"
},
"results": {
"cursor": "<string>",
"fields": [
"<string>"
],
"group": {
"field": "<string>",
"leaderStrategy": {
"type": "<string>"
},
"size": 123,
"sort": [
{
"query": {
"type": "<string>"
},
"value": "<string>"
}
]
},
"highlight": {
"count": 123,
"defaultHighlight": true,
"fields": [
"<string>"
],
"length": 123,
"post": "<string>",
"pre": "<string>"
},
"includeRawResponse": true,
"returnScore": true,
"size": 123,
"sort": [
{
"query": {
"type": "<string>"
},
"value": "<string>"
}
],
"start": 123
}
}
'{
"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"
}
],
"search": "<string>",
"urlContext": "<string>",
"urlPath": "<string>"
}
]
}
}This response has no body data.This response has no body data.This response has no body data.This response has no body data.Get a template
Retrieve the template for the given navigation state. By default will only trigger published versions of templates, specify staging=true to instead trigger staging versions of templates.Navigation state is determined by the userQuery (for the search terms) and the filters from the DSL request (for the filter values).
import requests
url = "https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}"
payload = {
"context": {},
"facets": {
"fields": [
{
"domain": {
"additionalFilters": [{ "type": "<string>" }],
"excludedFiltersByName": ["<string>"]
},
"ensuredValues": ["<string>"],
"field": "<string>",
"limit": 123,
"minCount": 123,
"missing": True,
"offset": 123,
"prefix": "<string>"
}
],
"groupFacets": True,
"ranges": [
{
"domain": {
"additionalFilters": [{ "type": "<string>" }],
"excludedFiltersByName": ["<string>"]
},
"end": "<string>",
"field": "<string>",
"gap": "<string>",
"hardEnd": True,
"include": [],
"minCount": 123,
"other": [],
"start": "<string>"
}
]
},
"params": {},
"queryDefinition": {
"boostsByQuery": [
{
"boost": 123,
"query": { "type": "<string>" },
"type": "<string>"
}
],
"boostsByValues": [
{
"boosts": [
{
"boost": 123,
"key": "<string>"
}
],
"field": "<string>"
}
],
"filters": [{ "type": "<string>" }],
"groupedFilters": [{ "type": "<string>" }],
"groupedQuery": { "type": "<string>" },
"main": { "type": "<string>" },
"namedFilters": [
{
"name": "<string>",
"query": { "type": "<string>" }
}
],
"userQuery": "<string>"
},
"results": {
"cursor": "<string>",
"fields": ["<string>"],
"group": {
"field": "<string>",
"leaderStrategy": { "type": "<string>" },
"size": 123,
"sort": [
{
"query": { "type": "<string>" },
"value": "<string>"
}
]
},
"highlight": {
"count": 123,
"defaultHighlight": True,
"fields": ["<string>"],
"length": 123,
"post": "<string>",
"pre": "<string>"
},
"includeRawResponse": True,
"returnScore": True,
"size": 123,
"sort": [
{
"query": { "type": "<string>" },
"value": "<string>"
}
],
"start": 123
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}")
.header("Content-Type", "application/json")
.body("{\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"field\": \"<string>\",\n \"limit\": 123,\n \"minCount\": 123,\n \"missing\": true,\n \"offset\": 123,\n \"prefix\": \"<string>\"\n }\n ],\n \"groupFacets\": true,\n \"ranges\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"end\": \"<string>\",\n \"field\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"include\": [],\n \"minCount\": 123,\n \"other\": [],\n \"start\": \"<string>\"\n }\n ]\n },\n \"params\": {},\n \"queryDefinition\": {\n \"boostsByQuery\": [\n {\n \"boost\": 123,\n \"query\": {\n \"type\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n ],\n \"boostsByValues\": [\n {\n \"boosts\": [\n {\n \"boost\": 123,\n \"key\": \"<string>\"\n }\n ],\n \"field\": \"<string>\"\n }\n ],\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"main\": {\n \"type\": \"<string>\"\n },\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"userQuery\": \"<string>\"\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ]\n },\n \"highlight\": {\n \"count\": 123,\n \"defaultHighlight\": true,\n \"fields\": [\n \"<string>\"\n ],\n \"length\": 123,\n \"post\": \"<string>\",\n \"pre\": \"<string>\"\n },\n \"includeRawResponse\": true,\n \"returnScore\": true,\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"start\": 123\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
context: {},
facets: {
fields: [
{
domain: {additionalFilters: [{type: '<string>'}], excludedFiltersByName: ['<string>']},
ensuredValues: ['<string>'],
field: '<string>',
limit: 123,
minCount: 123,
missing: true,
offset: 123,
prefix: '<string>'
}
],
groupFacets: true,
ranges: [
{
domain: {additionalFilters: [{type: '<string>'}], excludedFiltersByName: ['<string>']},
end: '<string>',
field: '<string>',
gap: '<string>',
hardEnd: true,
include: [],
minCount: 123,
other: [],
start: '<string>'
}
]
},
params: {},
queryDefinition: {
boostsByQuery: [{boost: 123, query: {type: '<string>'}, type: '<string>'}],
boostsByValues: [{boosts: [{boost: 123, key: '<string>'}], field: '<string>'}],
filters: [{type: '<string>'}],
groupedFilters: [{type: '<string>'}],
groupedQuery: {type: '<string>'},
main: {type: '<string>'},
namedFilters: [{name: '<string>', query: {type: '<string>'}}],
userQuery: '<string>'
},
results: {
cursor: '<string>',
fields: ['<string>'],
group: {
field: '<string>',
leaderStrategy: {type: '<string>'},
size: 123,
sort: [{query: {type: '<string>'}, value: '<string>'}]
},
highlight: {
count: 123,
defaultHighlight: true,
fields: ['<string>'],
length: 123,
post: '<string>',
pre: '<string>'
},
includeRawResponse: true,
returnScore: true,
size: 123,
sort: [{query: {type: '<string>'}, value: '<string>'}],
start: 123
}
})
};
fetch('https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"field\": \"<string>\",\n \"limit\": 123,\n \"minCount\": 123,\n \"missing\": true,\n \"offset\": 123,\n \"prefix\": \"<string>\"\n }\n ],\n \"groupFacets\": true,\n \"ranges\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"end\": \"<string>\",\n \"field\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"include\": [],\n \"minCount\": 123,\n \"other\": [],\n \"start\": \"<string>\"\n }\n ]\n },\n \"params\": {},\n \"queryDefinition\": {\n \"boostsByQuery\": [\n {\n \"boost\": 123,\n \"query\": {\n \"type\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n ],\n \"boostsByValues\": [\n {\n \"boosts\": [\n {\n \"boost\": 123,\n \"key\": \"<string>\"\n }\n ],\n \"field\": \"<string>\"\n }\n ],\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"main\": {\n \"type\": \"<string>\"\n },\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"userQuery\": \"<string>\"\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ]\n },\n \"highlight\": {\n \"count\": 123,\n \"defaultHighlight\": true,\n \"fields\": [\n \"<string>\"\n ],\n \"length\": 123,\n \"post\": \"<string>\",\n \"pre\": \"<string>\"\n },\n \"includeRawResponse\": true,\n \"returnScore\": true,\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"start\": 123\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}"
payload := strings.NewReader("{\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"field\": \"<string>\",\n \"limit\": 123,\n \"minCount\": 123,\n \"missing\": true,\n \"offset\": 123,\n \"prefix\": \"<string>\"\n }\n ],\n \"groupFacets\": true,\n \"ranges\": [\n {\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n },\n \"end\": \"<string>\",\n \"field\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"include\": [],\n \"minCount\": 123,\n \"other\": [],\n \"start\": \"<string>\"\n }\n ]\n },\n \"params\": {},\n \"queryDefinition\": {\n \"boostsByQuery\": [\n {\n \"boost\": 123,\n \"query\": {\n \"type\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n ],\n \"boostsByValues\": [\n {\n \"boosts\": [\n {\n \"boost\": 123,\n \"key\": \"<string>\"\n }\n ],\n \"field\": \"<string>\"\n }\n ],\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"main\": {\n \"type\": \"<string>\"\n },\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"userQuery\": \"<string>\"\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ]\n },\n \"highlight\": {\n \"count\": 123,\n \"defaultHighlight\": true,\n \"fields\": [\n \"<string>\"\n ],\n \"length\": 123,\n \"post\": \"<string>\",\n \"pre\": \"<string>\"\n },\n \"includeRawResponse\": true,\n \"returnScore\": true,\n \"size\": 123,\n \"sort\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"value\": \"<string>\"\n }\n ],\n \"start\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'context' => [
],
'facets' => [
'fields' => [
[
'domain' => [
'additionalFilters' => [
[
'type' => '<string>'
]
],
'excludedFiltersByName' => [
'<string>'
]
],
'ensuredValues' => [
'<string>'
],
'field' => '<string>',
'limit' => 123,
'minCount' => 123,
'missing' => true,
'offset' => 123,
'prefix' => '<string>'
]
],
'groupFacets' => true,
'ranges' => [
[
'domain' => [
'additionalFilters' => [
[
'type' => '<string>'
]
],
'excludedFiltersByName' => [
'<string>'
]
],
'end' => '<string>',
'field' => '<string>',
'gap' => '<string>',
'hardEnd' => true,
'include' => [
],
'minCount' => 123,
'other' => [
],
'start' => '<string>'
]
]
],
'params' => [
],
'queryDefinition' => [
'boostsByQuery' => [
[
'boost' => 123,
'query' => [
'type' => '<string>'
],
'type' => '<string>'
]
],
'boostsByValues' => [
[
'boosts' => [
[
'boost' => 123,
'key' => '<string>'
]
],
'field' => '<string>'
]
],
'filters' => [
[
'type' => '<string>'
]
],
'groupedFilters' => [
[
'type' => '<string>'
]
],
'groupedQuery' => [
'type' => '<string>'
],
'main' => [
'type' => '<string>'
],
'namedFilters' => [
[
'name' => '<string>',
'query' => [
'type' => '<string>'
]
]
],
'userQuery' => '<string>'
],
'results' => [
'cursor' => '<string>',
'fields' => [
'<string>'
],
'group' => [
'field' => '<string>',
'leaderStrategy' => [
'type' => '<string>'
],
'size' => 123,
'sort' => [
[
'query' => [
'type' => '<string>'
],
'value' => '<string>'
]
]
],
'highlight' => [
'count' => 123,
'defaultHighlight' => true,
'fields' => [
'<string>'
],
'length' => 123,
'post' => '<string>',
'pre' => '<string>'
],
'includeRawResponse' => true,
'returnScore' => true,
'size' => 123,
'sort' => [
[
'query' => [
'type' => '<string>'
],
'value' => '<string>'
]
],
'start' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request POST \
--url https://{FUSION_HOST.com}/api/templating/triggerDSL/{app} \
--header 'Content-Type: application/json' \
--data '
{
"context": {},
"facets": {
"fields": [
{
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
},
"ensuredValues": [
"<string>"
],
"field": "<string>",
"limit": 123,
"minCount": 123,
"missing": true,
"offset": 123,
"prefix": "<string>"
}
],
"groupFacets": true,
"ranges": [
{
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
},
"end": "<string>",
"field": "<string>",
"gap": "<string>",
"hardEnd": true,
"include": [],
"minCount": 123,
"other": [],
"start": "<string>"
}
]
},
"params": {},
"queryDefinition": {
"boostsByQuery": [
{
"boost": 123,
"query": {
"type": "<string>"
},
"type": "<string>"
}
],
"boostsByValues": [
{
"boosts": [
{
"boost": 123,
"key": "<string>"
}
],
"field": "<string>"
}
],
"filters": [
{
"type": "<string>"
}
],
"groupedFilters": [
{
"type": "<string>"
}
],
"groupedQuery": {
"type": "<string>"
},
"main": {
"type": "<string>"
},
"namedFilters": [
{
"name": "<string>",
"query": {
"type": "<string>"
}
}
],
"userQuery": "<string>"
},
"results": {
"cursor": "<string>",
"fields": [
"<string>"
],
"group": {
"field": "<string>",
"leaderStrategy": {
"type": "<string>"
},
"size": 123,
"sort": [
{
"query": {
"type": "<string>"
},
"value": "<string>"
}
]
},
"highlight": {
"count": 123,
"defaultHighlight": true,
"fields": [
"<string>"
],
"length": 123,
"post": "<string>",
"pre": "<string>"
},
"includeRawResponse": true,
"returnScore": true,
"size": 123,
"sort": [
{
"query": {
"type": "<string>"
},
"value": "<string>"
}
],
"start": 123
}
}
'{
"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"
}
],
"search": "<string>",
"urlContext": "<string>",
"urlPath": "<string>"
}
]
}
}This response has no body data.This response has no body data.This response has no body data.This response has no body data.Path Parameters
Application ID
Query Parameters
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.
Comma-separated list of template types, indicating which possible types of templates to trigger (e.g. landing, item-detail...)
Body
DSL request
Response
OK
Ordered list of zones with associated trigger criteria.
Show child attributes
Show child attributes
Was this page helpful?