Re: What can we agree on? (ISSUE-42)

On 25 Feb 2015 17:48, "Dietrich Schulten" <ds@escalon.de> wrote:
> In our case the attribute of a json-ld is the rel, the @id is the href.
The rel says that the current document is related to another one in a
well-defined way (e.g. next, prev, create-form [1], foaf:knows).
>
> As it stands right now, that works very elegantly with PUT, PATCH or
DELETE as long as a single item is updated or deleted.
>
> However, when it comes to creating new items with POST or PUT, it turns
out that we can't use the @id as elegantly.
>
> The GET aspect made us go in circles already :-)
>
> Maybe that sheds some more light to the discussion, or it makes more
clear where I come from.

You raise practical considerations. In my implementations  I prefer to
create resources using PUT with client assigned identifiers. These PUTs
often include within the payload other resources that must be created or
updated as a logical idempotent transaction.  The resource being PUT
represents an aggregation of resources, and the URL reflects that eg
/invoices/123?includes=items which is distinct from /invoices/123 that does
not include line items. This is the auxiliary resource capability I have
raised before and applies equally to GET/PUT/PATCH/DELETE for both
transactional changes and avoiding 1+N queries.  It may have some overlap
with collections/pages including related resources for efficiency vs just
being a descriptor.

Received on Wednesday, 25 February 2015 10:18:15 UTC