Search data views Generally available; added in 9.6.0

GET /api/data_views/v2

Spaces method and path for this operation:

get /s/{space_id}/api/data_views/v2

Refer to 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

    The page of results to return.

    Minimum value is 1. Default value is 1.

  • per_page number

    The number of results to return per page.

    Minimum value is 1, maximum value is 1000. Default value is 20.

  • query string

    Filters results by name and index_pattern using Elasticsearch simple_query_string syntax.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • data array[object] Required

      Not more than 1000 elements.

      Hide data attributes Show data attributes object
      • data object Required

        Additional properties are NOT allowed.

        Hide data attributes Show data attributes object
        • index_pattern string Required

          The index pattern (Elasticsearch index expression) to use as the data source. Example: "my-index-*".

          Minimum length is 1.

        • name string

          The name of the data view. Example: "Sample data view".

          Minimum length is 1, maximum length is 256.

        • 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.

        Maximum length is 1000.

      • meta object Required

        Additional properties are NOT allowed.

        Hide meta attributes Show meta attributes 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 array[string]

          The IDs of the spaces where the data view is available.

          Not more than 100 elements. Maximum length of each is 1000.

        • 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

      Additional properties are NOT allowed.

      Hide meta attributes Show meta attributes object
      • page number

        The returned page of results.

        Minimum value is 1. Default value is 1.

      • per_page number

        The number of results returned per page.

        Minimum value is 1, maximum value is 1000. Default value is 20.

      • total number Required

        The total number of results matching the query.

  • 400

    bad request

GET /api/data_views/v2
curl \
 --request GET 'https://localhost:5601/api/data_views/v2' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "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
  }
}