MicrolearnENPTES

Pagination

Lesson 10 of 20 · API.Micro

Big collections arrive in pages: limit, page and the next link.

{"id": 2, "name": "Latte", "price": 4, "category": "coffee"},

{"id": 3, "name": "Cappuccino", "price": 3.8, "category": "coffee"}

Sending thousands of items at once is slow. Ask for 3 at a time: the answer includes total, page and a next link.

Check yourself

With total 8 and limit 3, how many pages?

Do it in the browser: a real REST APIs tool, a short mission and instant feedback. No install.

Start this lesson — free
← Query parametersCaching with ETags →

All lessons · API.Micro