mikerhodes edited a comment on issue #2666: soft-deletion for database
URL: https://github.com/apache/couchdb/pull/2666#issuecomment-608281551
 
 
   - The main problem I can see for `GET /_deleted_dbs?key=DbName` is that we 
lose the mirror with including the database name like we have for `DELETE 
/_deleted_dbs/DbName?timestamp=2020-01-01T00:00:00`.
   - I also wondered whether the `timestamp` is required for the `DELETE`? If 
so, passing it as part of the path would be more natural (which I'm aware was 
one of the original suggestions I wasn't so keen on :grin:). 
   - If we look to `_all_dbs` as a model (I pondered this as we're looking at 
databases and the API is much simpler to copy), it isn't correct that these are 
equivalent perhaps:
   
        ```
        GET /_deleted_dbs/DbName
        GET /_deleted_dbs?key=DbName
        ```
   
       Because these return different values in the existing API:
   
        ```
        GET /DbName
        GET /_all_dbs?key=DbName
        ```
   
        So there's a question here as to whether `/_deleted_dbs` is more like a 
`_all_dbs` or `_all_docs`? Are we talking databases or some other type of 
entity, that `/_deleted_dbs` is more like talking about a set of metadata about 
deleted databases rather than teh databases themselves.
   
   
   A quick proposal with responses based on `_all_dbs` that is as REST as I 
could make it, with all the lessons from the discussion above tried to be taken 
onboard:
   
   https://gist.github.com/mikerhodes/39c66576eee468a5aeaa23c5715aec9a
   
   I think this could be trivially adapted to make the responses more 
`_all_docs`/view like if we wanted using the same paths.
   
   I guess we have `_dbs_info` as a guide too, though that doesn't tell us what 
`/_deleted_dbs/DbName` should be...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to