Create or update a runtime field Beta
Path parameters
-
The ID of the data view fields you want to update.
Body Required
-
The name for a runtime field.
-
The runtime field definition object.
Additional properties are allowed.
PUT /api/data_views/data_view/{viewId}/runtime_field
curl \
-X PUT https://localhost:5601/api/data_views/data_view/{viewId}/runtime_field \
-H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
-H "kbn-xsrf: string"
Request example
{
"name": "runtimeFoo",
"runtimeField": {
"type": "long",
"script": {
"source": "emit(doc[\"foo\"].value)"
}
}
}
Response examples (200)
{
"data_view": {},
"fields": [
{}
]
}
Response examples (400)
{
"error": "Bad Request",
"message": "string",
"statusCode": 400
}