Reputation: 3
I have a Site Collection Administrator account on a SharePoint (On-Prem SharePoint Server Subscription Edition) site, and I need to programmatically retrieve deleted items from the Recycle Bin using the SharePoint REST API.
When I use the following API call, I can only retrieve the items I deleted:
GET https://{site_url}/_api/web/RecycleBin
However, when I view the Recycle Bin through the SharePoint website, I can see items deleted by other users, as well restore them.
What I have tried:
What I am trying to achieve: I need to retrieve all deleted items (including those deleted by other users) via the SharePoint REST API, similar to what I can see on the website.
My questions:
Any help or guidance on this issue would be appreciated!
Upvotes: 0
Views: 127
Reputation: 1
I was having the same issue and was really confused as the user can see the files in the web interface just not in the;
_api/web/recycleBin
The key here is to this instead; (swap "web" with "site")
_api/site/recycleBin
I am still testing but this seems to completely fix the issue
Upvotes: 0