# Google Vault API

Retention and eDiscovery for Google Workspace.

To work with Vault resources, the account must have the [required Vault privileges](https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege. For example, to download an export, an account needs the **Manage Exports** privilege and the matter shared with them.

- [REST Resource: v1.matters](https://developers.google.com/workspace/vault/reference/rest#v1.matters)
- [REST Resource: v1.matters.exports](https://developers.google.com/workspace/vault/reference/rest#v1.matters.exports)
- [REST Resource: v1.matters.holds](https://developers.google.com/workspace/vault/reference/rest#v1.matters.holds)
- [REST Resource: v1.matters.holds.accounts](https://developers.google.com/workspace/vault/reference/rest#v1.matters.holds.accounts)
- [REST Resource: v1.matters.savedQueries](https://developers.google.com/workspace/vault/reference/rest#v1.matters.savedQueries)
- [REST Resource: v1.operations](https://developers.google.com/workspace/vault/reference/rest#v1.operations)

## Service: vault.googleapis.com

To call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

### Discovery document

A [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:

- <https://vault.googleapis.com/$discovery/rest?version=v1>

### Service endpoint

A [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

- `https://vault.googleapis.com`

## REST Resource: [v1.matters](https://developers.google.com/workspace/vault/reference/rest/v1/matters)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/addPermissions` | `POST /v1/matters/{matterId}:addPermissions` Adds an account as a matter collaborator. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/close` | `POST /v1/matters/{matterId}:close` Closes the specified matter. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/count` | `POST /v1/matters/{matterId}:count` Counts the accounts processed by the specified query. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/create` | `POST /v1/matters` Creates a matter with the given name and description. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/delete` | `DELETE /v1/matters/{matterId}` Deletes the specified matter. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/get` | `GET /v1/matters/{matterId}` Gets the specified matter. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/list` | `GET /v1/matters` Lists matters the requestor has access to. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/removePermissions` | `POST /v1/matters/{matterId}:removePermissions` Removes an account as a matter collaborator. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/reopen` | `POST /v1/matters/{matterId}:reopen` Reopens the specified matter. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/undelete` | `POST /v1/matters/{matterId}:undelete` Undeletes the specified matter. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters/update` | `PUT /v1/matters/{matterId}` Updates the specified matter. |

## REST Resource: [v1.matters.exports](https://developers.google.com/workspace/vault/reference/rest/v1/matters.exports)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.exports/create` | `POST /v1/matters/{matterId}/exports` Creates an export. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.exports/delete` | `DELETE /v1/matters/{matterId}/exports/{exportId}` Deletes an export. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.exports/get` | `GET /v1/matters/{matterId}/exports/{exportId}` Gets an export. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.exports/list` | `GET /v1/matters/{matterId}/exports` Lists details about the exports in the specified matter. |

## REST Resource: [v1.matters.holds](https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds/addHeldAccounts` | `POST /v1/matters/{matterId}/holds/{holdId}:addHeldAccounts` Adds accounts to a hold. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds/create` | `POST /v1/matters/{matterId}/holds` Creates a hold in the specified matter. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds/delete` | `DELETE /v1/matters/{matterId}/holds/{holdId}` Removes the specified hold and releases the accounts or organizational unit covered by the hold. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds/get` | `GET /v1/matters/{matterId}/holds/{holdId}` Gets the specified hold. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds/list` | `GET /v1/matters/{matterId}/holds` Lists the holds in a matter. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds/removeHeldAccounts` | `POST /v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts` Removes the specified accounts from a hold. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds/update` | `PUT /v1/matters/{matterId}/holds/{holdId}` Updates the scope (organizational unit or accounts) and query parameters of a hold. |

## REST Resource: [v1.matters.holds.accounts](https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds.accounts)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds.accounts/create` | `POST /v1/matters/{matterId}/holds/{holdId}/accounts` Adds an account to a hold. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds.accounts/delete` | `DELETE /v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}` Removes an account from a hold. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.holds.accounts/list` | `GET /v1/matters/{matterId}/holds/{holdId}/accounts` Lists the accounts covered by a hold. |

## REST Resource: [v1.matters.savedQueries](https://developers.google.com/workspace/vault/reference/rest/v1/matters.savedQueries)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.savedQueries/create` | `POST /v1/matters/{matterId}/savedQueries` Creates a saved query. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.savedQueries/delete` | `DELETE /v1/matters/{matterId}/savedQueries/{savedQueryId}` Deletes the specified saved query. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.savedQueries/get` | `GET /v1/matters/{matterId}/savedQueries/{savedQueryId}` Retrieves the specified saved query. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/matters.savedQueries/list` | `GET /v1/matters/{matterId}/savedQueries` Lists the saved queries in a matter. |

## REST Resource: [v1.operations](https://developers.google.com/workspace/vault/reference/rest/v1/operations)

| Methods ||
|---|---|
| `https://developers.google.com/workspace/vault/reference/rest/v1/operations/cancel` | `POST /v1/{name=operations/**}:cancel` Starts asynchronous cancellation on a long-running operation. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/operations/delete` | `DELETE /v1/{name=operations/**}` Deletes a long-running operation. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/operations/get` | `GET /v1/{name=operations/**}` Gets the latest state of a long-running operation. |
| `https://developers.google.com/workspace/vault/reference/rest/v1/operations/list` | `GET /v1/{name=operations}` Lists operations that match the specified filter in the request. |