chibenwa commented on PR #1004:
URL: https://github.com/apache/james-project/pull/1004#issuecomment-1129016609

   As a first feedback the API could be maybe improved...
   
   As a common practice we tend in the project to lean toward `DELETE` verb 
when deleting stuff, even when such deletion is done as a task. Maybe we could 
stick to this convention here too.
   
   The entity that we delete are messages, not mailboxes. I would say that the 
fact that we iterate on mailboxes to actually delete messages is an 
implementation detail that maybe should not leak to the API.
   
   Finally I am unhappy with the `task` name. I could hardly find a meaningfull 
task name. `cleanup` maybe. Or the concept of `retention` or `purge`. But maybe 
not even needing to name it would be better.
   
   I think `DELETE /messages?olderThan=30days` / `DELETE 
/messages?usingExpiresHeader` might be cleaner.
   
   `BlobRoutes` shows a related exemple of how to set up such a DELETE route 
without requiring `task` parameter.
   
   For a deeper look, I will need to put together a review of this.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to