Hi all,
Does anyone have experience using batch updates via the API and atomicity function.
I have followed the documenation similiar to the below, both with and without the prefer header. My understanding is that if one of the requests below fail, then any successful ones in the array will be rolled back. However, this doesn't seem to be happening.
On use of the below, if the second POST fails, the first POST still appears in the database.
Any help greatly appreciated
{
"requests": [
{
"method": "POST",
"atomicityGroup": "g1",
"url": "City",
"id": "t3",
"body": {
"Id": "62f9bc01-57cf-4cc7-90bf-8672acc922e3",
"Name": "Spokane"
},
"headers": {
"Content-Type": "application/json;odata=verbose",
"Accept": "application/json;odata=verbose",
"Prefer": "continue-on-error"
}
},
{
"method": "POST",
"atomicityGroup": "g1",
"url": "City",
"id": "t2",
"body": {
"Name": "Texas"
},
"headers": {
"Content-Type": "application/json;odata=verbose",
"Accept": "application/json;odata=verbose",
"Prefer": "continue-on-error"
}
}
]
}