# IRPCViews.GetView

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

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

Gets one view of the calling user's view collection, or one external view, as folder data.

- **Service:** [Views](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/index.md) `MFiles.IRPCViews`
- **gRPC method:** `/MFiles.IRPCViews/GetView`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-view`
- **Request:** [`GetViewRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetView/index.md#request)
- **Response:** [`GetViewResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetView/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

- Requires a vault session. No special vault rights are needed.
- For a vault view, set `view_id.internal_id` and set `required_folder_info.folder_info` to true;
  without it the call fails with "The parameter is incorrect.". Requiring `location` fails with
  "Not implemented.".
- The response holds the view in `putf8szview.data.view_folder.view`.
- A view that is not in the user's collection, such as another user's private view, fails with
  "Not found.".
- For a view of an external repository, set `view_id.external_repository_id` instead.

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

## Request: GetViewRequest

> 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 |
|---|---|---|
| `view_id` | [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The view: `internal_id` for a vault view, or `external_repository_id` for an external view. |
| `view_id.internal_id` | `int32` | The ID of the object or value list item. |
| `view_id.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. |
| `view_id.external_repository_id.connection` | `string` | The external repository connection identifier. |
| `view_id.external_repository_id.item` | `string` | External ID within the scope of the connection to external system. |
| `required_folder_info` | [`FOLDERDATAREQUESTFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FOLDERDATAREQUESTFLAGS/index.md) | The folder information that must be returned. For a vault view, set `folder_info`. |
| `required_folder_info.all` | `bool` | Specifies all flags set; Including any future flags. |
| `required_folder_info.folder_info` | `bool` | Folder information is requested, e.g. View or ExternalView. |
| `required_folder_info.location` | `bool` | The exact location of the folder is requested, e.g. ViewLocation or FolderArray. |
| `required_folder_info.acl` | `bool` | The acl of the folder is requested. |
| `accepted_folder_info` | [`FOLDERDATAREQUESTFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FOLDERDATAREQUESTFLAGS/index.md) | Additional folder information the caller can accept. Used for external views. |
| `accepted_folder_info.all` | `bool` | Specifies all flags set; Including any future flags. |
| `accepted_folder_info.folder_info` | `bool` | Folder information is requested, e.g. View or ExternalView. |
| `accepted_folder_info.location` | `bool` | The exact location of the folder is requested, e.g. ViewLocation or FolderArray. |
| `accepted_folder_info.acl` | `bool` | The acl of the folder is requested. |

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

## Response: GetViewResponse

> 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 |
|---|---|---|
| `putf8szview` | [`FolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderData/index.md) | The view as [FolderData](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderData/index.md). |
| `putf8szview.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). |
| `putf8szview.data` | [`FolderDataUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderDataUnion/index.md) | Additional folder type -specific data as a union. |
| `putf8szview.data.view_folder` | [`FolderDataUnion.ViewFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderDataUnion/index.md#t-ViewFolderData) (oneof data) |   |
| `putf8szview.data.external_view_folder` | [`FolderDataUnion.ExternalViewFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderDataUnion/index.md#t-ExternalViewFolderData) (oneof data) |   |
| `putf8szview.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. |
| `putf8szview.folder_location.value[]` | repeated [`Folder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) | Array of Folder structures. |
| `putf8szview.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. |
