I was able to get the call working on other libraries so I think I was testing it on a cooupt library.
I'm getting this error: "Cannot find resource for the request getfolderbyserverurl"
We have a lot of items within folders that I would like to address with this clean-up project.
Hey there everyone,
I know REST actions have beed discussed a lot but I'm specifically trying to delete items in various libraries with a web request and at the moment I'm baffled. Here's the previous post I was using to build it: SP2013 REST API
This call was working and now it isn't. Could anyone help me out. I'm supposed to be rolling this out today.
Here's an email I'm sending myself with the values that are being applied. It looks like the list name and Item number are correct, bit it isn't deleting the item. The workflow also runs all the way through with no errors. I'm at a loss.
If I can get this working again, I would like to add the ability to delete documents within folders as well with my call. So maybe add a "GetByFolder"
This is my first time attempting this so any help you can give would be appreciated.
Solved! Go to Solution.
I would still like to delete Items in folders
correct call should have been
http://site url/_api/web/GetFileByServerRelativeUrl('/Folder Name/file name')
Yes, this is totally it.
(CCD is the site collection name) not sure why I had to add it again but that's what worked.
I added the recycle to the end instead because adding the delete method in the header did a hard delete and I want the items to be in the recycle bin for a bit in case the user deletes in error.