Question about 409 Conflict Errors

A lingering question of mine from the Intro to the REST API session at the conference: So, a 409 should be generated if you attempt a PUT on an object that has been update since your last GET.  Where does that timestamp come from?  Is it managed internally, some kind of tracker with the session, or is it based on a timestamp supplied with the call?

Parents Reply
  • This is the API"s implementation of Optimistic Locking, and tries to prevent friendly fire (one request overriding another's updates). The UpdateDateTime on entities comes from the "last_updated_dt" column in the corresponding DB table. It must match on a PUT with the current UpdatedDateTime on the entity or you will see a 409 response.  In practice, if you are attempting to make an update, always GET as close as possible to the update to ensure your working copy is not stale.

Children
No Data