[[index-patterns-api-default-get]]
=== Get default index pattern API
++++
Get default index pattern
++++
experimental[] Retrieve a default index pattern ID. Kibana UI uses default index pattern unless user picks a different one.
[[index-patterns-api-default-get-request]]
==== Request
`GET :/api/index_patterns/default`
`GET :/s//api/index_patterns/default`
[[index-patterns-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.
[[index-patterns-api-default-get-codes]]
==== Response code
`200`::
Indicates a successful call.
[[index-patterns-api-default-get-example]]
==== Example
Retrieve the default index pattern id:
[source,sh]
--------------------------------------------------
$ curl -X GET api/index_patterns/default
--------------------------------------------------
// KIBANA
The API returns an ID of a default index pattern:
[source,sh]
--------------------------------------------------
{
"index_pattern_id": "..."
}
--------------------------------------------------
In case there is no default index pattern, the API returns:
[source,sh]
--------------------------------------------------
{
"index_pattern_id": null
}
--------------------------------------------------