# IRPCWorkspace.SetWorkspaceSettings

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) > [Workspaces](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkspace/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkspace/SetWorkspaceSettings/

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

Stores the tab order of the workspace of an object type for the caller or as the default for
all users, or resets the caller's order.

- **Service:** [Workspaces](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkspace/index.md) `MFiles.IRPCWorkspace`
- **gRPC method:** `/MFiles.IRPCWorkspace/SetWorkspaceSettings`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/set-workspace-settings`
- **Request:** [`SetWorkspaceSettingsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkspace/SetWorkspaceSettings/index.md#request)
- **Response:** [`SetWorkspaceSettingsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWorkspace/SetWorkspaceSettings/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:** no
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

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

## Remarks

- Requires a vault session. The actions `WORKSPACE_SETTINGS_ACTION_SET_AS_DEFAULT_TO_ALL_USERS`
  and `WORKSPACE_SETTINGS_ACTION_SET_AS_DEFAULT_TO_ALL_USERS_OVERRIDE` also need the vault right
  `manage_common_views`.
- `workspace_settings.view_ids` must not be empty except with
  `WORKSPACE_SETTINGS_ACTION_RESET_TO_DEFAULT`, and every ID must be a tab view of this
  workspace; otherwise the call fails with "The parameter is incorrect.". A default order may
  contain only common views.
- `WORKSPACE_SETTINGS_ACTION_RESET_TO_DEFAULT` deletes the caller's own order.
  `WORKSPACE_SETTINGS_ACTION_SET_AS_DEFAULT_TO_ALL_USERS_OVERRIDE` stores the default and deletes
  every user's own order for this object type.

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

## Request: SetWorkspaceSettingsRequest

> 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 |
|---|---|---|
| `object_type_id` | `int32` | The source object type of the workspace. |
| `workspace_settings_action` | [`WorkspaceSettingsAction`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.WorkspaceSettingsAction/index.md) | What to do. Leave unset (`WORKSPACE_SETTINGS_ACTION_APPLY_PERSONAL_SETTINGS`) to store the caller's own order. Values: `WORKSPACE_SETTINGS_ACTION_APPLY_PERSONAL_SETTINGS` (0), `WORKSPACE_SETTINGS_ACTION_RESET_TO_DEFAULT` (1), `WORKSPACE_SETTINGS_ACTION_SET_AS_DEFAULT_TO_ALL_USERS` (2), `WORKSPACE_SETTINGS_ACTION_SET_AS_DEFAULT_TO_ALL_USERS_OVERRIDE` (3). |
| `workspace_settings` | [`WorkspaceSettings`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.WorkspaceSettings/index.md) | The tab view IDs in display order. Ignored when resetting. |
| `workspace_settings.view_ids[]` | repeated `int32` | View IDs in order. |

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

## Response: SetWorkspaceSettingsResponse

No fields.
