# IRPCVaultsAdmin.DetachVault

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Vault management](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/index.md)

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

Badges: `Administration API / specialized` `admin` `session`

Removes the vault from the server's list of registered vaults but does not
remove the metadata database or file data files.

- **Service:** [Vault management](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/index.md) `MFiles.IRPCVaultsAdmin`
- **gRPC method:** `/MFiles.IRPCVaultsAdmin/DetachVault`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/detach-vault`
- **Request:** [`DetachVaultRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/DetachVault/index.md#request)
- **Response:** [`DetachVaultResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/DetachVault/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

- Requires the system administrator server role (server right `manage_vaults`).
- Takes the vault offline first: open sessions to the vault are disconnected. The metadata
  database and the file data stay, and
  [AttachExistingVault](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/AttachExistingVault/index.md) can attach them again,
  on this or another server.

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

## Request: DetachVaultRequest

> 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 |
|---|---|---|
| `vault` | `string` | The GUID of the vault to detach. |

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

## Response: DetachVaultResponse

No fields.

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

## Related methods

- [AttachExistingVault](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/AttachExistingVault/index.md): Attaches an existing vault (metadata database and file data files) to the server.
