Create or update an ES|QL view Technical preview; Added in 9.4.0

PUT /_query/view/{name}

Required authorization

  • Index privileges: create_view

Path parameters

  • name string Required

    The view name to create or update.

application/json

Body Required

  • query string Required

    The ES|QL query string from which to create a view.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

PUT /_query/view/{name}
curl \
 --request PUT 'http://api.example.com/_query/view/{name}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"query":"string"}'