**Source URL:** https://limited.veevavault.dev/commercial/vault-api/api-reference/22.3/configuration-migration/vault-compare.md

# Vault Compare



Compare the configuration of two different Vaults. The Vault you make the request in is the source Vault, and the target Vault for the comparison is listed in the body. Learn more about [Vault Compare in Vault Help](https://platform.veevavault.help/en/lr/40902).

The user who makes the request must be a cross-domain user and must have access to the `vault_component__v` in both Vaults. Learn more about [cross-domain users in Vault Help](https://platform.veevavault.help/en/lr/38996).

<Endpoint path="/api/{version}/objects/vault/actions/compare" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `application/json` (default) or `application/x-www-form-urlencoded` |
</FieldTable>

## Body Parameters {#body-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `vault_id` | The target Vault `id` for the comparison. |
| `results_type` | Optional: To include all configuration values, set this to `complete`. To only see the differences between Vaults, set to `differences`. If omitted, this defaults to `differences`. |
| `details_type` | Optional: To show component level details only, set to `none`. To include simple attribute-level details, set to `simple`. To show all attribute-level details, set to `complex`. If omitted, this defaults to `simple`. |
| `include_doc_binder_templates` | Optional: To exclude Document and Binder Templates for comparison, set to `false`. If omitted, this defaults to `true` and templates are included. |
| `include_vault_settings` | Optional: To exclude Vault Settings for comparison, set to `false`. If omitted, this defaults to `true` and Vault Settings are included. |
| `component_types` | Optional: Add a comma separated list of component types to include. For example, `Doclifecycle, Doctype, Workflow`. To exclude all component types, set to `none`. If omitted, this defaults to include all components. |
| `generate_outbound_packages` | Optional: If set to `true`,  Vault automatically generates an Outbound Package based on differences between the source Vault and target Vault. If omitted, the default value is `false`. |
</FieldTable>

## Request {#request}

<CodeExample title="">
```
Curl -X POST -H "Authorization: {SESSION_ID}" \
- H "Content-Type: application/x-www-form-urlencoded" \
- d "vault_id=1234" \
- d "results_type=Complete" \
https://myveevavault.com/api/v17.2/objects/vault/actions/compare


```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
  "responseStatus": "SUCCESS",
  "job_id": 16202,
  "url": "/api/v17.2/services/jobs/16202"
}

```
</CodeExample>

## Response Details {#response-details}

On SUCCESS, the response includes the `url` and `job_id` of the new Comparison Report job. You can use these to find the [Job Status](/vault-api/api-reference/22.3/jobs), and using the links from the job status response, download your report. The download is an Excel file. If Vault encounters any MDL component or configuration issues, the job status response also includes a link to download an error log as a CSV file. The authenticated user will also receive an in-app notification with these download links. If there are pending component updates, Vault places the report request in a queue and sends you a notification. Once component update processing is complete, Vault generates the report and sends another notification.



---

**Previous:** [Retrieve Outbound Package Dependencies](/commercial/vault-api/api-reference/22.3/configuration-migration/retrieve-outbound-package-dependencies)  
**Next:** [Vault Configuration Report](/commercial/vault-api/api-reference/22.3/configuration-migration/vault-configuration-report)