The DocumentDB API supports positive concurrency manage (OCC) thru HTTP entity tags, or ETags. Every DocumentDB API resource has an ETag, and the ETag is about at the server each time a file is updated. The ETag header and the modern-day value are protected in all response messages. ETags can be used with the If-Match header to permit the server to determine whether or not a resource ought to be updated. The If-Match price is the ETag cost to be checked in opposition to. If the ETag cost matches the server ETag price, the resource is up to date.
If the ETag is no longer cutting-edge, the server rejects the operation with an "HTTP 412 Precondition failure" response code. The consumer then re-fetches the useful resource to gather the contemporary ETag fee for the aid. In addition, ETags can be used with the If-None-Match header to decide whether or not a re-fetch of a useful resource is needed.