import requests
url = "https://{FUSION_HOST}/api/templating/templates/{id}"
response = requests.get(url)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION_HOST}/api/templating/templates/{id}")
.asString();const options = {method: 'GET'};
fetch('https://{FUSION_HOST}/api/templating/templates/{id}', 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/templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/templating/templates/{id}"
req, _ := http.NewRequest("GET", url, nil)
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/templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://{FUSION_HOST}/api/templating/templates/{id}{
"app": "<string>",
"id": "6a163bd4-5098-466c-22aa-40bf68294303",
"name": "Item-Detail Page",
"all": false,
"priority": 10,
"dirty": true,
"templateDirty": true,
"markedForDeletion": true,
"neverPublished": true,
"type": "landing",
"zoneIds": [
"ab6d0e24-9e7a-35h9-a2e7-5hjl72b8a3ea, 2abc1e65-162d-3a8e-76f0-6a962e0f43c5"
],
"dirtyZoneIds": [
"a3e0e22-9e6a-45h9-a2e7-5hjk72b9a3ea, 5avc1e65-162d-5b8e-92f0-6a962e0f43c5"
],
"metadata": {
"layout": "list"
},
"staging": true,
"published": true,
"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>"
}
]
}This response has no body data.This response has no body data.This response has no body data.Get template information by templateId
Get template information for a specific template using templateId.
import requests
url = "https://{FUSION_HOST}/api/templating/templates/{id}"
response = requests.get(url)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION_HOST}/api/templating/templates/{id}")
.asString();const options = {method: 'GET'};
fetch('https://{FUSION_HOST}/api/templating/templates/{id}', 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/templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/templating/templates/{id}"
req, _ := http.NewRequest("GET", url, nil)
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/templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://{FUSION_HOST}/api/templating/templates/{id}{
"app": "<string>",
"id": "6a163bd4-5098-466c-22aa-40bf68294303",
"name": "Item-Detail Page",
"all": false,
"priority": 10,
"dirty": true,
"templateDirty": true,
"markedForDeletion": true,
"neverPublished": true,
"type": "landing",
"zoneIds": [
"ab6d0e24-9e7a-35h9-a2e7-5hjl72b8a3ea, 2abc1e65-162d-3a8e-76f0-6a962e0f43c5"
],
"dirtyZoneIds": [
"a3e0e22-9e6a-45h9-a2e7-5hjk72b9a3ea, 5avc1e65-162d-5b8e-92f0-6a962e0f43c5"
],
"metadata": {
"layout": "list"
},
"staging": true,
"published": true,
"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>"
}
]
}This response has no body data.This response has no body data.This response has no body data.Query Parameters
Response
OK
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 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 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.
Was this page helpful?