Get a data view Generally available; added in 9.6.0

GET /api/data_views/v2/{id}

Spaces method and path for this operation:

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

Refer to Spaces for more information.

Returns a data view by ID, including its field settings and runtime fields.

Path parameters

  • id string Required

    The ID of the data view to return.

    Minimum length is 1, maximum length is 1000.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • data object Required

      The data view definition.

      Additional properties are NOT allowed.

      Hide data attributes Show data attributes object
      • allow_hidden_indices boolean

        When true, allows the data view to match hidden indices.

      • field_filters array[string]

        Field filters can be used to exclude one or more fields when fetching a document. They may contain wildcards, such as user* which filters fields starting with 'user'.

        Not more than 10000 elements. Minimum length of each is 1, maximum length of each is 1000.

      • field_settings object

        Settings for individual fields, keyed by field name. To change how Kibana displays a field from the backing indices, set its label, description, format, or popularity. To define a runtime field, use the runtime field name and set type.

      • id string

        Kibana provides a unique identifier for each data view, or you can create your own.

        Minimum length is 1, maximum length is 256.

      • 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

      Metadata about the data view.

      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.

  • 404

    not found

GET /api/data_views/v2/{id}
curl \
 --request GET 'https://localhost:5601/api/data_views/v2/{id}' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "data": {
    "index_pattern": "logs-*",
    "name": "Web logs",
    "time_field": "@timestamp"
  },
  "id": "c0ffee00-d57a-11ef-9a52-4f3c2a8d0e1b",
  "meta": {
    "managed": false,
    "spaces": [
      "default"
    ],
    "version": "WzEsMV0="
  }
}