# IRPCVaultAdmin.VerifyVault

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

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

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

Verifies the consistency of a vault's database and optionally of its file data, and optionally
fixes the problems it finds (M-Files Admin's "Verify and Repair").

With `verifyvaultjob.fix_errors` false the vault is not modified; the problems found are reported
in `poutput.errors`. With `fix_errors` true the problems are reported and fixed. If the method
itself fails, the verification or repair logic failed or the vault is too badly damaged to be
fixed by this method.

- **Service:** [Vault administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/index.md) `MFiles.IRPCVaultAdmin`
- **gRPC method:** `/MFiles.IRPCVaultAdmin/VerifyVault`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/verify-vault`
- **Request:** [`VerifyVaultRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/VerifyVault/index.md#request)
- **Response:** [`VerifyVaultResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/VerifyVault/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

- **Long-running.** With `synchronous` false the call starts a server-level background job and
  returns at once; follow it with a server-level session (see the service overview), and read the
  problems from the job's `output`. With `synchronous` true the call returns when the
  verification is done.
- Requires a vault session and the vault right `verify_vault`.
- If the server's verification options for the vault require it, the vault is taken offline for
  the duration: open sessions are disconnected.
- `verify_file_contents` true also checks the integrity of every file on disk, which can take a
  long time.

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

## Request: VerifyVaultRequest

> 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 |
|---|---|---|
| `verifyvaultjob` | [`VerifyVaultJob`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VerifyVaultJob/index.md) | What to verify: the vault (`vault_guid`), whether to fix the problems found (`fix_errors`) and whether to also check the contents of the files on disk (`verify_file_contents`). |
| `verifyvaultjob.vault_guid` | `string` | The GUID of the vault to verify. |
| `verifyvaultjob.fix_errors` | `bool` | True to fix detected errors. |
| `verifyvaultjob.verify_file_contents` | `bool` | True to verify the integrity of the data files on disk. |
| `synchronous` | `bool` | True to verify within the call. False to start a background job and return at once. |

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

## Response: VerifyVaultResponse

> 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 |
|---|---|---|
| `task_id` | `int32` | The ID of the server-level verification job when `synchronous` is false. |
| `poutput` | [`VerifyVaultJobOutputInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VerifyVaultJobOutputInfo/index.md) | The problems found, one message per item in `errors`, when `synchronous` is true. Empty if the vault has no problems. |
| `poutput.errors[]` | repeated `string` | Encountered vault errors. |
