kibana/docs/api/data-views/default-get.asciidoc
Matthew Kime eb2ddcd7c6
[data views] data view api docs - index patterns => data views (#119415)
* initial pass at changing urls and anchors

* update api.asciidoc

* upate a few more anchor tags

* upate a few more anchor tags

* update data view api docs

* Update delete.asciidoc

* Update default-get.asciidoc

* add redirects

* fix redirects

* remove duplicate redirect

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-01 07:32:05 -06:00

55 lines
1.3 KiB
Text

[[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/index_patterns/default`
`GET <kibana host>:<port>/s/<space_id>/api/index_patterns/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/index_patterns/default
--------------------------------------------------
// KIBANA
The API returns an ID of a default data view:
[source,sh]
--------------------------------------------------
{
"index_pattern_id": "..."
}
--------------------------------------------------
In case there is no default data view, the API returns:
[source,sh]
--------------------------------------------------
{
"index_pattern_id": null
}
--------------------------------------------------