← Back to team overview

openstack team mailing list archive

Re: Guidelines for OpenStack APIs

 

I agree with Jorge, HTTP defines PUT and POST in a way that allows each to be used for both create and update. We should not be changing the semantics of HTTP's uniform interface by adding additional constraints that are not documented in the HTTP spec.


On 09/19/2011 11:33 PM, Jorge Williams wrote:


On 9/19/11 1:03 AM, "Mark McLoughlin"<markmc@xxxxxxxxxx>  wrote:

The spec is actually quite clear on the different between PUT and POST:

  "The fundamental difference between the POST and PUT requests is
   reflected in the different meaning of the Request-URI. The URI in a
   POST request identifies the resource that will handle the enclosed
   entity. That resource might be a data-accepting process, a gateway to
   some other protocol, or a separate entity that accepts annotations.
   In contrast, the URI in a PUT request identifies the entity enclosed
   with the request"

Right.  Another important difference between PUT and POST in that PUT is
idempotent -- see section 9.1.2.  In reality both PUT and POST can be used
for create and update. Some further thoughts on this in
http://etherpad.openstack.org/RFC-API-Guidelines

-jOrGe W.

This email may include confidential information. If you received it in error, please delete it.


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

This email may include confidential information. If you received it in error, please delete it.



References