REST列表项目删除不会转到回收站
-
10-12-2019 - |
题
我有一个SharePoint 2013自动软化应用程序,其中包含了许多列表。我希望能够使用REST API软删除列表项,并将其转到回收站而不是永久删除。
根据此页面应该是默认值:
使用http delete命令对特定端点URL来删除该端点表示的SharePoint对象。在可回收对象的情况下,例如列表,文件和列表项,这导致回收操作。 但是,只要我使用REST API删除项目(带HTTP删除),它就不会进入回收站,而是似乎永久删除。
如果我转到“... / {app_name} /列表/ {list_name} /allitems.aspx”页面并通过该界面删除列表项,然后它们很好地进入回收站。有谁知道如何只使用REST API将列表项目移动到回收站中?
解决方案
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