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.

Exports

An export writes a package and everything below it as a .farki file, as File › Export does in the app. It runs in the background, so it suits packages too large for /contents, or keeping a copy of a model. The file can be imported into Farkitect with File › Import.

Call Gives
POST /v1/packages/{packageId}/exports Starts the export, and answers at once with the job (202)
GET /v1/jobs/{jobId} The job’s status
GET /v1/jobs/{jobId}/file The file, once the job is done

Exporting a large model can take minutes. A single request can’t wait that long, so an export works in three steps instead: start it, let it run, then collect the file. That way:

  • Nothing times out. A request to the API is given at most a minute. The export itself runs in the background for as long as it needs, while each request your program makes (start, check, download) is quick.
  • A dropped connection loses nothing. If your program’s connection fails while the export runs, the export carries on; check on the job again when you’re back.
  • The file can be downloaded again. It’s kept for a day, so a download that fails part-way can simply be tried again, without exporting again.
  • Everyone stays quick. Exports are the heaviest work the API does. Running them in the background, one at a time per organisation, keeps one program’s export from slowing Farkitect for others.

For a package small enough to read in one call, /contents is simpler: it answers straight away, as JSON in the API’s own shapes. An export gives a .farki file, for keeping, moving to another project, or importing again.

  1. Start it. POST /v1/packages/{packageId}/exports answers 202 with the job, and a Location header pointing at it. Give a model’s own id to export the whole model.
  2. Wait. Ask GET /v1/jobs/{jobId} every few seconds. Its status goes queued, running, then done, or failed with the reason in error.
  3. Download. When it’s done, file gives the file’s name and size, and GET /v1/jobs/{jobId}/file returns the file itself, with its name in Content-Disposition. Asked for sooner, it answers 409 job_not_ready.
import os, time, requests
API = "https://api.farkitect.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['FARKITECT_API_KEY']}"}
def export(package_id, path):
job = requests.post(f"{API}/packages/{package_id}/exports", headers=HEADERS)
job.raise_for_status()
job = job.json()
while job["status"] in ("queued", "running"):
time.sleep(3)
job = requests.get(f"{API}/jobs/{job['id']}", headers=HEADERS).json()
if job["status"] != "done":
raise RuntimeError(job["error"])
file = requests.get(f"{API}/jobs/{job['id']}/file", headers=HEADERS)
file.raise_for_status()
with open(path, "wb") as out:
out.write(file.content)
  • One at a time. An organisation may have one export running at once. Starting another while one runs gets 429 rate_limited, naming the job that’s running: wait for it to finish.
  • Kept a day. A job and its file are deleted a day after it finishes (expiresAt). Download the file before then.
  • Who can see a job. Any key of the same organisation that reaches the project; others get 404.
  • Not yet: attachments inside the export (the app’s Export Package with Attachments…), and whole-project exports.

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