Skip to content

Validate Package

Validate a VPK package attached to this request. The validation response will include the same information on dependent components as validation logs generated through the UI.

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.

POST/api/{version}/services/package/actions/validate
NameDescription
Acceptapplication/json (default)

To upload the VPK file, use the multi-part attachment with the file component ”file={filename}”. The maximum allowed file size is 2GB.

curl -L -X POST  -H 'Authorization: {Session_ID}' \
-H 'Accept: application/json' \
-F 'file=myFile`.vpk`' \
https://myvault.veevavault.com/api/v26.2/services/package/actions/validate
{
    "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
            }
        ]
    }
}

On SUCCESS, the response includes the following information about the VPK package:

NameDescription
summaryThe summary of the package.
authorThe user who created the package.
package_nameThe name__v value of the package.
package_idThis value is N/A because the package is not yet imported into Vault.
source_vaultThe ID of the source Vault where the package originated.
package_statusThe status of the package. For example, Verified or Blocked.
total_stepsThe total number of package steps.
total_steps_blockedThe total number of package steps that have a status of Blocked.
total_component_steps_blockedThe total number of component steps that have a status of Blocked.
total_data_steps_blockedThe total number of data steps that have a status of Blocked.
total_code_steps_blockedThe total number of code steps that have a status of Blocked.
package_stepsThis 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.