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
Additional properties are allowed.
POST
/api/data_views/data_view/{viewId}/runtime_field/{fieldName}
curl \
--request POST https://localhost:5601/api/data_views/data_view/ff959d40-b880-11e8-a6d9-e546fe2bba5f/runtime_field/hour_of_day \
--header "Content-Type: application/json" \
--data '{"runtimeField":{"script":{"source":"emit(doc[\"bar\"].value)"}}}'
Request example
{
"runtimeField": {
"script": {
"source": "emit(doc[\"bar\"].value)"
}
}
}
Response examples (400)
{
"error": "Bad Request",
"message": "string",
"statusCode": 400
}