---
type: api
title: Get an ES|QL view
description: **All methods and paths for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-esql-get-view
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-esql-get-view
products:
  - Elasticsearch
---

# Get an ES|QL view


Availability: 9.4+

## Paths

- `GET` `/_query/view/{name}`
- `GET` `/_query/view`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#bearerauth)

#### Path Parameters

- `name` (string Id) — optional, leave it out to use `/_query/view`
  The comma-separated view names to retrieve.

## Description

Returns a stored ES|QL view.

## Required authorization

* Index privileges: `read_view_metadata`

## Response

`application/json`

- `views` ([] ESQLView)
  - `name` (string)
    The name of the ES|QL view
  - `query` (string)
    The ES|QL query
  - `description` (string)
    A free-text description of the view.
## Code Examples

#### Console

```console
GET /_query/view/{name}
```

#### curl

```curl
curl -X GET "/_query/view/{name}"
```

