Notifications
Announcements
In your HTTP request URL, use:
_api/web/GetFileByServerRelativeUrl('[SERVER-RELATIVE-PATH]')/recycle()
Where [SERVER-RELATIVE-PATH] should be something like:
[SERVER-RELATIVE-PATH]
/sites/YourSite/YourLibrary/YourFile.xlsx
If your "Create file" action returns a full SharePoint URL, you need to extract the server-relative portion:
substring(outputs('Create_file')?['body/Path'], indexOf(outputs('Create_file')?['body/Path'], '/sites/'))
_api/web/GetFileByServerRelativeUrl('@{outputs('Compose')}')/recycle()
DELETE
https://[yourtenant].sharepoint.com/sites/[yoursite]/_api/web/GetFileByServerRelativeUrl('/sites/[yoursite]/[yourlibrary]/[yourfile]')
Accept
application/json;odata=verbose
Content-Type
X-RequestDigest
IF-MATCH
*
If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍. Regards, Riyaz
_api/web/Lists/GetByTitle('File Lock Testing')/GetItemById(1)/recycle
GetFileByServerRelativeUrl()
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 519 Super User 2025 Season 2
Tomac 296 Moderator
abm abm 232 Most Valuable Professional