Update a runtime field
Path parameters
-
The name of the runtime field.
-
An identifier for the data view.
Body Required
-
The runtime field definition object.
You can update following fields:
type
script
POST /api/data_views/data_view/{viewId}/runtime_field/{fieldName}
curl \
-X POST https://localhost:5601/api/data_views/data_view/ff959d40-b880-11e8-a6d9-e546fe2bba5f/runtime_field/hour_of_day \
-H "Content-Type: application/json; Elastic-Api-Version=2023-10-31"
Request example
{
"runtimeField": {
"script": {
"source": "emit(doc[\"bar\"].value)"
}
}
}
Response examples (400)
{
"error": "Bad Request",
"message": "string",
"statusCode": 400
}