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

后端 未结 2 697
一向
一向 2021-01-14 11:09

I\'m looking for a way to retrieve the meta for a deleted item(file/folder). I\'m able to get change logs indicating that a certain action has been performed on an Item, and

相关标签:
2条回答
  • 2021-01-14 11:52

    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
    
    0 讨论(0)
  • 2021-01-14 12:02

    Does

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

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

    0 讨论(0)
提交回复
热议问题