# IRPCViews.DeleteView

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Views](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/DeleteView/

Badges: `Vault API / standard` `write` `session or assertion` `returns metadata structure version`

Deletes a view and its child views.

- **Service:** [Views](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/index.md) `MFiles.IRPCViews`
- **gRPC method:** `/MFiles.IRPCViews/DeleteView`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/delete-view`
- **Request:** [`DeleteViewRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/DeleteView/index.md#request)
- **Response:** [`DeleteViewResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/DeleteView/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** no
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Common views need `manage_common_views`; otherwise the call fails with "Deleting a common view
  is not allowed.". A private view can be deleted only by its owner ("Access denied." for
  others).
- Child views are deleted too, including other users' private child views of a common view.
- Built-in views cannot be deleted. Anonymous sessions get "Access denied.".
- Deleting a view that does not exist, or was already deleted, succeeds and does nothing.
- The view appears in `removed_views` of
  [GetViewsOrDelta](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetViewsOrDelta/index.md). Vault event handlers for views
  run.

<a id="request"></a>

## Request: DeleteViewRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `id` | `int32` | The ID of the view to delete. |

<a id="response"></a>

## Response: DeleteViewResponse

No fields.

<a id="related"></a>

## Related methods

- [GetViewsOrDelta](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetViewsOrDelta/index.md): Gets the calling user's whole view collection, or only the changes since a version the caller already has.
