Views (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, standard |
| Methods | 14 |
| Proto file | mfiles/IRPCViews.proto |
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.
- Read the view collection: GetViews (all views, or the children of one view), GetViewsOrDelta (keep a local copy up to date), GetView (one view).
- Create and change views: AddNewView, ModifyView, DeleteView, SetViewVisibility (per user).
- Share a private view with another user: EnableShareView by the owner, then CopyView by the recipient.
- External repositories: GetMultipleViews and GetExternalRepositoryIcons.
- Traditional folders in a view: CreateSubFolder.
To list the objects in a view, search with the view's content_definition, or browse it with
the folder content methods of IRPCSearch.
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). 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.
Highlighted methods
| Method | Summary | Facts |
|---|---|---|
| GetViews | 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 | 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 | 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 |
Other methods
| Method | Summary | Facts |
|---|---|---|
| AddNewView | Creates a new private or common view. | write session or assertion returns metadata structure version |
| CopyView | 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 | 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 | Deletes a view and its child views. | write session or assertion returns metadata structure version |
| DownloadFolderContentWithDownloadKey | Not available: always fails with "Not implemented.". | write session or assertion |
| EnableShareView | 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 | Gets icons that external repository connections provide for their views and objects. | read session or assertion idempotent returns metadata structure version |
| GetFolderContentDownloadUrl | Not available: always fails with "Not implemented.". | write session or assertion |
| GetMultipleViews | Gets several views of external repositories in one call. | read session or assertion idempotent returns metadata structure version |
| ModifyView | Replaces the definition of an existing view. | write session or assertion idempotent returns metadata structure version |
| SetViewVisibility | Shows or hides a view in the calling user's view collection. | write session or assertion idempotent returns metadata structure version |