Hi Mattias,
I believe the reason is your internal URLs are incorrect.
They should take the form of 'data/objects/ExpenseSheet/<id>'.
Hope this helps,
Ophir
We are developing an interface for expense sheets from a legacy system to Clarizen and would like to clean out uploaded data between test runs.
Each test run is for 1200 projects, so deleting the expense sheets in the UI is too slow.
I tried to use below code:
curl -H "Authorization: Session fdfdfdf-40c1-439c-8c9b-223fd0baa574_23596289" https://api.clarizentb.com/v2.0/services/bulk/execute -d "{requests:[{url:'ExpenseSheet/23bje1sn7lxusbpkkhry9v3nr844',method: 'DELETE'},{url:'ExpenseSheet/23bje1sn7lxusbpkkhry9v3nr840',method: 'DELETE'},{url:'ExpenseSheet/23bje1sn7lxusbpkkhry9v3nr836',method: 'DELETE'}]}"
But, it does not seem to work:
{"responses":[{"statusCode":404,"body":{"errorCode":"FileNotFound","message":"File not found: ExpenseSheet/23bje1sn7lxusbpkkhry9v3nr844.","referenceId":"1qHZGKg
BR41Qsl0kiwcMeQ"},"headers":[]}]}
Please sign in to leave a comment.
Hi Mattias,
I believe the reason is your internal URLs are incorrect.
They should take the form of 'data/objects/ExpenseSheet/<id>'.
Hope this helps,
Ophir
Thanks Ophir, that did the trick!
I got below to work.
curl -H "Authorization: Session XXXXXX-4893-4358-bfea-YYYYYYYY_23596289" https://api.clarizentb.com/v2.0/services/bulk/execute -d "{requests:[{url:'data/objects/ExpenseSheet/21pits5517q6usfkfl3xx85ip460',method: 'DELETE'},{url:'data/objects/ExpenseSheet/21pits5517q6usfkfl3xx85ip480',method: 'DELETE'},{url:'data/objects/ExpenseSheet/21pits5517q6usfkfl3xx85ip512',method: 'DELETE'}]}"
Next is to come up with a way of creating such batch script instructions.