Spaces method and path for this operation:
post /s/{space_id}/api/data_views/default
Refer to Spaces for more information.
Set the default data view for the current Kibana space. The default data view is used as a fallback when no specific data view is selected.
POST
/api/data_views/default
curl
curl \
-X POST "${KIBANA_URL}/api/data_views/default" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{"data_view_id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","force":true}'
POST kbn://api/data_views/default
{"data_view_id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","force":true}
Request example
Set the default data view, using the force flag to overwrite an existing default.
{
"data_view_id": "ff959d40-b880-11e8-a6d9-e546fe2bba5f",
"force": true
}
Response examples (200)
The acknowledged flag confirms that the default data view for the current Kibana space was updated.
{
"acknowledged": true
}
Response examples (400)
The request was rejected because the payload or query parameters are missing required fields or contain invalid values.
{
"error": "Bad Request",
"message": "[request body.data_view.title]: expected value of type [string] but got [undefined]",
"statusCode": 400
}