function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
neelam mooreneelam moore 

Deleting a Content Version Record

Hi All,

I m trying to delete a content version record from my java code using REST api using HTTPDelete :

HttpDelete delete = new HttpDelete(baseUri+"/sobjects/ContentVersion/"+v);
where delete.getURI() = https:// xxx.my.salesforce.com/services/data/v35.0/sobjects/ContentVersion/06824000000aAqlAAE

HttpResponse  response = htttpCient.execute(delete);

but i get a status 401 on delete. This same URI works if if i delete a Account object without an issue. Can anyone please help ? I would really appriciate it!

Thank you!
Best Answer chosen by neelam moore
ManojjenaManojjena
Hi Neelam,

Through Api you can not delete  Content Version .You can check the screen shot where delete properties is false  .also you can check in work bench .

User-added image

All Answers

ManojjenaManojjena
Hi Neelam,

Through Api you can not delete  Content Version .You can check the screen shot where delete properties is false  .also you can check in work bench .

User-added image
This was selected as the best answer
neelam mooreneelam moore
Thank you Manoj. Yes I just found out the same. Only the ContnetDocument obj is allowed to be deleted.