# IRPCViews.GetMultipleViews

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/GetMultipleViews/

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

Gets several views of external repositories in one call.

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

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

## Remarks

- Only for external repository views: every ID must have `external_repository_id` set. A vault
  view ID fails the call with "The parameter is incorrect."; read vault views with
  [GetView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetView/index.md) or [GetViews](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetViews/index.md).
- The views are requested from the external repository connections of the vault.

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

## Request: GetMultipleViewsRequest

> 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 |
|---|---|---|
| `utf8szviewids[]` | repeated [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The IDs of the external views, each with `external_repository_id` set. |
| `utf8szviewids[].internal_id` | `int32` | The ID of the object or value list item. |
| `utf8szviewids[].external_repository_id` | [`ExternalRepositoryID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExternalRepositoryID/index.md) | Used only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault. |
| `utf8szviewids[].external_repository_id.connection` | `string` | The external repository connection identifier. |
| `utf8szviewids[].external_repository_id.item` | `string` | External ID within the scope of the connection to external system. |
| `required` | [`FOLDERDATAREQUESTFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FOLDERDATAREQUESTFLAGS/index.md) | The folder information that must be returned. |
| `required.all` | `bool` | Specifies all flags set; Including any future flags. |
| `required.folder_info` | `bool` | Folder information is requested, e.g. View or ExternalView. |
| `required.location` | `bool` | The exact location of the folder is requested, e.g. ViewLocation or FolderArray. |
| `required.acl` | `bool` | The acl of the folder is requested. |
| `accepted` | [`FOLDERDATAREQUESTFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FOLDERDATAREQUESTFLAGS/index.md) | Additional folder information the caller can accept. |
| `accepted.all` | `bool` | Specifies all flags set; Including any future flags. |
| `accepted.folder_info` | `bool` | Folder information is requested, e.g. View or ExternalView. |
| `accepted.location` | `bool` | The exact location of the folder is requested, e.g. ViewLocation or FolderArray. |
| `accepted.acl` | `bool` | The acl of the folder is requested. |

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

## Response: GetMultipleViewsResponse

> 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 |
|---|---|---|
| `putf8szviews[]` | repeated [`FolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderData/index.md) | The views as [FolderData](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderData/index.md). |
| `putf8szviews[].type` | [`FolderType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FolderType/index.md) | The type of the folder (eg. eftViewFolder). Values: `FOLDER_TYPE_UNKNOWN` (0), `FOLDER_TYPE_ANY_FOLDER` (1), `FOLDER_TYPE_VIEW_FOLDER` (2), `FOLDER_TYPE_PROPERTY_FOLDER` (3), `FOLDER_TYPE_TRADITIONAL_FOLDER` (4), `FOLDER_TYPE_SEARCH_FOLDER` (5), `FOLDER_TYPE_EXTERNAL_VIEW_FOLDER` (6). |
| `putf8szviews[].data` | [`FolderDataUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderDataUnion/index.md) | Additional folder type -specific data as a union. |
| `putf8szviews[].data.view_folder` | [`FolderDataUnion.ViewFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderDataUnion/index.md#t-ViewFolderData) (oneof data) |   |
| `putf8szviews[].data.external_view_folder` | [`FolderDataUnion.ExternalViewFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderDataUnion/index.md#t-ExternalViewFolderData) (oneof data) |   |
| `putf8szviews[].folder_location` | [`FolderArray`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderArray/index.md) | Array of folders describing the exact location of the folder. If null, the caller must resolve the location by walking the parent chain. |
| `putf8szviews[].folder_location.value[]` | repeated [`Folder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) | Array of Folder structures. |
| `putf8szviews[].folder_location_name` | `string` | The display name of the folder location. Describes the location (e.g. full path) rather than the actual name. Specified only if the location data is specified, too. |

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

## Related methods

- [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.
- [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.
