Blogs

March 18, 2016

Deleted List item through REST API is not moving to Recycle Bin

To delete SharePoint list item, we can make use of REST API while customizing OOTB Delete item functionality in SharePoint list. To delete an item through REST API, we generally make use of following REST URL:

http://site_url/_api/web/lists(list_Id)/items(item_id)

Now, this will delete the specified list item permanently rather than moving it to Recycle bin. So, how could we move a List Item to Recycle bin using REST API same as OOTB Delete functionality?

We just need to append recycle() function to above REST URL. So, complete URL will be:

http://site_url/_api/web/lists(list_id)/items(item_id)/recycle()

Important Note: To move an item to Recycle bin, "Recycle bin" must be ON. You can turn it On or Off from Central administration. Below are the steps to configure Recycle bin: