Create or update a runtime field
Spaces method and path for this operation:
put /s/{space_id}/api/data_views/data_view/{viewId}/runtime_field
Refer to Spaces for more information.
PUT /api/data_views/data_view/{viewId}/runtime_field
curl \ --request PUT 'https://localhost:5601/api/data_views/data_view/{viewId}/runtime_field' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --header "kbn-xsrf: string" \ --data '{"name":"runtimeFoo","runtimeField":{"type":"long","script":{"source":"emit(doc[\"foo\"].value)"}}}' Request example
{ "name": "runtimeFoo", "runtimeField": { "type": "long", "script": { "source": "emit(doc[\"foo\"].value)" } } }