## Optimistic Concurrency

App Orchestration enables callers to use an optimistic concurrency strategy to protect against silently overwriting changes that another administrator made.

Each object returned contains a field named ChangeId. This is a value which changes whenever the object itself is changed. This value can be passed as a query parameter to any API endpoint that changes state. For example, you can call:

        PUT [apiRoot]/Tenants([id])?changeId=[changeId]

If the ChangeId is specified, and it does not match the object's current ChangeId, you will receive a response with status 409 Conflict and the change will not complete.

A typical strategy for handling optimistic concurrency in a client program is to read the new state of the object and they retry the logic to determine if any further changes are required.

If you omit the ChangeId query parameter from a call that modifies state, it will overwrite any current values without regard for previous state.