Pagination

Page through a zone's version history and the audit log with limit and before; most other lists come whole.

Most list methods answer the whole list in items. The two that grow without bound page with limit and before, newest first:

Method (TypeScript / Python)limitbefore
listZoneVersions / list_zone_versionsDefault 50, maximum 500.A version number: only older versions.
listAudit / list_auditDefault 100, maximum 500.An entry id: only older entries.

Pass the last item's version or id as before to get the next page. An empty items means you have reached the end.

let before: number | undefined;
for (;;) {
  const { items = [] } = await owf.listAudit({ limit: 500, before });
  if (items.length === 0) break;
  for (const e of items) console.log(e.at, e.actor, e.action);
  before = items[items.length - 1].id;
}

The same loop works for a zone's history with listZoneVersions({ zone, limit, before }) and the version of the last item.

listCachePurges / list_cache_purges takes a limit (default 20, maximum 100) but no before: it covers the last 7 days.

Last updated:

↑↓ to navigate↵ to openesc to close