October 2018
Intermediate to advanced
590 pages
15h 5m
English
When you request for a collection of resources, usually, you don't retrieve all of the resources in a single response because there could be thousands of resources in that collection. Using pagination to return only a subset of the collection is usually more efficient, and it also saves network bandwidth and the processing power on the server-side, since it takes less time to run the database query when pagination is used.
There are two ways to do pagination. The first way is offset-based. The API clients send two parameters in the collection's URI: offset (or page) and limit (or count), like in the following example, which is used to get the first 20 orders:
https://api.examplebucks.org/v1/orders?page=1&count=20
The drawback of ...
Read now
Unlock full access