Skip to content

Commit ff3c2ac

Browse files
committed
base softdelete
1 parent 917a9b7 commit ff3c2ac

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

Diff for: softdelete.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Soft-Delete
2+
3+
DigitalState microservice implement a "soft-delete" functionality which ensures that only users with the appropriate permissions can permanently purge data from a microservice's database.
4+
5+
With a few exceptions, whenever a DELETE method is actioned, a soft-delete occurs.
6+
7+
By default, all GET methods return non-deleted content even when not using the deleted=false query param.
8+
9+
## API Query Params for Soft Delete
10+
11+
Query Param: `deleted`
12+
13+
Possible values:
14+
15+
- `null`: (literal word) Returns all entities, whether they have been deleted or not.
16+
- `false`: Returns entities that are not deleted.
17+
- `true`: Returns entities that have been deleted.
18+
19+
See the DigitalState Postman Collection in the SDK Repo for further examples of the `deleted` query param.
20+
21+
## How to Un-Delete soft-deleted content?
22+
23+
...
24+
25+
## How does Soft-Delete work?
26+
27+
Each entity that has soft-delete enabled, implements a database column (COLUMN NAME GOES HERE), which tracks the timestamp of when that database record was deleted.
28+
29+
## What Happens when you Create new content?
30+
31+
...
32+
33+
## What happens when you delete content?
34+
35+
... something like timestamp is applied
36+
37+
## What happens when you un-delete content?
38+
39+
... something like the column value is returned to null? Is there a log or somesort of history of un-deletion? If not, but its planned (not saying it is, just asking), then create a ticket and link to it.
40+
41+
## How to Permanently Delete data?
42+
43+
...
44+
If there not currently a API for this then explain how a API function is not currently implemented. Create a Ticket/issue for it, and Link to that ticket.
45+
46+
47+
## Various Conditions
48+
49+
1. What happens when you GET/PATCH/PUT on a soft-deleted item? Do i have to apply the query param to access it?
50+
1. Can i PATCH/PUT on a soft-deleted item? If not, what is required? aka: you must un-delete the item fist, aka soft-delete is a hardened snapshot in time.
51+
1. Is there a data about who deleted it?
52+
1. Is there data about who Un-deleted it?
53+
1. Are there specific error messages about soft-deleted content?

0 commit comments

Comments
 (0)