Validate Package
Validate a VPK package attached to this request. The validation response will include the same information on dependent components as validation logs
When you validate a VPK, Vault analyzes the package and determines the order in which components will be deployed. Vault resolves this order using the dependency information in each component's dependency file. Once Vault creates a deployment order, you cannot modify it. To change the deployment order, you must import a new package.
For packages that include Vault Java SDK code, this operation recompiles source code against the target Vault's libraries and dependencies and checks for compilation errors and restrictions. For example, new is not allowed for non-allowlisted classes. When compilation errors are detected, Vault assigns the code step a status of Blocked. Learn more about Vault Java SDK limits and restrictions.
This endpoint does not import your package. To import a package and validate it asynchronously, use Import Package.
/api/{version}/services/package/actions/validateHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) |
Body Parameters
Section link for Body ParametersTo upload the VPK file, use the multi-part attachment with the file component ”file={filename}”. The maximum allowed file size is 2GB.
Request
Section link for Requestcurl -L -X POST -H 'Authorization: {Session_ID}' \
-H 'Accept: application/json' \
-F 'file=myFile`.vpk`' \
https://myvault.veevavault.com/api/v26.3/services/package/actions/validateResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseDetails": {
"summary": "Auto Claims Linking Config",
"author": "jennie@veepharm.com",
"package_name": "PKG-0004-2",
"package_id": "N/A",
"source_vault": "51577",
"package_status": "Blocked",
"total_steps": 4,
"total_steps_blocked": 1,
"total_component_steps_blocked": 1,
"total_data_steps_blocked": 0,
"total_code_steps_blocked": 0,
"start_time": "07:05:2020 06:24:15",
"end_time": "07:05:2020 06:24:15",
"package_error": "",
"package_steps": [
{
"name__v": "00010",
"step_type__v": "Component",
"step_name__v": "annotation_keyword_targets__sys",
"type__v": "Object",
"deployment_status__v": "Verified",
"deployment_action": "Update",
"dependencies": [
{
"component_name": "annotation_keyword_targets__sys.base__v",
"component_type": "Objecttype",
"subcomponent_name": "",
"subcomponent_type": "",
"status": "In Target"
},
{
"component_name": "default_status__v",
"component_type": "Picklist",
"subcomponent_name": "",
"subcomponent_type": "",
"status": "In Target"
}
]
},
{
"name__v": "00020",
"step_type__v": "Component",
"step_label__v": "Claims Document",
"step_name__v": "claims_document__c",
"type__v": "Doctype",
"deployment_status__v": "Blocked",
"deployment_action": "Add (missing in Vault)",
"dependencies": [
{
"component_name": "document_creation_date__v",
"component_type": "Docfield",
"subcomponent_name": "",
"subcomponent_type": "",
"status": "In Target"
},
{
"component_name": "reference_documents__c",
"component_type": "Doclifecycle",
"subcomponent_name": "",
"subcomponent_type": "",
"status": "In Target"
},
{
"component_name": "product__v",
"component_type": "Docfield",
"subcomponent_name": "",
"subcomponent_type": "",
"status": "In Target"
},
{
"component_name": "air_bulk_03__c",
"component_type": "Renditiontype",
"subcomponent_name": "",
"subcomponent_type": "",
"status": "Missing - Block"
},
{
"component_name": "country__v",
"component_type": "Docfield",
"subcomponent_name": "",
"subcomponent_type": "",
"status": "In Target"
}
]
},
{
"id": "0IS000000002003",
"name__v": "00030",
"step_type__v": "Code",
"step_label__v": "Vault Java SDK Code",
"step_name__v": "Vault Java SDK Code",
"type__v": "Code",
"deployment_status__v": "Verified",
"deployment_action": "Incremental",
"validation_response": "SUCCESS",
"validation_message": "Source code in (SDK-HELLO-WORLD) validated successfully."
},
{
"id": "0IS000000001002",
"name__v": "00040",
"step_type__v": "Data",
"step_label__v": "DSET-00001-marketing_campaign__c",
"step_name__v": "marketing_campaign__c",
"type__v": "Object",
"deployment_status__v": "Verified",
"deployment_action": "Create (add 5 records)",
"record_migration_mode__sys": false,
"include_object_record_attachments__sys": false
}
]
}
}Response Details
Section link for Response DetailsOn SUCCESS, the response includes the following information about the VPK package:
| Name | Description |
|---|---|
summary | The summary of the package. |
author | The user who created the package. |
package_name | The name__v value of the package. |
package_id | This value is N/A because the package is not yet imported into Vault. |
source_vault | The ID of the source Vault where the package originated. |
package_status | The status of the package. For example, Verified or Blocked. |
total_steps | The total number of package steps. |
total_steps_blocked | The total number of package steps that have a status of Blocked. |
total_component_steps_blocked | The total number of component steps that have a status of Blocked. |
total_data_steps_blocked | The total number of data steps that have a status of Blocked. |
total_code_steps_blocked | The total number of code steps that have a status of Blocked. |
package_steps | This array contains information about each of the package steps. |
The response includes additional information about each step depending on whether the step type is Component, Code, or Data. For example, a code step includes a validation_message verifying the code, or a validation_error message if code fails to compile correctly.
If Vault cannot determine a valid deployment order, validation fails. For example, validation may fail because a required dependency is missing from both the package and the target Vault.