Pagination
FHIR pagination
Send your initial search request
The value in the _count parameter should be a max of 10
GET [base]/fhir/QuestionnaireResponse?based-on:ServiceRequest.identifier=<questionnaireId>&_count=10Read the response Bundle
The server returns a Bundle containing the first page of results.
Check
Bundle.link
Look for a link where:
"relation": "next"Use the
nextURL exactly as returned
GET [base]<next.url>Do not rebuild or edit the URL manually.
Repeat for each page
Each response may contain another next link.
Stop when there is no
nextlink
That means you have reached the last page.
Key rule
Use the server-provided pagination links, not your own page numbers.