kibana/docs/api/data-views/runtime-fields/get.asciidoc

59 lines
1.5 KiB
Text

[[data-views-runtime-field-api-get]]
=== Get runtime field API
++++
<titleabbrev>Get runtime field</titleabbrev>
++++
experimental[] Get a runtime field
[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-runtime-field-get-request]]
==== Request
`GET <kibana host>:<port>/api/data_views/data_view/<data_view_id>/runtime_field/<name>`
`GET <kibana host>:<port>/s/<space_id>/api/data_views/data_view/<data_view_id>/runtime_field/<name>`
[[data-views-runtime-field-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_view_id`::
(Required, string) The ID of the data view.
`name`::
(Required, string) The name of the runtime field you want to retrieve.
[[data-views-runtime-field-get-example]]
==== Example
Retrieve a runtime field named `foo` of data view with the `my-view` ID:
[source,sh]
--------------------------------------------------
$ curl -X GET api/data_views/data_view/my-view/runtime_field/foo
--------------------------------------------------
// KIBANA
The API returns a runtime `field` object array, and a `runtimeField` definition object:
[source,sh]
--------------------------------------------------
{
"fields": [
...
],
"runtimeField": {
...
}
}
--------------------------------------------------