Tendrl / documentation

Project-wide documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API overview doc : Put vs Patch

nthomas-redhat opened this issue · comments

While going through the document, observed that 'PATCH' is not present in the supported HTTP verbs list. In some cases(like editing only certain parameters of a resources ) , I feel that PATCH can be used over PUT as you it is generally used for replacing a resource.

Is there any specific reason why PUT is proposed for update operations?

@anupnivargi , Can you please comment on this?

Also there is a mention about rate limiting? How you plan to implement this?

@nthomas-redhat since the http methods are generated from the YAML files, we would have to specify the difference of PUT and PATCH in it, today it says 'update', which is mapped to a PUT which supports full resource updating or a single attribute, but we can surely discuss this if its a issue.

Regarding rate limiting, I don't think we are going to have a hard limit as of now, since we need to come up with the numbers depending on the load and servers etc, so I have not added anything regarding it.

Thanks @anupnivargi . yes I think single attribute(or partial resource updates) updates should be handled by PATCH and PUT should be used only when you have a full resource update. Sure, we can discuss about this