Now that we have an understanding of how we can return data in a controller, we should learn how we can ask for a particular resource so we can filter the information and return it as a response. In RESTful APIs, when an application invokes our services for a particular resource, it will query through the URL path, the desired information to be returned.
For example, if an application invokes our API with the URL /customer/1, it is indicating that the resource that has been queried is a particular customer 1 in this example.
But RESTful APIs also allow us to extend a request further providing additional information through parameters.
An application could invoke our API using the URL /customers, indicating the need to receive the customer list. But that URL could provide an additional parameter to specify a filter, for example, to search customers by...