Re: Link relation for adding a resource
Dan Haywood <[email protected]>
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <CALJOYLHxFuxoT3FY8SFWk4tu82uj0+mPyzxcKs_vTDDjHB5FXA@mail.gmail.com> |
Looks very similar to the link representation I defined in my Restful
Objects spec [1], where (sect 2.7) I define:
{
"rel": ".../xxx",
"href": "http://~/objects/ORD/123",
"type": "application/json;profile=\".../object\"",
"method": "GET",
"title": "xxx",
"arguments": { ... },
"value": { ... }
}
For the "rel", I ended up defining a namespace for my own values (sect
2.7.1.2), at least where there wasn't an IANI-defined one that suited.
Dan
[1] http://restfulobjects.org
On 31 August 2012 17:07, Paul Cohen <[email protected]> wrote:
> **
>
>
> Hi,
>
> I would like to define, in JSON, a link that provides a way to add a
> new resource to a collection of resources. I'm considering this:
>
> "link": {
> "href": "/photos/",
> "type": "image/tiff",
> "method": "POST",
> "rel": "new",
> "title": "Add new photo"}
>
> I'd appreciate any comments on the link representation above. In
> particular I'm interested in suggestions for the relation type - I use
> "new" above. I've seen "new" being used in similar cases but it's not
> an officially registered relation type here:
>
> * http://www.iana.org/assignments/link-relations/link-relations.xml
>
> * http://www.w3.org/TR/html401/types.html#h-6.12
>
> * http://microformats.org/wiki/existing-rel-values
>
> And there's no registered relation type with new/add/append-like
> semantics. Well maybe "create-form" on the mircroformats page, but
> that doesn't really seem appropriate.
>
> /Paul
>
> --
> Paul Cohen
> www.seibostudios.se
> mobile: +46 730 787 035
> e-mail: [email protected]
>
>