Type to search.

Get an ES|QL view

  • GET /_query/view/{name}
  • GET /_query/view
Auth The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.4 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Returns one or more stored views. A reserved view includes reserved set to true.

Define reusable queries with ES|QL views

Required privileges

Index privileges read_view_metadata

Path parameters

name union string | string[] optional

The comma-separated view names to retrieve.

Leave it out to use /_query/view.

Response

application/json
views object[] required
name string required

The name of the ES|QL view

query string required

The ES|QL query

description string The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

A free-text description of the view.

reserved boolean The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Whether this view is reserved.

Elasticsearch creates reserved views. They can be queried and read like any other view. They cannot be created, updated, or deleted through the views API. The response includes this field only when the value is true.