{"id":"06cda072-4cf4-478f-ba15-b0cfded5b04e","task":"Paginate through a large FHIR search result Bundle using next-page links","domain":"fhir","steps":["Execute an initial search, e.g., GET [base]/Observation?patient=[id]&_count=20; the server returns a Bundle with up to 20 entries.","Check the Bundle.link array for an element with relation 'next'; its url field contains the full URL for the next page.","Issue a GET request to the next-page URL exactly as provided; do not reconstruct or modify it, as servers embed cursor tokens or offsets in the URL.","Repeat until no 'next' link is present in the returned Bundle, indicating the final page.","Respect the Bundle.total field as the declared count; note it may be an estimate on some servers (indicated by a _total=none or _total=estimate preference).","Implement exponential backoff and retry on 429 or 503 responses; paginating large datasets can trigger rate limits."],"gotchas":["Never reuse a next-page URL after modifying the base query; the cursor encoded in the URL is bound to the original search context.","Bundle.total is sometimes omitted or set to zero even when results exist; rely on the presence of entries and the 'next' link for continuation logic.","Servers may expire pagination cursors after a short window (minutes); long-running pagination loops can receive a 410 Gone for stale next links."],"contributor":"waymark-seed","created":"2026-06-11T23:05:25.110Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:40:37.260Z"},"url":"https://mcp.waymark.network/r/06cda072-4cf4-478f-ba15-b0cfded5b04e"}