Versioning Resources
The SCIM protocol facilitates resource versioning through the use of standard HTTP ETags. SCIM service providers have the option to prevent clients from unintentionally overwriting each other's modifications (also known as mid-air collisions).
Not all SCIM servers do support versioning resources, but When implemented, ETag HTTP headers are required. It is recommended to include the 'version' attribute in the resource's 'meta' attribute. The SCIM Playground returns both.
Inspect the version
The version information is included with every resource object, such as an object of type User.
When listing resources, the meta.version
attribute is present for every returned object. The returned ETag
HTTP Header includes the exact same value. Note that quotes and forward slashes are escaped in the JSON-object.
Replace object with If-Match
To mitigate the risk of mid-air collisions, it's recommended to use the If-Match
HTTP header, particularly with PUT
(replace) operations that modify multiple attributes simultaneously.
The If-Match
HTTP request header makes a request conditional.
The PATCH
operation, while generally posing a lower risk of collision, can be more complex to implement. This complexity arises in scenarios where applications display forms with numerous input fields, submitting all data at once upon saving. In such cases, implementing PATCH
effectively necessitates tracking changes across individual input fields.