Render a search template

  • POST also GET /_render/template/{id}
  • POST also GET /_render/template
Auth

Render a search template as a search request body.

Required authorization

Index privileges read

Path parameters

id string optional

The ID of the search template to render. If no source is specified, this or the id request body parameter is required.

Leave it out to use /_render/template.

Request body

id string

The ID of the search template to render. If no source is specified, this or the <template-id> request path parameter is required. If you specify both this parameter and the <template-id> parameter, the API uses only <template-id>.

file string
params map string to 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 union oneOf

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.

One of:

Response

application/json
template_output map string to object required