Add or Replace Single Source Code File
Add or replace 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 already exists in the Vault, the file is updated.
PUT
/api/{version}/codeHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) |
Content-Type | multipart/form-data |
Body Parameters
Section link for Body Parameters| Name | Description |
|---|---|
filerequired | The .java file you wish to add. Maximum allowed size is 1MB. |
Request
Section link for Requestcurl -X PUT -H "Authorization: {SESSION_ID}" \
https://veepharm.veevavault.com/api/v26.1/code
-F "file=@C:\Vault\Extensions\com\veeva\vault\custom\actions\MyCustomAction.java" \Response
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "Modified file",
"url": "/api/v26.1/code/com.veeva.vault.custom.actions.MyCustomAction"
}