kibana/docs/api/data-views/get-all.asciidoc

66 lines
1.4 KiB
Text

[[data-views-api-get-all]]
=== Get all data views API
++++
<titleabbrev>Get all data views</titleabbrev>
++++
experimental[] Retrieve a list of all data views.
[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification].
====
[[data-views-api-get-all-request]]
==== Request
`GET <kibana host>:<port>/api/data_views`
`GET <kibana host>:<port>/s/<space_id>/api/data_views`
[[data-views-api-get-all-codes]]
==== Response code
`200`::
Indicates a successful call.
[[data-views-api-get-all-example]]
==== Example
Retrieve the list of data views:
[source,sh]
--------------------------------------------------
$ curl -X GET api/data_views
--------------------------------------------------
// KIBANA
The API returns a list of data views:
[source,sh]
--------------------------------------------------
{
"data_view": [
{
"id": "e9e024f0-d098-11ec-bbe9-c753adcb34bc",
"namespaces": [
"default"
],
"title": "tmp*",
"type": "rollup",
"typeMeta": {}
},
{
"id": "90943e30-9a47-11e8-b64d-95841ca0b247",
"namespaces": [
"default"
],
"title": "kibana_sample_data_logs"
}
]
}
--------------------------------------------------