Retrieve Outbound Package Dependencies
Outbound packages only include configuration details for the included components. Sometimes, a configuration for one component depends on another component which you may not have explicitly specified.
With this API, you can retrieve all outstanding component dependencies for an outbound package. You can then add these missing dependencies to the package with the Create Object Records API.
GET
/api/{version}/vobjects/outbound_package__v/{package_id}/dependenciesHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{package_id} | The ID of the outbound_package__v record from which to retrieve dependencies. |
Request : Retrieve Dependencies
Section link for Request : Retrieve Dependenciescurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v23.1/vobjects/outbound_package__v/0PO000000001001/dependenciesResponse : Retrieve Dependencies
Section link for Response : Retrieve Dependencies{
"responseStatus": "SUCCESS",
"responseDetails": {
"total_dependencies": 1,
"target_vault_id": 1000486,
"package_name": "PKG-0001",
"package_id": "0PO000000001001",
"package_summary": "Outbound Package",
"package_description": "Package for deployment",
"url": "https://myvault.veevavault.com/api/v23.1/vobjects/package_component__v"
},
"package_dependencies": [
{
"id": "0CD000000000M70",
"name__v": "Product Label",
"component_name__v": "product_label__c",
"component_type__v": "Object",
"referenced_component_name": "product__v",
"referenced_component_type": "Object"
}
]
}Request : Add Dependencies
Section link for Request : Add Dependenciescurl -X POST -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v23.1/vobjects/package_component__vExample JSON Request Body: Add Dependencies
Section link for Example JSON Request Body: Add Dependencies[
{
"outbound_package__v": "0PO000000001001",
"vault_component__v": "0CD000000002810"
}
]Response Details
Section link for Response DetailsOn SUCCESS, the response includes the following information:
| Name | Description |
|---|---|
total_dependencies | The total number of outstanding component dependencies. |
target_vault_id | The ID of the target Vault for the outbound package. |
package_name | The name__v value of the outbound package. |
package_id | The ID of the outbound_package__v record with these outstanding dependencies. |
url | The Vault REST API request to add missing dependencies to this outbound package. Learn more about adding dependencies. |
package_dependencies | This array contains information about each of the total_dependencies. If there are no outstanding dependencies, this array is not returned. |
Adding Dependencies
Section link for Adding DependenciesFrom the url in the response, you can add missing dependencies using the Create Object Records API with the following body parameters: