I'm using RestAPI to delete item from list. But I dont want to permanently delete it. I want to send it to Recycle Bin. Is there possible with using RestAPI?
2 Answers
If you use HTTP command DELETE, it will delete permanently and below is URI struture:
http://<sitecollection>/<site>/_api/web/lists(listid)/items(itemid)
If you want to delete item and move it to recycle bin, use HTTP command POST and below is URI structure:
http://<sitecollection>/<site>/_api/web/lists(listid)/items(itemid)/recycle()
instead of delete command, use recycle:
http://sitecollectionURL/_api/web/lists(listname)/items(itemid)/recycle()