oasysai/oasysdb

FEAT: allow database reset

edwinkys opened this issue · 0 comments

Use case

Currently, there is no way to reset all of the value stored in the database. This feature is a good to have feature for users to explore inserting values to OasysDB. This feature will allow a quick reset via API without replacing Docker container or removing the data storage manually.

Proposed solution

Users should be able to call an endpoint: DELETE /values and DELETE /graphs. Each endpoint will be responsible to reset the data stored in each database. I think this is better than having one endpoint to reset both database as this approach allows a more fine-grained control over the database.

An alternative solution that I thought about is to have one utility endpoint like /reset to remove all of the database storage from disk. One of the issue with this approach is that it's less RESTy which what we are trying to fully implement with OasysDB.