Renditions Replace/Bulk Delete API

This is regarding the Renditions replace and bulk delete in renditions API. 


We are trying to replace a file for a already existing renditions. But we end up getting Missing required parameter file. Below is the API call.

curl --insecure  -X PUT  -H "Authorization: {Session_ID}" -H "Content-Type: multipart/form-data" -F "file=/test/123.pdf" "https://dummy_url.com/api/v17.2/objects/documents/144675/versions/1/0/renditions/legacy_audit_trail__c"

{"responseStatus":"EXCEPTION","errors":[{"type":"PARAMETER_REQUIRED","message":"Missing required parameter: file."}]}


Bulk Delete:

curl -X DELETE -H "Authorization: {Session ID}" -H "Content-Type: text/csv" -H "Accept: text/csv" --data-binary @"audit_0.csv" "https://DUmmyURL.com/api/v15.0/objects/documents/renditions/batch"

We get the same error Missing required parament: file


Also for the Bulk Rendition delete documentation specifies two rendition_type__v. Please share a sample csv for this Delete (Attached the image for reference)

1 comment

  • Avatar
    Kevin N Official comment

    Hi Shankar,

    1. For the "Replace Document Version Rendition" API, please try the following:
      curl --insecure -X PUT -H "Authorization: {Session_ID}" -H "Content-Type: multipart/form-data" -F "file=@/test/123.pdf" "https://dummy_url.com/api/v17.2/objects/documents/144675/versions/1/0/renditions/legacy_audit_trail__c"
      In curl, the "@" in -F "file=@/directory/file.pdf" specifies that curl should set the file parameter equal to a file at /directory/file.pdf. If you just use -F "file=/directory/file.pdf" without the "@", the file parameter will be set to a text value of "/directory/file.pdf" and will not read in the file.

    2. For the "Delete Multiple Document Renditions" API, can you confirm the error? I believe you may be receiving a "Missing required parameter [idParam]" error. In that case, please try:
      curl -X DELETE -H "Authorization: {Session ID}" -H "Content-Type: text/csv" -H "Accept: text/csv" --data-binary @"audit_0.csv" "https://DUmmyURL.com/api/v15.0/objects/documents/renditions/batch?idParam=id"
    3. As to your last question, the duplicate "rendition_type__v" is a typo. There should only be one field called "rendition_type__v". Please see below for an example CSV format:





Please sign in to leave a comment.