kibana/docs/api/index-patterns/runtime-fields/get.asciidoc
Lisa Cawley cf43ba2f27
[DOCS] Remove saved object and data view API pages (#190654)
Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
2024-08-20 17:29:06 +00:00

54 lines
1.5 KiB
Text

[[index-patterns-runtime-field-api-get]]
=== Get runtime field API
++++
<titleabbrev>Get runtime field</titleabbrev>
++++
deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.]
experimental[] Get a runtime field
[[index-patterns-runtime-field-get-request]]
==== Request
`GET <kibana host>:<port>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field/<name>`
`GET <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field/<name>`
[[index-patterns-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.
`index_pattern_id`::
(Required, string) The ID of the index pattern.
`name`::
(Required, string) The name of the runtime field you want to retrieve.
[[index-patterns-runtime-field-get-example]]
==== Example
Retrieve a runtime field named `foo` of index pattern with the `my-pattern` ID:
[source,sh]
--------------------------------------------------
$ curl -X GET api/index_patterns/index_pattern/my-pattern/runtime_field/foo
--------------------------------------------------
// KIBANA
The API returns a runtime `field` object, and a `runtimeField` definition object:
[source,sh]
--------------------------------------------------
{
"field": {
...
},
"runtimeField": {
...
}
}
--------------------------------------------------