20

I have a SharePoint 2013 autohosted app with a number of lists inside of it. I would like to be able to soft delete a list item using the REST API and have it go to the Recycle Bin instead of being permanently deleted.

According to this page that should be the default:

Use the HTTP DELETE command against the specific endpoint URL to delete the SharePoint object represented by that endpoint. In the case of recyclable objects, such as lists, files, and list items, this results in a Recycle operation.

However whenever I delete an item using the REST API (with HTTP DELETE) it does not go into the Recycle Bin and instead appears to be permanently deleted.

If I go to the ".../{app_name}/Lists/{list_name}/AllItems.aspx" page and delete list items through that interface instead, then they nicely go into the Recycle Bin. Does anyone know how to move list items into the Recycle Bin using only the REST API?

1 Answer 1

23

Have you tried using the "recycle" command using the REST API? (not using HTTP DELETE)

Endpoint URI structure:

http://<sitecollection>/<site>/_api/web/lists(listid)/items(itemid)/recycle()

Please refer to the documentation regarding recycle on MSDN: http://msdn.microsoft.com/en-us/library/jj247053.aspx

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.