From the course: Building APIs with LoopBack

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

URL parameter syntax and examples

URL parameter syntax and examples - Node.js Tutorial

From the course: Building APIs with LoopBack

Start my 1-month free trial

URL parameter syntax and examples

- [Narrator] We've looked at the methods that Lookback creates and talked about the customizations you can add on top of it. But now I'm going to dig deeper into how you can fetch data with Lookback. You've see the GET request that returns all data for the model. While that's nice, there are probably times when you want to filter that returned data. You can build custom remote methods, but luckily Lookback provides tools out of the box to make that easier. In this lesson we're going to look at some of these options. Specifically, how to query, based on properties, how to order results, and how to include or exclude fields. First, let's talk about filtering. You can filter, using any property of your model. So using our cat model, which has a name, breed, gender, and so on, we could filter based on any of those properties. What's cool is that you can do more than just match where one property equals a value. You can also do numerical comparisons and say you want a value less than or…

Contents