Render a search template
Render a search template as a search request body.
Path parameters
-
id
string Required The ID of the search template to render. If no
source
is specified, this or theid
request body parameter is required.
Body
-
id
string -
file
string -
params
object Key-value pairs used to replace Mustache variables in the template. The key is the variable name. The value is the variable value.
-
source
string An inline search template. It supports the same parameters as the search API's request body. These parameters also support Mustache variables. If no
id
or<templated-id>
is specified, this parameter is required.
GET
/_render/template/{id}
curl \
--request GET http://api.example.com/_render/template/{id} \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"id":"string","file":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"source":"string"}'