import requests
url = "https://{FUSION_HOST}/api/templating/zones"
payload = { "id": "6a092bd4-5098-466c-94aa-40bf68294303" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://{FUSION_HOST}/api/templating/zones")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"6a092bd4-5098-466c-94aa-40bf68294303\"\n}")
.asString();const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({id: '6a092bd4-5098-466c-94aa-40bf68294303'})
};
fetch('https://{FUSION_HOST}/api/templating/zones', 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}/api/templating/zones")
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 \"id\": \"6a092bd4-5098-466c-94aa-40bf68294303\"\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/templating/zones"
payload := strings.NewReader("{\n \"id\": \"6a092bd4-5098-466c-94aa-40bf68294303\"\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}/api/templating/zones",
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([
'id' => '6a092bd4-5098-466c-94aa-40bf68294303'
]),
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}/api/templating/zones \
--header 'Content-Type: application/json' \
--data '
{
"id": "6a092bd4-5098-466c-94aa-40bf68294303"
}
'{
"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"
}This response has no body data.This response has no body data.This response has no body data.This response has no body data.Post zone
Add a new zone to specify the rules for a query profile.
import requests
url = "https://{FUSION_HOST}/api/templating/zones"
payload = { "id": "6a092bd4-5098-466c-94aa-40bf68294303" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://{FUSION_HOST}/api/templating/zones")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"6a092bd4-5098-466c-94aa-40bf68294303\"\n}")
.asString();const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({id: '6a092bd4-5098-466c-94aa-40bf68294303'})
};
fetch('https://{FUSION_HOST}/api/templating/zones', 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}/api/templating/zones")
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 \"id\": \"6a092bd4-5098-466c-94aa-40bf68294303\"\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/templating/zones"
payload := strings.NewReader("{\n \"id\": \"6a092bd4-5098-466c-94aa-40bf68294303\"\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}/api/templating/zones",
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([
'id' => '6a092bd4-5098-466c-94aa-40bf68294303'
]),
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}/api/templating/zones \
--header 'Content-Type: application/json' \
--data '
{
"id": "6a092bd4-5098-466c-94aa-40bf68294303"
}
'{
"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"
}This response has no body data.This response has no body data.This response has no body data.This response has no body data.Query Parameters
Body
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).
Response
OK
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).
Was this page helpful?