Skip to content

Loading…

Enhance request API. #2

Closed
bleuse opened this Issue · 3 comments

4 participants

@bleuse

In the request API, the HTTP method PUT is used either to manage the CouchDB request code and to delete results of the CouchDB request.
I would have used PUT for code management and POST for results handling.
Here is what I suggest :

'Request code' handling :
PUT /request/:req_name/
DELETE /request/:req_name/

'Request results' handling :
POST /request/:req_name/
POST /request/:req_name/destroy
@frankrousseau frankrousseau was assigned
@frankrousseau
Cozy.io member

I agree with the first part. But second part is still ambiguous. Why do you choose the POST verb for both of these routes ?

@bleuse

In the current API, POST is used to retrieve the request result. My opinion is that deleting documents matching a request is quite the same operation as retrieving the documents. Thus I would use the same HTTP method.

Hope I'm understandable.

@jsilvestre

What should we do about this issue?

I suggest we close it but in the same time we open a new one discussing API improvements that could (should?) be done in order to make the DS API more RESTful.

@aenario aenario closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.