[[data-views-api-default-get]]
=== Get default data view API
++++
<titleabbrev>Get default data view</titleabbrev>
++++

experimental[] Retrieve a default data view ID. Kibana UI uses the default data view unless user picks a different one.


[[data-views-api-default-get-request]]
==== Request

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

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


[[data-views-api-default-get-params]]
==== Path parameters

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


[[data-views-api-default-get-codes]]
==== Response code

`200`::
Indicates a successful call.


[[data-views-api-default-get-example]]
==== Example

Retrieve the default data view id:

[source,sh]
--------------------------------------------------
$ curl -X GET api/data_views/default
--------------------------------------------------
// KIBANA

The API returns an ID of a default data view:

[source,sh]
--------------------------------------------------
{
    "data_view_id": "..."
}
--------------------------------------------------

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

[source,sh]
--------------------------------------------------
{
    "data_view_id": null
}
--------------------------------------------------

