Get default data view API

edit

Get default data view API

edit

[preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Retrieve a default data view ID. Kibana UI uses the default data view unless user picks a different one.

For the most up-to-date API details, refer to the open API specification.

Request

edit

GET <kibana host>:<port>/api/data_views/default

GET <kibana host>:<port>/s/<space_id>/api/data_views/default

Path parameters

edit
space_id
(Optional, string) An identifier for the space. If space_id is not provided in the URL, the default space is used.

Response code

edit
200
Indicates a successful call.

Example

edit

Retrieve the default data view id:

$ curl -X GET api/data_views/default

The API returns an ID of a default data view:

{
    "data_view_id": "..."
}

In case there is no default data view, the API returns:

{
    "data_view_id": null
}