URL templatingedit

This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.

The URL template input uses Handlebars — a simple templating language. Handlebars templates look like regular text with embedded Handlebars expressions.


A Handlebars expression is a {{, some contents, followed by a }}. When the drilldown is executed, these expressions are replaced by values from the dashboard and interaction context.

In addition to built-in Handlebars helpers, you can use custom helpers.

Refer to Handlebars documentation to learn about advanced use cases.

Custom helper Use case


Serialize variables in JSON format.


{{json event}}
{{json event.key event.value}}
{{json filters=context.panel.filters}}


Serialize variables in rison format. Rison is a common format for Kibana apps for storing state in the URL.


{{rison event}}
{{rison event.key event.value}}
{{rison filters=context.panel.filters}}


Format dates. Supports relative dates expressions (for example, "now-15d"). Refer to the moment docs for different formatting options.


{{date event.from “YYYY MM DD”}}
{{date “now-15”}}

URL template variablesedit

The URL drilldown template has three sources for variables:

  • Global static variables that don’t change depending on the place where the URL drilldown is used or which user interaction executed the drilldown. For example: {{kibanaUrl}}.
  • Context variables that change depending on where the drilldown is created and used. These variables are extracted from a context of a panel on a dashboard. For example, {{context.panel.filters}} gives access to filters that applied to the current panel.
  • Event variables that depend on the trigger context. These variables are dynamically extracted from the interaction context when the drilldown is executed.

A subtle but important difference between context and event variables is that context variables use real values in previews when creating a URL drilldown. For example, {{context.panel.filters}} are previewed with the current filters that applied to a panel. Event variables are extracted during drilldown execution from a user interaction with a panel (for example, from a pie slice that the user clicked on).

Because there is no user interaction with a panel in preview, there is no interaction context to use in a preview. To work around this, Kibana provides a sample interaction that relies on a trigger. So in a preview, you might notice that {{event.value}} is replaced with {{event.value}} instead of with a sample from your data. Such previews can help you make sure that the structure of your URL template is valid. However, to ensure that the configured URL drilldown works as expected with your data, you have to save the dashboard and test in the panel.

You can access the full list of variables available for the current panel and selected trigger by clicking Add variable in the top-right corner of a URL template input.

Variables referenceedit

Source Variable Description



Kibana base URL. Useful for creating URL drilldowns that navigate within Kibana.



Context provided by current dashboard panel.


ID of a panel.


Title of a panel.


List of Kibana filters applied to a panel.
Tip: Use in combination with rison helper for internal Kibana navigations with carrying over current filters.


Current query string.


Current query language.


Current time picker values.
Tip: Use in combination with date helper to format date.


Index pattern ids used by a panel.


ID of saved object behind a panel.

Single click


Value behind clicked data point.


Field name behind clicked data point


Boolean, indicating whether clicked data point resulted in negative filter.


Some visualizations have clickable points that emit more than one data point. Use list of data points in case a single value is insufficient.


{{json event.points}}
{{event.points.[0].value}} {{#each event.points}}key=value&{{/each}}


{{event.value}} is a shorthand for {{event.points.[0].value}}
{{event.key}} is a shorthand for {{event.points.[0].key}}

Range selection


from and to values of selected range. Depending on your data, could be either a date or number.
Tip: Consider using date helper for date formatting.


Aggregation field behind the selected range, if available.