Closed lewismc closed 1 year ago
This should most likely be implemented after tagbase has been secured e.g. #27
I would recommend creating a stored procedure in tagbase that would cycle through and delete records for a specified Tag_ID. This procedure then could either be invoked by the Tagbase DBA in postgres itself or via an API call that would be implemented leveraging that stored procedure. I think this approach generally provides greater flexibility and allows quicker implementation and testing.
Sample REST API design at https://github.com/tagbase/tagbase-server/pull/228
The OpenAPI spec should be extended to permit
DELETE /tags
- delete all tags, submissions and eventsDELETE /tags/{tag_id}
- delete an individual tag, all associated submissions and eventsDELETE /tags/{tag_id}/subs/{sub_id}
- delete an individual submission and associated eventsEventually once we implement events we can expand to the following...
DELETE /events
- delete all events for all tags and submissionsDELETE /events/{event_id}
- delete an individual event