cancel
Showing results for 
Search instead for 
Did you mean: 
iceman
Nintex Newbie

REST API Recycle Bin DeleteAll Issues

Not sure is anyone can help me, but litle confused as why this does not work as documented by Microsoft.  

 

Microsoft API

https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-visio/jj246426(v=office.15)

 

According to the documented API, to remove all items in the recycl bin you could call the following: 

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

 

I started with a small proof of concept.  You need to get the X-RequestDigest First, which I did in the following web request:

 

Nintex1.png

In the next step I extracted the X-RequestDigest through the Query XML control.

Nintex2.png

Then I made the call to the API via the Web Request Control.

Nintex3.png

Thast all it took to set it up, but I was surprised that it did not work even though it reported a success.

The logs came back with a 200 success, but when i looked at the recycle bin nothing was deleted.  Has anyone got this to work, or am I missing something?

 

Log Content:

Getting Content Info:<?xml version="1.0" encoding="utf-8"?><d:GetContextWebInformation xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss

 

Extracted: 0x000922E7F139F87D82D00BDF0BCD00F3B00000D7D0AC29C02A000C097G20F876E340G37DB01100024D3DFEEC00D80AA569400000F000BBCCE15G70D0F0G007,22 Aug 2019 22:17:30 -0000

 

Error Flag:False - Error

 

HTTP Result: 200 - <?xml version="1.0" encoding="utf-8"?><dSmiley Very HappyeleteAll xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmln

 

Labels: (1)
0 Kudos
Reply
1 Reply
Community Manager Community Manager
Community Manager

Re: REST API Recycle Bin DeleteAll Issues

@iceman while the workflow is completing the call successfully, I am not sure you can make that call as you are attempting. I could be wrong, but would suggest using postman to test that call out first. If that works, then look at the authentication to see what may be going wrong when running it via the workflow. You may need it to run with elevated permissions. 

0 Kudos
Reply