Managing Deployed Code
Deploying VPKs are not the only way to manage your custom code. You can view, download, delete, enable or disable deployed extensions in the Admin UI, located in Admin > Configuration > VAULT JAVA SDK. Learn more about the Admin UI in Vault Help
You also may need more granular deploy options. For example, you may need to delete a single file rather than all files. However, we do not recommend using the following single-file deploy methods as you may introduce or delete code which breaks existing deployed code. As a best practice, you should always use VPKs to manage code deployment.
Enable or Disable Extensions
Section link for Enable or Disable ExtensionsWhen deployed, extensions are automatically enabled. You may wish to disable an extension if you are troubleshooting a bug, or loading data into a Vault and do not want a trigger to execute. You can easily enable and disable extensions through the Admin UI
/api/{version}/code/{FQCN}/{enable || disable}You can only enable and disable entry-point classes, such as triggers and actions. You cannot disable UDCs, or Vault extensions which reference other code components.
Download Source Code
Section link for Download Source CodeYou can retrieve the source code for a single file through the Admin UI, or through Vault API. Users must have the Admin: Configuration: Vault Java SDK: Read permission to download source code.
/api/{version}/code/{FQCN}Add or Replace Single Source Code File
Section link for Add or Replace Single Source Code FileYou may need to add or replace a single file rather than a whole VPK. However, we do not recommend using the following single-file deploy method as you may introduce or delete code which breaks existing deployed code. As a best practice, you should always use VPKs to manage code deployment.
The following endpoint adds or replaces a single .java file in the currently authenticated Vault. If the given file does not already exist in the Vault, it is added. If the file does already exist, the file is updated.
/api/{version}/codeUsers must have the Admin: Configuration: Vault Java SDK: Create and Edit and permissions to use this endpoint.
Delete Single Source Code File
Section link for Delete Single Source Code FileIn some cases, you may need to delete a single file rather than replace all or delete all files. However, we do not recommend using the following single-file deploy method as you may introduce or delete code which breaks existing deployed code. As a best practice, you should always use VPKs to manage code deployment.
Code deletion is permanent. There is no way to retrieve a deleted code file. Vault does not allow deletion of a file which is currently in-use.
You can delete a single source file through the Admin UI, or through Vault API.
api/{version}/codeUsers must have the Admin: Configuration: Vault Java SDK: Create and Edit and permission to delete code with this endpoint.