Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REST GET verb with parameters

I'm sitting reading on some REST with my fellow teammates, we are writing a RoR application that is going to expose some of its functionality to the rest of the world.

My task on this team is to make a ressource that exposes journal reports. If you call

http://root.com/journalreports

You should get all the journalreports from the service. Thats working like a charm, but I'm confused on how to properly make a ressource that exposes a range of journalreports. Should I make it

http://root.com/journalreports?range=1/2/2010;5/2/2010

Or is this illegal when we talk about REST because of the ?range= interference?

What is the most proper way of giving a REST ressource some parameters?

like image 786
mslot Avatar asked Oct 28 '10 15:10

mslot


1 Answers

Parameters are perfectly OK, especially for search-resources like in your case (querying a set of journals).

I recently answered similar question (path vs. parameter)

like image 149
manuel aldana Avatar answered Sep 28 '22 18:09

manuel aldana