Re: Link Relations

Alexander Johannesen <[email protected]> Wed, 6 Nov 2013 16:39:33 +1100
Newsgroups gmane.comp.web.services.rest
Message-ID <CAF89bCCoCK4KY9cQqYEhW=JLdsyDHVX5HwaoCV2NVjzbJw+5fw@mail.gmail.com>
Hiya,

/rels/playlist/insert-song
> /rels/playlist/remove-song
>
...
 /rels/playlist/create

> /rels/playlist/edit
> /rels/playlist/delete
> /rels/playlist/insert-song
> /rels/playlist/remove-song
>
...

> create
> edit
> delete
> insert-song
> remove-song
>

Hmm, you're aware that all these URIs are evil, right? :)

Here's what I would do ;

/playlist
/playlist/{$list_name}
/playlist/{$list_name}/{$song_id}

The rest is GET, PUT, POST and DELETE on those three (well, one static and
two dynamic) URIs. Remember to think in terms of resources (so, the songs
and the lists themselves) for URIs, and use REST for interaction on those
resources.


Kind regards,

Alex