[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [rest-practices] Links for actions



On Wed, 2010-05-12 at 06:56 -0400, Itamar Heim wrote:
> > From: Mark McLoughlin [mailto:markmc redhat com]

> >          <vm id="500" href="/vms/500">
> >            <name>vm500</name>
> >            <status>DOWN</status>
> >          </vm>
> >        </vms>
> [IH] how would the client pass the request or a partial entity (parameter 
> wise)?

you mean something this?

  https://fedorahosted.org/rhevm-api/wiki/StorageDomainsCollection

  POST /storagedomains/{id}/initialize HTTP/1.1
  Content-type: application/xml
  Content-length: {length}

  <action>
    <host id="..."/>
  </action>

i.e. the client doesn't have to pass an complete representation of the
host

> > > isn't this mixing introspection with data?
> >
> > Yes, that's a key part of REST's "hypermedia as the engine of
> > application state" principle
> [IH] that's quite an overhead of data when it is not needed.

You gave a good example of why its needed - it lets the client know up
front which operations are applicable for a given resource, without the
client having to make extra requests to query it

Cheers,
Mark.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]