# IRPCViews.SetViewVisibility

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

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

Shows or hides a view in the calling user's view collection.

- **Service:** [Views](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/index.md) `MFiles.IRPCViews`
- **gRPC method:** `/MFiles.IRPCViews/SetViewVisibility`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/set-view-visibility`
- **Request:** [`SetViewVisibilityRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/SetViewVisibility/index.md#request)
- **Response:** [`SetViewVisibilityResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/SetViewVisibility/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **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

- Affects only the calling user: hiding a common view does not hide it from other users. No
  special vault rights are needed.
- Works for common views and for the user's own private views. Hidden views are still returned
  by [GetViews](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetViews/index.md), with `is_visible` false.

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

## Request: SetViewVisibilityRequest

> 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 |
|---|---|---|
| `id` | `int32` | The ID of the view. |
| `visible` | `bool` | True to show the view, false to hide it. |

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

## Response: SetViewVisibilityResponse

No fields.

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

## Related methods

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