[Pulp-dev] [pulp 3] proposed change to publishing REST api

Jeremy Audet jaudet at redhat.com
Mon Oct 23 15:21:14 UTC 2017

> Normally in REST when a user creates a resource via POST to a collection
>> endpoint, they are expected to provide a representation of the new
>> resource, even if it is only partial.
> No, not true.

Sorry, Michael. What you said *is* true. I'm just aiming to add some
additional depth to that statement, and my contrariness isn't warranted.

If one wishes to perform a partial update of an existing resource, then
> it's appropriate to make an HTTP POST request whose body is a partial
> representation. But there's more than one way to use POST. If one wishes to
> create a new resource without specifying the path to that resource, then
> it's appropriate to make an HTTP POST request, whose body is completely
> opaque.
> HTTP POSTs are an escape hatch. You can do all sorts of crazy things with
> them, and nobody can cache the request or response.
> Slight tangent, but have I pointed out that one can create a resource with
> an HTTP PUT? It's entirely correct to do so. The only interesting
> restrictions are that:
> * The body of that request must contain a complete representation of the
> resource being created.
> * The full path to the resource being created must be specified.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20171023/f565fe5c/attachment.htm>

More information about the Pulp-dev mailing list