RESTful sublist (e.g. open invoices)


i’ve got a restful ressource named ‘invoice’. the index-method shows a
paginated list of all invoices.

now i want to get a new view for all open invoices. i don’t know how to
achieve this in most-restful manner.

i considered these options:

  • a new collection method for the ressource: ‘show_open’
  • a get-parameter for the index view: ‘?only_open=true’

but i’m pretty sure, you guys can come up with a more elegant solution.

i may want to get some more views in the future: ‘paid’, ‘last_month’