---
title: "Delete a data view"
method: DELETE
path: "/api/data_views/v2/{id}"
tags: ["data-views-v2"]
---

# Delete a data view

`DELETE /api/data_views/v2/{id}`

## Request

- Base URL: `https://localhost:5601`
- URL: `https://localhost:5601/api/data_views/v2/{id}`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP basic

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

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

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Permanently deletes a data view by ID. You can't recover a deleted data view.<br/><br/>[Required authorization] Route required privileges: indexPatterns:manage.

## Path parameters

- `id` string, required

## Headers

- `kbn-xsrf` string, required

## Response `204`

deleted

## Other responses

- `403`: forbidden
- `404`: not found

---

[API](https://skmtc.dev/elastic/apis/kibana-apis.md) - [All operations](https://skmtc.dev/elastic/apis/kibana-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/elastic/apis/kibana-apis/revisions/b87131d80c52?raw)
