---
title: "Set the default data view"
method: POST
path: "/api/data_views/default"
tags: ["data views"]
---

# Set the default data view

`POST /api/data_views/default`

**Spaces method and path for this operation:**

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/data_views/default</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-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.

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `data_view_id` string, nullable, required — The data view identifier. NOTE: The API does not validate whether it is a valid identifier. Use `null` to unset the default data view.
  - `force` boolean — Update an existing default data view identifier.

## Response `200`

Indicates a successful call.

- object
  - `acknowledged` boolean

## Other responses

- `400` — Bad request

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
