Data loss is the unintended removal or destruction of information that should have been retained. In APIs, broad resource replacement can overwrite another client's changes or erase fields introduced by a newer resource version. section 8.1.2
Prevent data loss by:
- Using partial updates when clients need to change only specific fields, reducing unrelated overwrites. section 8.1.2
- Applying consistency checks or locking when concurrent operations can conflict, while recognizing that retries may still be required. section 8.1.2
- Choosing soft deletion or a backup strategy according to regulatory requirements and whether permanent removal is acceptable. section 25.4
A stale client erases newer data
A current client adds a ChatRoom description. An older client, unaware of that field, changes only the title and replaces the whole resource. The resulting ChatRoom retains the new title but loses the description. section 8.1.2
Table 8.1 An example sequence of code run by two users that could present problems (view table figure)
Compare two clients reading, modifying, and replacing the same ChatRoom to see how the final replacement discards an unrelated update. section 8.1.2



