25 Soft deletion
This chapter covers
- Soft-deletion and when it is useful
- How to indicate that a resource is marked as deleted but not actually removed
- Required modifications for standard methods for resources that support soft deletion
- How to undelete soft-deleted resources
- How to permanently remove (expunge) soft-deleted resources
- Managing referential integrity
As we learned in chapter 7, the standard delete method has one goal: remove a resource from the API. However, in many scenarios this permanent removal of data (a so-called hard deletion) from the API is a bit too extreme. For the cases where we want the equivalent of our computer’s “recycle bin,” where a resource is marked as “deleted” but still recoverable in the case of a mistake, ...
Get API Design Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.