Add or Replace Single Client Code Distribution
Add or replace client code in Vault by uploading a ZIP file of the client code distribution. Vault unpacks and compares the uploaded distribution with other distributions in the Vault and:
- Adds the distribution if the distribution name is new.
- Replaces a distribution if it has the same name and the client code filenames or contents are different.
- Makes no changes if the distribution name exists and the code is the same.
POST
/api/{version}/uicode/distributions/Headers
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or application/xml |
Content-Type | multipart/form-data |
File Upload
Section link for File UploadTo upload the file, use the multi-part attachment with the file component "file={file_name}". The maximum allowed total file size for all distributions in a Vault is 50 MB.
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: multipart/form-data" \
-F "file=@custom-page.zip" \
https://myvault.veevavault.com/api/v26.1/uicode/distributions/Response
Section link for Response{
"responseStatus": "SUCCESS",
"data": {
"name": "custom_page__c",
"updateType": "ADDED",
"checksum": "5e7db21710fc4cddfaf5ad5eafdf7052"
}
}Response Details
Section link for Response Details| Name | Description |
|---|---|
name | The name of the distribution as specified in the manifest file. |
updateType | Whether the distribution was added (ADDED), replaced (MODIFIED), or left unchanged (NO_CHANGE). |
checksum | A unique string used to identify the distribution and whether the contents have changed. |