lumnik. / scenarios All scenarios · Français

OData v4 paged by the server: lumnik follows @odata.nextLink

Goal Read the 120 customers of an OData v4 service paged by the server, as Business Central pages, in pages of 20 asked with Prefer, without losing one.

Business Central pages its OData answers on the server, and a client asks for smaller pages with Prefer: odata.maxpagesize. The next page is not a parameter the client computes: it is @odata.nextLink, a URL the server hands back.

server-requests.txt
GET /odata/Customers?$count=true prefer=odata.maxpagesize=20 -> 200
GET /odata/Customers?$count=true&$skip=20 prefer=odata.maxpagesize=20 -> 200
GET /odata/Customers?$count=true&$skip=40 prefer=odata.maxpagesize=20 -> 200
GET /odata/Customers?$count=true&$skip=60 prefer=odata.maxpagesize=20 -> 200
GET /odata/Customers?$count=true&$skip=80 prefer=odata.maxpagesize=20 -> 200
GET /odata/Customers?$count=true&$skip=100 prefer=odata.maxpagesize=20 -> 200

Limits

This scenario runs on lumnik Open, free and open source.

Try lumnik Open →