Is there a way to retrieve the meta for a deleted Item (File/Folder) for Office365 OneDrive through REST API?

百般思念 提交于 2019-12-01 08:14:06

Recycle Bin resource endpoint URI:

http://<sitecollection>/<site>/_api/web/RecycleBin(recyclebinitemid)

How to distinguish Recycle Bin items

Recycle Bin resource exposes SP.RecycleBinItem.itemType property that returns the type of the Recycle Bin item.

Examples

The following query demonstrates how return File items:

http://<onedrive for business url>/_api/web/RecycleBin?$filter=(ItemType eq 1)

and the the following one how to return Folder items:

http://<onedrive for business url>/_api/web/RecycleBin?$filter=(ItemType eq 5)

,where token <onedrive for business url> for OneDrive For Business site has the following format:

https://tenant-my.sharepoint.com/personal/username_tenant_onmicrosoft_com

Does

http://<sitecollection>/<site>/_api/web/RecycleBin(recyclebinitemid) 

work? I grabbed the structure from: SP.RecycleBinItem.restore Method (sp.js).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!