DINA-Web / guidelines

Guidelines on how to create, test and deploy modules within the DINA-project
2 stars 1 forks source link

Review API-Guidelines: Soft-delete #46

Closed cgendreau closed 4 years ago

cgendreau commented 4 years ago

Justification:

To reduce referential integrity issues while maintaining the system simplicity and easy of use, resources should always be deleted in a "soft-delete" manner.

Resources should never be completely deleted. Instead, they should have a deletedDate property setting the date of deletion. Such resources should return a 410 Gone instead of a 404, with a body indicating how to access the deleted entity (e.g. sample/cf71a71e-2176-4d6f-9f17-a4c4f3dd104e?deleted=true).

Hard-delete should still be available for administrator to completely remove a resource if it was required (sensitive information).