---
title: "Search data views"
method: GET
path: "/api/data_views/v2"
tags: ["data-views-v2"]
---

# Search data views

`GET /api/data_views/v2`

## Request

- Base URL: `https://localhost:5601`
- URL: `https://localhost:5601/api/data_views/v2`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP basic

**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/data_views/v2</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

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 parameters

- `page` number
- `per_page` number
- `query` string

## Response `200`

OK

- object
  - `data` object[], required
    - `data` object, required
      - `index_pattern` string, required: The index pattern (Elasticsearch index expression) to use as the data source. Example: "my-index-*".
      - `name` string: 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, required: The ID of the data view.
    - `meta` object, required
      - `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[]: 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, required
    - `page` number: The returned page of results.
    - `per_page` number: The number of results returned per page.
    - `total` number, required: The total number of results matching the query.

## Other responses

- `400`: bad request

---

[API](https://skmtc.dev/elastic/apis/kibana-apis.md) - [All operations](https://skmtc.dev/elastic/apis/kibana-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/elastic/apis/kibana-apis/revisions/b87131d80c52?raw)
