REST list item delete does not go 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)
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()
Comments
Post a Comment