We're working on a bit of an API project centered around building an app that would allow some of our lower-privileged users to update prestages for mobile devices using a tool that we provide. Using the new API, it looks like this should be possible, but, whenever we try to update the status of a device using an api call, we get an error 409: Optimistic Lock Failed . This happens even when we use the 'Try it' options through the API UI. This happens if we try to delete the scoping or modify it.
Here's the API call (with variables):
curl -X POST "$JSS_URL/api/v2/mobile-device-prestages/5/scope/delete-multiple" -H "accept: application/json" -H "Authorization: $token" -H "Content-Type: application/json" -d "{"serialNumbers":["$serial_number"],"versionLock":1}"
Here's the return:
{
"httpStatus" : 409,
"errors" : [ {
"code" : "OPTIMISTIC_LOCK_FAILED",
"description" : "Conflict",
"id" : "0",
"field" : null
} ]
Has anyone else seen this? Am I missing something? Is it something easy?