Skip to content

Farkitect is in early access. New features arrive most weeks, and these pages are updated with them. See What's New for the latest.

Lists and paging

Every call that returns many items, such as projects, elements or views, returns them a page at a time, in this shape:

{
"object": "list",
"data": [ … ],
"hasMore": true,
"nextCursor": "eyJ2IjoxLCJsIjoi…"
}

To read a whole list, ask again with cursor set to nextCursor until hasMore is false:

import os, requests
def read_all(path):
items, cursor = [], None
while True:
response = requests.get(
f"https://api.farkitect.com{path}",
params={"limit": 200, **({"cursor": cursor} if cursor else {})},
headers={"Authorization": f"Bearer {os.environ['FARKITECT_API_KEY']}"},
)
response.raise_for_status()
page = response.json()
items += page["data"]
if not page["hasMore"]:
return items
cursor = page["nextCursor"]

Three rules:

  • Never assume a page is full. limit (1 to 200, default 50) is the most a page holds. A page can hold fewer, even none, while more follow: Farkitect stops a page early when reading it would take too long, such as types with many property types. Only hasMore says whether there’s more.
  • Pass nextCursor back exactly as it came, to the same list. A cursor that’s been changed, or taken to another list, gets 400 invalid_cursor.
  • Read pages one after another. A key may have only a few requests running at once (Rate limits), and pages depend on each other anyway.

Lists aren’t one snapshot: a change made while you page through can appear or not. For a consistent read, note the time before you start and compare updatedAt afterwards.

Many lists take filters, such as type, packageId or updatedSince. Filters combine, and each id must be from the project: an id from elsewhere, or of the wrong kind, gets 404 not_found naming the filter, so a typing slip isn’t mistaken for “nothing matches”. A cursor works only with the filters it came from.

Farkitect

Model anything.

“Welcome back — your diagrams have been plotting without you.”


Release 385 · 27 Nov 2026

Top packages: Inclusion and Sharing; Create New Version; Delete from Project

Release
385
Released
27 Nov 2026, 21:29 UTC
Built
27 Nov 2026, 21:30 UTC
Environment
Production
Surface
Docs
Commit
a5968f3
Branch
main