Migrate Component Configuration
Vault's Admin UI provides a very robust way for configuration migration using VPK packagesRECREATE command. You can execute this command on the target Vault.
Let’s again use Notification Template as an example. We will migrate my_template1__c from a source Vault to a target Vault.
First generate a RECREATE command on a source Vault. Ensure that the session ID used to authenticate the API call is generated by authenticating to the source Vault.
Request
Section link for Requestcurl -X GET \
https://{sourceVault}.veevavault.com/api/mdl/components/Notificationtemplate.my_template_1__c \
-H 'Accept: application/json' \
-H 'Authorization: {sourceVaultSessionId}'This generates a RECREATE command for Notificationtemplate.my_template_1__c
RECREATE Notificationtemplate my_template_1__c (
label('My Template 1'),
active(true),
description(''),
referenced_component(),
subject('My Subject'),
notification('My notification test'),
email_body('My email body'),
entity_type('document')
);You can then execute this command on the target Vault using the session ID generated from authenticating to the target Vault.
curl -X POST \
https://{targetVault}.veevavault.com/api/mdl/execute \
-H 'Accept: application/json' \
-H 'Authorization: {sourceVaultSessionId}' \
-d 'RECREATE Notificationtemplate my_template_1__c (
label('My Template 1'),
active(true),
description(''),
referenced_component(),
subject('My Subject'),
notification('My notification test'),
email_body('My email body'),
entity_type('document')
);'