# Vault information (IRPCVault)

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.IRPCVault/

An interface for vault-level information and operations.

Provides methods for miscellaneous vault-level operations.

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

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

## Overview

Vault-level lookups that most applications need right after login: the vault's own identity,
turning stable identifiers (GUIDs and aliases) into the vault's numeric IDs, listing users and
user groups, and detecting changes to the metadata structure.

All methods need a vault session (`LogIn` with a vault GUID); a server-level session fails with
`E_MFILES_LOGIN_REQUIRED`.

| Job | Methods |
|---|---|
| Which vault am I in? | `GetVault` |
| Resolve a GUID to an ID | `GetMetadataStructureItemIdByGUID` |
| Resolve an alias to an ID | `GetMetadataStructureItemIdByAlias`, `GetAllMetadataStructureItemIdswithAliases`, `GetMetadataStructureItemIdsByAliases` |
| List users and groups | `GetUsersAndUserContainers`, `GetUsersAndUserGroupsList`, `GetUsersAndUserGroups` |
| Groups of a user | `GetGroupsOfUserOrGroup` |
| Has the structure changed? | `GetMetadataStructureVersion` |

**IDs are per vault.** Object types, property definitions, classes, workflows, states and other
structure items get their numeric IDs from the vault, so the same item can have different IDs in
different vaults. Resolve them at run time from a GUID or an alias (set by the vault
administrator) instead of hard-coding IDs, and cache the result together with the metadata
structure version.

**Caching.** Most methods return the vault's metadata structure version in the
`mfiles-metadata-version-bin` trailer (4 bytes, a little-endian `int32`). When the number changes,
cached structure lookups are stale. Call
[GetMetadataStructureVersion](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureVersion/index.md) to check it
without other work. See
[Metadata structure version and caching](https://developer.m-files.com/APIs/gRPC-API/concepts/metadata-structure-version-and-caching/index.md)
and, for aliases and GUIDs,
[Vault and metadata structure](https://developer.m-files.com/APIs/gRPC-API/concepts/vault-and-metadata-structure/index.md).

**JSON in `bytes` fields.** `GetUsersAndUserGroups`, the `...OrDelta` methods and
`GetMetadataStructureItemIdsByAliases*` return JSON text in `bytes` fields, zlib-compressed unless
the matching length field is 4294967295. Prefer the typed alternatives named in each method.

Server push (`SendPushDataResponse`, `SendPushDataPendingHeartbeat`, `NotifyDataPushEvent`) and
multi-server methods (`GetVaultServerAttachments`, `GetServerRoles`, `BroadcastRequest`) are for
M-Files' own clients and servers.

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

## Highlighted methods

| Method | Summary | Facts |
|---|---|---|
| [GetVault](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetVault/index.md) | Gets the GUID, display name and other basic data of the session's vault. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetMetadataStructureItemIdByAlias](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureItemIdByAlias/index.md) | Finds the vault-specific ID of a metadata structure item from one of its aliases. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetMetadataStructureItemIdsByAliases](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureItemIdsByAliases/index.md) | Gets all unambiguous alias-to-ID mappings of one kind of metadata structure item, or of all kinds, as JSON. | `write` `session or assertion` `returns metadata structure version` |
| [GetMetadataStructureItemIdByGUID](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureItemIdByGUID/index.md) | Finds the vault-specific ID of a metadata structure item (object type, property definition, class, workflow, ...) from its GUID. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetUsersAndUserGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUsersAndUserGroups/index.md) | Gets all users and normal user groups of the vault as JSON. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetMetadataStructureVersion](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureVersion/index.md) | Gets the version numbers of the vault's metadata structure and of its property definitions. | `read` `session or assertion` `idempotent` |

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

## Other methods

| Method | Summary | Facts |
|---|---|---|
| [BroadcastRequest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/BroadcastRequest/index.md) | Broadcasts a vault level request. | `write` `session` `idempotent` `returns metadata structure version` |
| [GetAllMetadataStructureItemIdswithAliases](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetAllMetadataStructureItemIdswithAliases/index.md) | Gets all unambiguous alias-to-ID mappings of one kind of metadata structure item, or of all kinds, as typed lists. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetAllTranslations](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetAllTranslations/index.md) | Gets all translations of the vault's metadata structure names as one JSON document. | `write` `session or assertion` `returns metadata structure version` |
| [GetGroupsOfUserOrGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetGroupsOfUserOrGroup/index.md) | Gets the user groups that a user or a user group belongs to. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetMetadataStructure](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructure/index.md) | Gets the vault's real object types (not value lists), with icons, in one call. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetMetadataStructureItemIdsByAliases_Compressed](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureItemIdsByAliases_Compressed/index.md) | Gets alias-to-ID mappings of several kinds of metadata structure item as JSON, with the option to exclude kinds. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetMetadataStructureItemIdsFromMDCardConfiguration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureItemIdsFromMDCardConfiguration/index.md) | Gets metadata structure item IDs and related aliases or GUIDs which are used in Metadata card configuration value. Created for HttpServer. | `write` `session or assertion` `returns metadata structure version` |
| [GetReportAccessCredentials](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetReportAccessCredentials/index.md) | Gets the report access credentials for this vault. The credentials are encrypted with the provided public key. | `read` `session` `idempotent` `returns metadata structure version` |
| [GetServerRoles](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetServerRoles/index.md) | Gets the multi-server roles this server has with the vault. | `read` `session` `idempotent` |
| [GetUserContainers](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUserContainers/index.md) | Gets all user groups of the vault, of all group types, with their members. | `write` `session or assertion` `returns metadata structure version` |
| [GetUserGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUserGroup/index.md) | Gets one user group with its members. | `write` `session or assertion` `returns metadata structure version` |
| [GetUserGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUserGroups/index.md) | Gets the vault's normal user groups with their members. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetUsersAndUserContainers](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUsersAndUserContainers/index.md) | Gets all users and all user groups of the vault. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetUsersAndUserContainersOrDelta](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUsersAndUserContainersOrDelta/index.md) | Gets users and user groups of all types as JSON, or only the changes since a version the caller already has. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetUsersAndUserGroupsList](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUsersAndUserGroupsList/index.md) | Gets the names of all users and user groups in one list, with group IDs negated. | `read` `session or assertion` `idempotent` `returns metadata structure version` |
| [GetUsersAndUserGroupsOrDelta](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetUsersAndUserGroupsOrDelta/index.md) | Gets users and normal user groups as JSON, or only the changes since a version the caller already has. | `write` `session or assertion` `returns metadata structure version` |
| [GetVaultServerAttachments](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetVaultServerAttachments/index.md) | Gets the servers this vault is attached to. | `read` `session` `idempotent` `returns metadata structure version` |
| [NotifyDataPushEvent](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/NotifyDataPushEvent/index.md) | Notify for server data push message change. In multi-server mode this is broadcast to all nodes and node that has client channel open can continue operation. | `write` `session` |
| [SendPushDataPendingHeartbeat](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/SendPushDataPendingHeartbeat/index.md) | Sends a heartbeat signal as an early response for server data push (with non-zero request id). | `write` `session` `returns metadata structure version` |
| [SendPushDataResponse](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/SendPushDataResponse/index.md) | Sends a response for server data push. This is a response for request received with RequestPushDataAsync call (with non-zero request id). This call completes the push data cycle. | `write` `session` `returns metadata structure version` |
