---
type: api
title: Search data views
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/operation/operation-get-data-views-v2
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/operation/operation-get-data-views-v2
products:
  - Kibana
---

# Search data views

Authentication: required

Availability: Planned

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/data_views/v2`
- `GET` `/s/{space_id}/api/data_views/v2`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## Description

Returns a paginated list of the data views in the current space. Each item includes only the name, index pattern, and time field. To get the full definition, use `GET /api/data_views/v2/{id}`.

## Query string parameters

- `page` (number · min: 1 · default: 1) — optional
  The page of results to return.
- `per_page` (number · min: 1 · max: 1000 · default: 20) — optional
  The number of results to return per page.
- `query` (string) — optional
  Filters results by `name` and `index_pattern` using Elasticsearch [`simple_query_string`](https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-simple-query-string-query) syntax.

## Responses

#### `200`

OK

`application/json`

- `data` (object[] · max items: 1000)
  - `data` (object)
    - `index_pattern` (string · min length: 1)
      The index pattern (Elasticsearch index expression) to use as the data source. Example: "my-index-*".
    - `name` (string · min length: 1 · max length: 256)
      The name of the data view. Example: "Sample data view".
    - `time_field` (string)
      The name of the time field in the index. Used for time-based filtering. Example: "@timestamp".
  - `id` (string · max length: 1000)
    The ID of the data view.
  - `meta` (object)
    - `created_at` (string)
      Timestamp when the object was created (ISO 8601).
    - `created_by` (string)
      User profile ID of the user who created the object.
    - `managed` (boolean)
      When `true`, the object is managed by Kibana and cannot be edited by users.
    - `owner` (string)
      Identifier of the plugin or team that owns this object.
    - `spaces` (string[] · max items: 100)
      The IDs of the spaces where the data view is available.
    - `updated_at` (string)
      Timestamp when the object was last updated (ISO 8601).
    - `updated_by` (string)
      User profile ID of the user who last updated the object.
    - `version` (string)
      Internal version identifier for optimistic concurrency control.
- `meta` (object)
  - `page` (number · min: 1 · default: 1)
    The returned page of results.
  - `per_page` (number · min: 1 · max: 1000 · default: 20)
    The number of results returned per page.
  - `total` (number)
    The total number of results matching the query.
#### `400`

bad request

## Code examples

#### Console

```console
GET kbn:/api/data_views/v2
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/data_views/v2" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Paginated data views response

`application/json`

```json
{
  "data": [
    {
      "data": {
        "index_pattern": "logs-*",
        "name": "Web logs",
        "time_field": "@timestamp"
      },
      "id": "c0ffee00-d57a-11ef-9a52-4f3c2a8d0e1b",
      "meta": {
        "created_at": "2026-01-15T10:00:00.000Z",
        "created_by": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0",
        "managed": false,
        "spaces": [
          "default"
        ],
        "updated_at": "2026-01-16T08:30:00.000Z",
        "updated_by": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0",
        "version": "WzIsMV0="
      }
    },
    {
      "data": {
        "index_pattern": "metrics-*",
        "name": "Metrics"
      },
      "id": "a1b2c3d4-d57a-11ef-9a52-4f3c2a8d0e1b",
      "meta": {
        "created_at": "2026-01-15T11:00:00.000Z",
        "managed": false,
        "spaces": [
          "default"
        ],
        "updated_at": "2026-01-15T11:00:00.000Z",
        "version": "WzMsMV0="
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 2
  }
}
```

