I am having a bit of difficulty designing a url for a rest service that can handle requests for customers based on pagination as one type of operation or requesting greater than or less than operators as another type of operation. For example:
Pagination:
GET /customers/0/100
This will get 100 customers for page 0.
Greater/Less Than:
I also need a URL design to get customers that have an id greater than n (e.g. lets say 716). How would you incorporate "greater than" or "less than" in a url. I have to bear in mind that characters ">" and "<" are illegal in urls. I think this url design looks odd:
GET /customers/greaterthan/716
GET /customers/lessthan/716
I can't use a range as that would conflict with the pagination pattern specified above and is not a nice solution in any case e.g.:
GET /customers/716/999999999999
GET /customers/0/716
I'm sure that I'm missing something obvious - does anyone have a better solution?