**Source URL:** https://general.veevavault.dev/qualityone/vault-sdk/deploying-code/managing-deployed-code.md

# 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](https://platform.veevavault.help/en/gr/45776).

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 {#enable-or-disable-extensions}

When 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](https://platform.veevavault.help/en/gr/45776), or you can use [Vault API](/vault-api/api-reference/26.1/managing-vault-java-sdk/enable-vault-extension). Users must have the *Admin: Configuration: Vault Java SDK: Create* and *Edit* and permissions to enable or disable code.

<Endpoint path="/api/{version}/code/{FQCN}/{enable || disable}" method="PUT"></Endpoint>
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 {#download-source-code}

You can retrieve the source code for a single file through the Admin UI, or through [Vault API](/vault-api/api-reference/26.1/managing-vault-java-sdk/retrieve-single-source-code-file). Users must have the *Admin: Configuration: Vault Java SDK: Read* permission to download source code.

<Endpoint path="/api/{version}/code/{FQCN}" method="GET"></Endpoint>
<Aside type="note" title="Note">Vault is not intended to be a source control system. Uploaded custom Java
SDK code may be reformatted; however, Vault never modifies the functionality of
any uploaded code.

</Aside>

### Add or Replace Single Source Code File {#add-or-replace-single-source-code-file}

You 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](/vault-api/api-reference/26.1/managing-vault-java-sdk/add-or-replace-single-source-code-file) 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.

<Endpoint path="/api/{version}/code" method="PUT"></Endpoint>
Users must have the *Admin: Configuration: Vault Java SDK: Create* and *Edit* and permissions to use this endpoint.

### Delete Single Source Code File {#delete-single-source-code-file}

In 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](/vault-api/api-reference/26.1/managing-vault-java-sdk/delete-single-source-code-file).

<Endpoint path="api/{version}/code" method="DELETE"></Endpoint>
Users must have the *Admin: Configuration: Vault Java SDK: Create* and *Edit* and permission to delete code with this endpoint.



---

**Previous:** [Deploy the VPK](/qualityone/vault-sdk/deploying-code/deploy-vpk)  
**Next:** [Entry Points](/qualityone/vault-sdk/entry-points)