[rest-practices] Modelling membership

Bill Burke bburke at redhat.com
Tue May 4 21:24:14 UTC 2010



Bob McWhirter wrote:
>> So, by not having it toplevel, what we're thinking is equivalent to:
>>
>>  POST /users/1234/memberships
>>
>>  <membership>
>>    <group id="4321"/>
>>  </membership>
> 
> Generally speaking, I'd rather see hrefs instead of IDs:
> 
>   <group href="${url_to_group}"/>
> 

Not sure I agree that hrefs are better.  You end up having to extract 
the id from the URL somehow, someway, so that you can associate the 
things within a relational database

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com




More information about the rest-practices mailing list