Create a data view
Spaces method and path for this operation:
post /s/{space_id}/api/data_views/data_view
Refer to Spaces for more information.
POST /api/data_views/data_view
curl \ --request POST 'https://localhost:5601/api/data_views/data_view' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --header "kbn-xsrf: string" \ --data '{"data_view":{"name":"My Logstash data view","title":"logstash-*","runtimeFieldMap":{"runtime_shape_name":{"type":"keyword","script":{"source":"emit(doc['shape_name'].value)"}}}}}' Request example
{ "data_view": { "name": "My Logstash data view", "title": "logstash-*", "runtimeFieldMap": { "runtime_shape_name": { "type": "keyword", "script": { "source": "emit(doc['shape_name'].value)" } } } } }