Re: Link relation types for non-GET links

mike amundsen <mamund@yahoo.com> Thu, 06 August 2015 13:27 UTC

Return-Path: <mamund@yahoo.com>
X-Original-To: link-relations@ietfa.amsl.com
Delivered-To: link-relations@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 897461B2F59 for <link-relations@ietfa.amsl.com>; Thu, 6 Aug 2015 06:27:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.087
X-Spam-Level:
X-Spam-Status: No, score=-0.087 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, J_CHICKENPOX_38=0.6, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S6GhnhgfUGYS for <link-relations@ietfa.amsl.com>; Thu, 6 Aug 2015 06:27:41 -0700 (PDT)
Received: from nm10-vm0.bullet.mail.ne1.yahoo.com (nm10-vm0.bullet.mail.ne1.yahoo.com [98.138.91.72]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 94B5F1B2F58 for <link-relations@ietf.org>; Thu, 6 Aug 2015 06:27:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1438867660; bh=Cw50HziW0OkAxSMizdW/q2NRzqLBb7iEAkohzc3udPE=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From:Subject; b=VDhAoHPdjDlKlkKU0TOpzbZwj07iPs9zsnJopGtZIsJsKOEF9q8vZpyuN1C3kWiqLpOKGkVK4D8sXurJZhbRwyb1Zyz0cDN/wGWwVfjgnL8EnKQISjiTNS0mCvV/hzA+1gUOnIQ15Ji5gca9fvViXtVoyl9Ix+G6rT75RGMF9B8aySK+5VqY5oFzCHEgA3sMyarm9svHzI2DNOm44CXJRfjckjeGgqLuJsYje98dg0V7R4dWYR9YClLGk2sKPkmB6840ygy3i8qfOouR2za+GHvIjexvHM9NwMBE9zlwatnA6V2NHtLMOiRmi8xDemrOB0wd+Cx0gWtCGgzYWuZ+yQ==
Received: from [98.138.226.176] by nm10.bullet.mail.ne1.yahoo.com with NNFMP; 06 Aug 2015 13:27:40 -0000
Received: from [98.138.226.56] by tm11.bullet.mail.ne1.yahoo.com with NNFMP; 06 Aug 2015 13:27:40 -0000
Received: from [127.0.0.1] by smtp207.mail.ne1.yahoo.com with NNFMP; 06 Aug 2015 13:27:40 -0000
X-Yahoo-Newman-Id: 169546.70282.bm@smtp207.mail.ne1.yahoo.com
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: pB.ACb4VM1nE7kWHAQo4NgYTZk57Yy6k4vLlqnj5mXWuUHl N9rVq.7uOWnPLAnp8uJ5gGM7AjdKB1s6Fzre3JBgvJdgARz7Cua030mdOCBR 8cDrVEa6FL1i50R.aKQx3SnloRwlvVcZHyFqlQa6rtgd8HcFv7OfRIE8oCwF FNbixejs4bMAZomrYrSNRejVljax3b.9NQmiA9c8e8q0IIQJrb2GODPxOT.L D2oWXe3A0YfwVDaGEvo0yvQPc6KjxzyyEpsDDFupZdbDpQz6lEh3jah_RmyV Oue69XibJarDD1kJ_..4alnFJ2D9ip7pp074a_mwOkIIigbUAEvK1u6.Bwc7 pYkPlPbb7zovsf7K6_D8GBKQtqn5b1j8RK6E5f8C9Lnbb2q6g34l6LACxZS0 P6.MWS0_kvHbZaUbu8JcAmMiK95gTGfRpQQ1DqHtoMoABD8EcCP.YT0gxLHE txs6G9aPvlKq3iKmIhPs_LvHh2LLlWK9U4cWnHSztygnLCYHFJegrHQvsj2L I7PQY2VGRb7Hy9jIdxqJ_v_cHyuncUA--
X-Yahoo-SMTP: i12ABOmswBAkPG1PnjmsmmFRWA--
Received: by igbpg9 with SMTP id pg9so11195827igb.0 for <link-relations@ietf.org>; Thu, 06 Aug 2015 06:27:39 -0700 (PDT)
X-Gm-Message-State: ALoCoQm4xTCxCvdbs4ohWuGfn45x2Cxm6VrsewyUTX5O9SBsL18mwGWRMD8uwhLlLh3mcSh4Q8Qh
X-Received: by 10.50.43.167 with SMTP id x7mr3634600igl.95.1438867659632; Thu, 06 Aug 2015 06:27:39 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.79.21.195 with HTTP; Thu, 6 Aug 2015 06:27:20 -0700 (PDT)
In-Reply-To: <CAAzbHvb==Sn_4UUFHKs3H9GYbEfiX=TUjv4FSmNi9R4NEB+DvQ@mail.gmail.com>
References: <CAAzbHvb==Sn_4UUFHKs3H9GYbEfiX=TUjv4FSmNi9R4NEB+DvQ@mail.gmail.com>
From: mike amundsen <mamund@yahoo.com>
Date: Thu, 06 Aug 2015 09:27:20 -0400
Message-ID: <CAPW_8m5CU++j=8tNBK1Q7KszxsfORnK1-6mxcgUwz9X2R2JTyA@mail.gmail.com>
Subject: Re: Link relation types for non-GET links
To: Klaus Hartke <hartke@tzi.org>
Content-Type: multipart/alternative; boundary="089e011602b2bb66f2051ca47bda"
Archived-At: <http://mailarchive.ietf.org/arch/msg/link-relations/J_nR_05FfYUth6278wSmTGT93l0>
Cc: link-relations <link-relations@ietf.org>
X-BeenThere: link-relations@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <link-relations.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/link-relations>, <mailto:link-relations-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/link-relations/>
List-Post: <mailto:link-relations@ietf.org>
List-Help: <mailto:link-relations-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/link-relations>, <mailto:link-relations-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Aug 2015 13:27:42 -0000

the IANA reg'd values "edit" and "edit-media" support unsafe (non-GET)
actions and are documented in RFC5023[1].


[1] http://tools.ietf.org/html/rfc5023#section-11


mamund
+1.859.757.1449
skype: mca.amundsen
http://amundsen.com/blog/
http://twitter.com/mamund
https://github.com/mamund
http://linkedin.com/in/mamund

On Thu, Aug 6, 2015 at 8:33 AM, Klaus Hartke <hartke@tzi.org> wrote:

> Hi link relation type experts,
>
> I'm using links in my application to discover resources, and link
> relation types to indicate the semantics of a link. Now I'm stumbling
> on links that change the resource state when followed (i.e., links
> that cause requests with methods other than GET).
>
> RFC5988 says that link relation types "can specify the behaviours and
> properties of the target resource (e.g., allowable HTTP methods,
> [...])."
>
> However, none of the registered link relation types seems to do this.
> My question is: Have link relation types for non-GET links simply not
> been registered yet, or should a non-GET link perhaps be a different
> hypermedia control?
>
> For example, let's say I have a collection resource and want to
> provide a way for clients to add new collection items. So I would add
> a POST link that, when followed, creates the new item and updates the
> collection. What should the link relation type be in
> "http://example.org/collection has a ??? resource at
> http://example.org/collection"?
>
>   {
>     "_links": {
>       "terms-of-service": {
>         "href": "http://example.org/tos",
>         "type": "text/html"
>       },
>       "???": {
>         "href": "http://example.org/collection/"
>       }
>     }
>   }
>
>   (using HAL-like syntax [1])
>
> Or should I add the equivalent of an HTML form to my media type, and
> have a "form relation type" (for the lack of a better term) to
> identify the semantics? This would allow me to make statements of the
> form "To {relation type} the {context IRI}, make a {method} request to
> {target IRI}", e.g., "To create-a-new-item-in the
> http://example.org/collection, make a POST request to
> http://example.org/collection".
>
>   {
>     "_links": {
>       "terms-of-service": {
>         "href": "http://example.org/tos",
>         "type": "text/html"
>       },
>     },
>     "_forms": {
>       "create-a-new-item-in": {
>         "href": "http://example.org/collection/",
>         "method": "POST",
>         "accept": "application/x-www-form-urlencoded",
>         "fields": [ "firstName", "lastName", "eMail" ]
>       }
>     }
>   }
>
> Would it make sense to have a registry for common form relation types?
>
> Best regards,
> Klaus
>
> [1] https://tools.ietf.org/html/draft-kelly-json-hal-07
>
> _______________________________________________
> link-relations mailing list
> link-relations@ietf.org
> https://www.ietf.org/mailman/listinfo/link-relations
>