import requests
url = "https://{FUSION_HOST.com}/api/templating/renderId/{templateId}"
response = requests.get(url)
print(response.text){
"templateId": "441eb3be-7de6-470a-8141-e416a15c7db1",
"rendered": [
{
"zone": {
"name": "Results List",
"id": "6a092bd4-5098-466c-94aa-40bf68294303",
"type": "result-list",
"queryProfile": "query-profile-name",
"omitFilters": false,
"dirty": false,
"neverPublished": false,
"metadata": {
"image": "image-id",
"secondary": "_text_",
"primary": "primary-metadata-id",
"layout": "grid"
}
},
"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"
}
],
"render": {
"response": {
"docs": [
"<string>"
],
"numFound": 123,
"start": 123,
"maxScore": 123,
"numFoundExact": true
}
},
"responseHeader": {
"zkConnected": true,
"QTime": 123,
"totalTime": 123,
"params": {
"_stateVer_": "your-app-name:version",
"lw.pipelineId": "<string>",
"start": 3,
"params": "\"dictionary[\\\"key1\\\" : \\\"value1\\\", \\\"key2\\\" : [\\\"one\\\", \\\"two\\\", \\\"a\\\", \\\"B\\\", \\\"bubbles\\\"], \\\"key3\\\" : [\\\"five bubbles\\\", \\\"sunny\\\"], \\\"key4\\\" : \\\"value4\\\"\",",
"rows": 10,
"version": "2.2",
"queryProfileID": "query-profile",
"isFusionQuery": true,
"defType": "eDisMax",
"templateTypes": "landing",
"showInactive": true,
"shards.preference": "<string>",
"wt": "json",
"staging": true,
"fusionQueryId": "fusion-query-id"
}
},
"status": 0
}Retrieve template information for the specified templateId. Query parameters let you specify the type of template and if it is published or unpublished (staging).
import requests
url = "https://{FUSION_HOST.com}/api/templating/renderId/{templateId}"
response = requests.get(url)
print(response.text){
"templateId": "441eb3be-7de6-470a-8141-e416a15c7db1",
"rendered": [
{
"zone": {
"name": "Results List",
"id": "6a092bd4-5098-466c-94aa-40bf68294303",
"type": "result-list",
"queryProfile": "query-profile-name",
"omitFilters": false,
"dirty": false,
"neverPublished": false,
"metadata": {
"image": "image-id",
"secondary": "_text_",
"primary": "primary-metadata-id",
"layout": "grid"
}
},
"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"
}
],
"render": {
"response": {
"docs": [
"<string>"
],
"numFound": 123,
"start": 123,
"maxScore": 123,
"numFoundExact": true
}
},
"responseHeader": {
"zkConnected": true,
"QTime": 123,
"totalTime": 123,
"params": {
"_stateVer_": "your-app-name:version",
"lw.pipelineId": "<string>",
"start": 3,
"params": "\"dictionary[\\\"key1\\\" : \\\"value1\\\", \\\"key2\\\" : [\\\"one\\\", \\\"two\\\", \\\"a\\\", \\\"B\\\", \\\"bubbles\\\"], \\\"key3\\\" : [\\\"five bubbles\\\", \\\"sunny\\\"], \\\"key4\\\" : \\\"value4\\\"\",",
"rows": 10,
"version": "2.2",
"queryProfileID": "query-profile",
"isFusionQuery": true,
"defType": "eDisMax",
"templateTypes": "landing",
"showInactive": true,
"shards.preference": "<string>",
"wt": "json",
"staging": true,
"fusionQueryId": "fusion-query-id"
}
},
"status": 0
}The universal unique identifier (UUID) of the template.
"441eb3be-7de6-470a-8141-e416a15c7db1"
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.
OK
The universal unique identifier (UUID) of the triggered template containing the rendered zones.
"441eb3be-7de6-470a-8141-e416a15c7db1"
Show child attributes
Identifies the specific query profile to search.
Show child attributes
Name of the zone that contains the specified query profiles to search in the query.
"Results List"
The universal unique identifier (UUID) of the zone.
"6a092bd4-5098-466c-94aa-40bf68294303"
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.
"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 the zone.
Show child attributes
ID for the image associated with the zone.
"image-id"
Additional text data for the zone.
"_text_"
The unique ID for the primary metadata associated with the zone.
"primary-metadata-id"
The type of layout for the template. Values include grid and list.
"grid"
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"
Show child attributes
Show child attributes
The document information for each document returned in the query. For example:
"docs": [
{
"title_t": "document1 title",
"score": 3.4237761
},
{
"title_t": "document2 title",
"score": 3.2169461
}
]
The number of documents returned in the query. This field can contain an exact number or an estimate. If the numFoundExact field is set to true, the value in the numFound field is an exact number. If the numFoundExact field is set to false, the value in the numFound field is an estimate and the number of documents returned is equal to or greater than the value in this field.
The number of the document in the results to display first. It is offset from document zero (0), which is the first document in the file. For example, a value of 3 means that the fourth document in the result set is the first one displayed. The first three documents in the result set are not displayed. A value of 0 means there is no offset, and the first document in the result set is displayed first.
The score of the top document (most relevant document based on the query criteria) returned in the response.
This field specifies if the numFound field is an exact number or an estimate. If true, the value in the numFound field is the exact number of documents returned by the query. If false, the value in the numFound field is an estimate, and the number of documents returned is equal to or greater than the value in that field.
Show child attributes
This field specifies if the node was connected to Zookeeper when the request was processed. If true, the node was connected to Zookeeper at the time the request was processed. If false, the node was not connected to Zookeeper at the time the request was processed.
The number of milliseconds for Solr to process the request. It calculates the time between when the request arrives and when the request is completed by the handler.
The number of milliseconds between when the request was received and the response was returned.
Show child attributes
The version of the application that is sending the results. Because the application configuration can be changed, the version used for the query is helpful information if troubleshooting or investigation is necessary. The format is: "your-app-name:version".
"your-app-name:version"
The identifier of the Lucidworks pipeline used in the query.
The number of the document in the results to display first. It is offset from document zero (0), which is the first document in the file. For example, a value of 3 means that the fourth document in the result set is the first one displayed. The first three documents in the result set are not displayed. A value of 0 means there is no offset, and the first document in the result set is displayed first.
3
Any parameters submitted in the request. For example, if the request parameter is: dictionary[string,array[string]], the value in the response is:
"dictionary["key1" : "value1", "key2" : ["one", "two", "a", "B", "bubbles"], "key3" : ["five bubbles", "sunny"], "key4" : "value4""
"\"dictionary[\\\"key1\\\" : \\\"value1\\\", \\\"key2\\\" : [\\\"one\\\", \\\"two\\\", \\\"a\\\", \\\"B\\\", \\\"bubbles\\\"], \\\"key3\\\" : [\\\"five bubbles\\\", \\\"sunny\\\"], \\\"key4\\\" : \\\"value4\\\"\","
The number of documents to return at a time for the query. For example, if the value is 10, the number of documents returned at a time is 10.
10
Specifies the XML protocol version used in the response.
"2.2"
The unique identifier for the query proile designated for the template.
"query-profile"
This field indicates if the query originated from Fusion. Fusion's Solr query stage hardcodes a default value of true. It can be changed manually to false if the query originates from another source, such as directly from Solr. If the value is blank, the system interprets it as false.
The query parser Solr uses to process the q main query parameter in the request. For example, eDisMax or lucene.
"eDisMax"
The type of template associated with the response. Examples include landing and item-detail.
"landing"
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.
An optional parameter for a distributed query that specifes the order of precedence to sort the available replicas in each shard.
Specifies the response writer Solr uses to format the query response. Values include json, csv, and xml.
"json"
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 unique identifier for the Fusion query associated with the results.
"fusion-query-id"
The status of the response. A value of 0 indicates success.
0
Was this page helpful?