# Views (IRPCViews)

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)

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

Reads and maintains the views of the vault: the common views and the calling user's own
(private) views.

All view operations can be done via this interface.
MFClient uses this interface to manage the user-specific view collection and common
view collection.

- **gRPC service:** `MFiles.IRPCViews`
- **Book and level:** [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md), standard
- **Methods:** 14
- **Proto file:** [`mfiles/IRPCViews.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCViews.proto)

<a id="overview"></a>

## Overview

A view is a saved search with optional grouping levels, shown as a folder in M-Files clients.
**Common views** are defined by administrators and are visible to the users their ACL allows.
**Private views** belong to one user. Every user has a view collection: the common views they
may see plus their own private views, each with a per-user visible or hidden flag. For the
search side of views, see
[Search](https://developer.m-files.com/APIs/gRPC-API/concepts/search/index.md).

- **Read the view collection**:
  [GetViews](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetViews/index.md) (all views, or the children of one view),
  [GetViewsOrDelta](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetViewsOrDelta/index.md) (keep a local copy up to date),
  [GetView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetView/index.md) (one view).
- **Create and change views**: [AddNewView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/AddNewView/index.md),
  [ModifyView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/ModifyView/index.md),
  [DeleteView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/DeleteView/index.md),
  [SetViewVisibility](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/SetViewVisibility/index.md) (per user).
- **Share a private view** with another user:
  [EnableShareView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/EnableShareView/index.md) by the owner, then
  [CopyView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/CopyView/index.md) by the recipient.
- **External repositories**: [GetMultipleViews](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetMultipleViews/index.md) and
  [GetExternalRepositoryIcons](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetExternalRepositoryIcons/index.md).
- **Traditional folders in a view**: [CreateSubFolder](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/CreateSubFolder/index.md).

To list the objects in a view, search with the view's `content_definition`, or browse it with
the folder content methods of [IRPCSearch](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/index.md).

**Rights.** Reading needs no special vault rights. Creating or changing private views needs the
vault right `manage_private_views`; creating, changing or deleting common views needs
`manage_common_views`; making a view indexed needs `materialize_views`
([VaultAccess](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VaultAccess/index.md)). Anonymous sessions cannot create or delete views.

**Built-in views.** Every vault has built-in views with fixed IDs, for example 5 Checked Out to
Me, 7 Recently Modified by Me, 9 Assigned to Me, 14 Recently Accessed by Me and 15 Favorites.
Some of them are hidden by default (for example 12 and 18 ID views, 13 Built-in, 16 Reports,
17 Conflicts, 23 All object types). Built-in views cannot be deleted, and most of them cannot
be changed.

<a id="highlighted"></a>

## Highlighted methods

| Method | Summary | Facts |
|---|---|---|
| [GetViews](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetViews/index.md) | Gets the calling user's view collection: all views, or the direct child views of one view. | `write` `session or assertion` `returns metadata structure version` |
| [GetView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetView/index.md) | Gets one view of the calling user's view collection, or one external view, as folder data. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [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. | `read` `session or assertion` `idempotent` `returns metadata structure version` |

<a id="methods"></a>

## Other methods

| Method | Summary | Facts |
|---|---|---|
| [AddNewView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/AddNewView/index.md) | Creates a new private or common view. | `write` `session or assertion` `returns metadata structure version` |
| [CopyView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/CopyView/index.md) | Copies a private view that another user has shared, with its child views, into the caller's own views. | `write` `session or assertion` `returns metadata structure version` |
| [CreateSubFolder](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/CreateSubFolder/index.md) | Creates a traditional folder at a location inside a view, or returns an existing folder with the same name there. | `write` `session or assertion` `returns metadata structure version` |
| [DeleteView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/DeleteView/index.md) | Deletes a view and its child views. | `write` `session or assertion` `returns metadata structure version` |
| [DownloadFolderContentWithDownloadKey](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/DownloadFolderContentWithDownloadKey/index.md) | Not available: always fails with "Not implemented.". | `write` `session or assertion` |
| [EnableShareView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/EnableShareView/index.md) | Allows other users to copy the given private views of the caller for a limited time. | `write` `session or assertion` `returns metadata structure version` |
| [GetExternalRepositoryIcons](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetExternalRepositoryIcons/index.md) | Gets icons that external repository connections provide for their views and objects. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetFolderContentDownloadUrl](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetFolderContentDownloadUrl/index.md) | Not available: always fails with "Not implemented.". | `write` `session or assertion` |
| [GetMultipleViews](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetMultipleViews/index.md) | Gets several views of external repositories in one call. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [ModifyView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/ModifyView/index.md) | Replaces the definition of an existing view. | `write` `session or assertion` `idempotent` `returns metadata structure version` |
| [SetViewVisibility](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/SetViewVisibility/index.md) | Shows or hides a view in the calling user's view collection. | `write` `session or assertion` `idempotent` `returns metadata structure version` |
