Storage Function Soft Delete Understanding
The current delete api for storage endpoint results in soft delete as it makes status as inactive/deleted within the document and do a hard delete the same from ES. There is an API GET /records
which can list all records for given kind. Currently it returns even the deleted records. User has to query the record with id to know if its deleted or not. Does it make sense to include the status along with the id atleast while querying storage GET /records with kind or not to return those deleted records. Please suggest on the feature.
An observation with the Storage service delete process, which changes the status of the document at the document storage layer. For example the below document has status as 'deleted', which looks like a soft delete and not a complete hard delete.
Endpoint in Question: /records/opendes:999605662766:999294615642:delete
Document State is below after calling the above endpoint:
{
"_id": "opendes:999605662766:999294615642",
"_rev": "2-ed0a0c1dd4a060ba8fa34655ac0bc06a",
"kind": "opendes:osdu:999605662766:0.2.5",
"acl": {
"viewers": [
"data.default.viewers@opendes.ibm.com"
],
"owners": [
"data.default.owners@opendes.ibm.com"
]
},
"legal": {
"legaltags": [
"opendes-Wellbore-Legal-Tag-Test5891536"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"tags": {},
"gcsVersionPaths": [
"opendes:osdu:999605662766:0.2.5/opendes:999605662766:999294615642/1616399933047489"
],
**"status": "deleted",**
"user": "postman@osdu.opengroup.com",
"createTime": 1616399933740,
"modifyUser": "postman@osdu.opengroup.com",
"modifyTime": 1616400356349
}