Pagination and consistency
Import all the pages from one coherent release.
The institution list uses limit and offset; its maximum page size is 200. Other endpoints have their own limits. Keep filters, ordering, source period and release pins unchanged while paging.
A pinned institution-list import
- Request page one with
offset=0and your filters. - Read
data.release.id,data.period,data.total,data.limitanddata.results. - Supply the returned
release_idand explicitperiodon subsequent requests. Retain an explicitviewif you requested one. - If the response exposes
current_release.id, also send that ascurrent_release_idon every continuation request; this pins the published current-report layer. - Verify that every response has the same release identities and period. Advance offset by the number of returned rows.
- Stop when you reach
total. If a page is unexpectedly empty or a pin changes, fail the import and restart.
The example below shows the request shape, using placeholders that must come from your own first response:
GET /api/cuwiredata-institutions?state=MI&limit=100&offset=100&release_id=RETURNED_RELEASE_ID&period=RETURNED_PERIODFor a current-layer response, append ¤t_release_id=RETURNED_CURRENT_RELEASE_ID. Do not deploy a client that requires that extension before it appears in the published contract.
Store before you publish
Write to a staging table and record a completion marker. Make the completed import visible only after uniqueness, row-count and release checks pass. This avoids exposing a partial CRM or warehouse refresh.
Endpoint offsets are not durable change-feed cursors. There is no promise that offset=100 identifies the same records across different releases. For catalog tools that return dataset_version and next_offset, retain that dataset version and follow the tool's own schema rather than using a financial release pin in its place.