[Catalyst] REST-like url question

Bill Moseley moseley at hank.org
Wed May 18 16:22:54 GMT 2011


Quick question, and I hope this doesn't turn into a debate about REST
specifics, just looking for a sane URL scheme.

Say I have an app for managing technical conferences.   There's one "user"
table.  A "user", of course, can be both a presenter and an attendee of
sessions.  So, I want to get a list of sessions a user is associated with,
but also want to get separate lists for sessions they are a presenter for
vs. sessions they are just attending.

In the db there's  attendee_session and presenter_session link tables to
associate users with the sessions.

This seems a bit ambiguous, plus not sure what to do if a user happens to be
a presenter AND an attendee of the same session.

GET /user/1234/sessions


And these seem wrong because the query parameter is about the user not the
session.  That is, seems like any query parameters should be limiting on the
session (e.g. session_type).

GET /user/1234/sessions?user_type=3Dattendee
GET /user/1234/sessions?user_type=3Dpresenter


Other options would be:

GET /user/1234/sessions_attending
GET /user/1234/sessions_presenting



What would you use?


-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110518/dbf2a=
08a/attachment.htm


More information about the Catalyst mailing list