I'm working on a REST api, and thinking about cutting down on development time by using the Loopback framework.
I like a lot of things about the framework (and it seems to fit my needs), but I completely dislike this:
http://localhost:3000/api/users?filter[where][username]=john&filter[where][email]=callback@strongloop.com
http://localhost:3000/api/users?filter={"where":{"username":"john","email":"callback@strongloop.com"}}
If you have a model that you expose as a REST api, that's how your urls look like. For me both options look strange and kind of ugly. And things seem even weirder when you get to examples like this /cars?filter[where][miles][gt]=5000
.
So, can I somehow change the form of the url for all exposed models? (to something more traditional). I would really like to have normal query strings like:
http://localhost:3000/api/users?username=john&email=callback@strongloop.com
Is there a reason they look like that and that I should appreciate over looks? Any REST apis with this syntax around?
Thanks