/api/v1/records/registers/. The set of registers is fixed and defined per connected system type, and each register has its own filters, sort keys and page sizes. This page covers the mechanics every register shares.
How a register is read
- Send the first request with the filters, the sort, the selection (Authority and scope) and the identity headers.
- Nexio resolves the person’s scope, applies it, then applies your filters inside it.
- The response carries
data(the page),page(the continuation), the numbers the register computes, and theservingandscopeblocks. - Follow
page.next_cursorto the next page, or sendoffsetto jump to a row number on a register that accepts it.
limit, cursor and connection_id. Each register sets its own default and maximum page size, and either clamps a limit above its maximum or refuses it with 400 invalid_request.
Two ways to page
- Cursor. Follow
page.next_cursoruntil it isnull. This is the right way to read a whole register. On most registers the cursor is a keyset cursor: each page continues after the last row the previous page returned. A register may instead use an offset cursor, which stores the next row number. Each page is a new current read (When the data changes during a walk). - Offset (page jump). On a register that accepts it, send
offsetto jump to a row number, for a numbered-page screen. The largest offset is 1,000,000. When you sendoffset, the response echoes the applied window inpage.offsetandpage.page_size.next_cursoris still returned and still says whether more rows exist.
offset and cursor answers 400 invalid_request: a cursor already fixes the position.
What a cursor fixes, and what you resend
A cursor is opaque. It carries the continuation position and the filters it fixes. It does not hold later pages to the time of the first page, and it never carries permissions: authority is resolved again on every page. Which filters a cursor fixes differs by register. On most registers the first page’s filters and sort are fixed by the cursor, and sending one of them again with the cursor answers 400cursor_filter_mismatch. Some registers instead record the filters in the cursor and compare them, so you resend the same values; a different value answers 400 cursor_filter_mismatch.
The rule to remember: the identity headers, connection_id, mine and book are never inside a cursor. Resend them on every page.
Page, totals and facets
page.limitis the number of rows on this page, not the limit you asked for, on most registers; one register echoes the effective limit instead.page.next_cursorisnullon the last page. An emptydataarray with anullcursor is a complete, empty answer.totalcounts every row that matches the filters, before paging.facetscounts rows per filter value, for the filter controls. The total and the facets are counted over the same authorized base population, the rows the person may read. The total applies every filter. A facet does not always: each register defines its facet filters, and a facet usually leaves out its own dimension, so choosing one value still shows the counts for the others. Read facet counts as “what you would get if you picked this”, not as a breakdown of the total.sliceis arithmetic over the filtered set, andtotals, where a register sends it, is the person’s whole population under the owner and office filters.- Numbers are exact decimal text, for example
"48250.00". Parse them with a decimal library. A sum with nothing to add readsnull, not0.
What complete means for a register
The full outcome model is on Completeness and errors.
Walk a whole register safely
- Send the first request with every filter, the sort, the selection and the identity headers.
- For each next page, send
cursorplus only what the register’s resend rule says. Never rebuild the filters from the previous page’s rows. - Stop when
page.next_cursorisnull. - On 409
cursor_expired, start again from the first page. The cursor no longer matches how the register is served. A current-read cursor has no age limit of its own. - On 503
book_unavailablewith reasonbusy, wait forRetry-Afterseconds and resend the same page. On otherbook_unavailablereasons, see Completeness and errors.
rawams_vocabulary/prcode, the code dictionary of the connected system, which takes no key filter.
null cursor:
200 OK
When the data changes during a walk
No register holds a walk to one instant. Each page reads its sources again at the time of that page’s request, then continues in the same sort order: after the last row the previous page returned, or, on a register with an offset cursor, at the next row number. So a source change during a walk can show up in the pages that follow:- A row created, or changed so that it now sorts after the cursor position, can appear on a later page.
- A row changed so that it sorts before the cursor position can be missed; one that moves from before to after it can appear twice.
- A row that stops matching the filters, or leaves the person’s scope, is absent from later pages.
- On a register that pages by row number, a row added or removed before the cursor position shifts every row after it. An unchanged row can then appear twice or be skipped.
total,facetsand the other numbers are computed again on each page, so they can differ from page to page.
Cursor and paging errors
Next
Completeness and errors
Tell an empty list from an unavailable one.
Families and the generic read
Read any registered family by name.