Graph data
12. Exports and other storage routes
12.1 Archive exports#
Both routes take a session token and require the caller to re-authenticate in the request body: send {"password": "<account password>"}. For an account that signs in only through single sign-on, the body may be empty but the sign-in must have happened within the last five minutes. Failed re-authentication returns 401 unauthorized.
Both respond with 200, Content-Type: application/zip and a Content-Disposition: attachment header. The archive is built on the server's disk and streamed.
| Route | Who | Contents |
|---|---|---|
POST/v1/accounts/me/export |
Any account, for itself. Limited to one export per 24 hours. | The account record (account.json), the account's personal readable graphs as SQLite database files (graphs/<id>.sqlite), the documents uploaded to them, its audit trail (audit.ndjson), and under sealed/ what it stores encrypted, exactly as stored: the device synchronisation log, the encrypted blobs and the sealed graphs. The password-wrapped encryption key held for the account is deliberately left out. Organisation graphs are not included. |
POST/v1/orgs/{orgId}/export |
The organisation's owner only (403 forbidden otherwise). |
Every organisation graph as a JSON snapshot (graphs/<id>.json, the same format as section 3.5), the documents attached to the exported nodes (documents/<graph>/<id>-<name>), members.json, and the organisation's audit trail (audit.ndjson). |
Every archive contains a manifest.json:
{
"format": "graphlife.export",
"version": 1,
"generated_at": "2026-11-21T10:00:00.000Z",
"subject": "org:…",
"graphs": [ { "id": "…", "label": "…", "revision": 57, "nodes": 1280, "edges": 3410, "file": "graphs/….json" } ],
"notes": [ "…" ]
}
The organisation export leaves out two things, and says so in notes: content synchronised from a member's personal connection (such as their own mailbox), and nodes that belong to no group.
There is no route that imports an export archive. An organisation graph cannot be restored from its graphs/<id>.json through the API either: publishing a snapshot (section 3.2) creates a personal graph, and is refused for an organisation graph. The archive is produced on request only; the server has no scheduled export or backup.
curl -s -X POST https://graphlife.example.com/v1/orgs/$ORG_ID/export \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"password": "…"}' -o org-export.zip
12.2 Encrypted device synchronisation and blobs#
These session-token routes serve the mobile app's end-to-end encrypted storage. The server stores opaque ciphertext and cannot read, search or transform it. They are listed for completeness; they are not a way to read graph data from an integration.
| Method | Path | Request | Response 200 |
|---|---|---|---|
| POST | /v1/sync/push |
{"ops": [{"op_id", "hlc", "row_version", "origin_device", "ciphertext"}]} |
{"server_cursor": 1042, "accepted": 3} |
| GET | /v1/sync/pull?since=<cursor>&limit=<n> |
limit default 500, 1–1000 |
{"ops": [{"seq", "op_id", "hlc", "row_version", "origin_device", "ciphertext"}], "next_cursor": 1042, "has_more": false} |
| PUT | /v1/blobs/{blobId} |
{"ciphertext": "…"}; blobId 1–128 characters |
{"blob_id", "size", "sha256"} |
| GET | /v1/blobs/{blobId} |
— | {"blob_id", "ciphertext", "size", "sha256"} |
| DELETE | /v1/blobs/{blobId} |
— | {"deleted": "<blobId>"} |
| GET | /v1/blobs |
— | {"blobs": [{"blob_id", "size", "sha256", "created_at"}]} (not paginated) |
Errors: 400 bad_blob_id, 400 missing_ciphertext, 401 unauthorized, 404 not_found, 413 storage_full.