cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Delete items from Sharepoint list

roland-daane
Deputy Chef II
Deputy Chef II

Hi, I'm trying to delete all items from a SharePoint list, but keep getting this error:

412 Precondition Failed: {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.ClientServiceException","message":{"lang":"en-US","value":"The request ETag value '' does not match the object's ETag value '\"d83ffc2b-6c9f-4db1-b0b1-1c1bfcfd4c16,1\"'."}}}


I found thet the headers needed to include:

    X-HTTP-Method: Merge

    If-Match: ETag


I first call:

_api/web/lists/getByTitle('B360__Issues')/items


Then in a loop

_api/Web/Lists/getByTitle('B360__Issues')/getItemById(ID from step 2)

6 REPLIES 6

sophat-sam
Deputy Chef I
Deputy Chef I

here's the example recipe: https://app.workato.com/recipes/1833010?st=3f1613

roland-daane
Deputy Chef II
Deputy Chef II

Got it Sophat, thanks.

I really need to get into Workato more.

In the do untill loop you just drag the datapil from the previous step....


It's working now!


What I want to do is undex the ID column where I store the Autodesk Issue ID's.

Then create a list item.

If that fails (the record already exists), then update that record.


This will prevent having to search the list if a record exists.