Skip to content

API reference

This page is the lookup summary. For walkthroughs with examples, see Send data via the API and Push data to Ronja.

Where What it is
/docs/api on your Ronja domain The interactive endpoint-by-endpoint reference
/llms.txt (also /docs/api/llms.txt and /.well-known/llms.txt) A lean index for AI agents
/docs/api/endpoints.md Every endpoint, with the scope each needs
/docs/api/openapi.json The full OpenAPI schema

An Admin creates tokens on the API Tokens page with Create token.

Create field Details
Token name A label, e.g. “CI pipeline”
Role Every token has a role (default User), which bounds everything it can do. An Admin can’t create a token at or above their own role
Access Limited to scopes (the recommended default; grant at least one scope) or Full access (everything its role allows; a warning is shown)
  • The secret is shown exactly once (“Copy this token now. You won’t be able to see it again.”). It can’t be shown again, only revoked.
  • Send it as Authorization: Bearer <token>; the Bearer prefix is optional.
  • A token belongs to your organization and can be deleted any time from the token list or its page. A token sealed inside a Ronja API credential is deleted by deleting that credential. A deleted token stops working within 30 seconds.
  • A token can later be limited to scopes, or widened back to full access (with a confirmation), on its page. A scope or expiry change reaches requests within 30 seconds; an expiry date is exact once it passes.

A token records the Admin who created it and counts as that person for the self-approval policy: where self-approval is off, it can’t approve or commit work that Admin authored, whoever uses it. Its role and scopes are unaffected.

  • A token created long ago, or one whose creator has left the organization, may not be recognized as theirs, so the policy may not stop it.
  • While self-approval is off, a draft, proposal or move request filed by a token that is then deleted can’t be approved by anyone, and a deleted token can’t approve within 30 seconds of deletion.
  • A new token restores neither link. Publish or withdraw what a job has filed before you rotate its token, and file anything already stranded again from the account that should own it.

Scopes narrow a token within its role; they never widen it. Each scope is granted at None, Read or Write, and a scoped token is refused anything outside its grants.

Scope Covers
Data Tables, files, tags, connectors and search. Search results for managed databases also need Structure: Read; without it they are left out, not refused
Structure Features, access groups, Spaces, people properties (read), and managed databases: reading, provisioning and migrating one. SQL against one needs Data; a connection login needs Secrets
Analytics Apps, notes, knowledge and policies
Automation Workflows, schedules and scripts
Agents Saved Agents (create, edit, run), chat and connected MCP servers
Secrets Secrets and OAuth connections
Admin Members, billing, governance, settings and stations

A scoped token reaches a route only when the route carries a scope it grants. Four endpoints listed at /docs/api carry none (a metric’s query, report and issues, and setting a table’s verification status), so every scoped token is refused on them with insufficient_scope; call those with a full-access token.

Connecting an AI assistant to Ronja over MCP needs Data; see what each tool needs.

A personal access token (PAT) acts as you, with your live permissions rather than a role fixed at creation: if your role changes, its access changes with it, and if you lose access, it stops working. It is the simplest way to call the API as yourself, for example to build resources you own.

Only an Admin creates a PAT on the Account page: open Account, go to the Access tokens tab, and click Create token. The token acts as the Admin who created it. From a terminal, ronja token create opens the same form filled in; you still review it and click Create token.

Create field Details
Name A label, e.g. “My laptop”
Access Limited to scopes (the recommended default; grant at least one scope) or Full access (a warning is shown), which carries your full live role
Expires Optional; the token stops working after this date
  • A PAT has no Role picker. Limited or full, it never exceeds what you can do, and does slightly less, since a few actions need a person signed in. It follows your live role: it is limited if you’re demoted, and deleted if you’re removed from the organization.
  • An Admin can limit it to scopes, or widen it back to full access (with a confirmation), on its page; the change reaches requests within 30 seconds.
  • The secret is shown exactly once and can be revoked any time from the Access tokens tab. A revoked token stops working within 30 seconds.
  • Send it as Authorization: Bearer <token>; the Bearer prefix is optional.
  • Everything a PAT does is audited as you, marked “via PAT <name>”. When Ronja herself calls the API for you in a chat, the entry is audited as you with two chips, agent and via Ronja; see Activity log.

Any member, User Read-Only included, also gets a PAT by signing in. With the Ronja CLI (ronja login) it has full access and expires after 90 days. From an AI assistant it is read-only, with Read on every scope except Admin; it lasts 90 days and the assistant renews it while it keeps using Ronja, for up to a year after signing in; it ends after six months unused, or when the person leaves the organization. Revoking it ends the sign-in at once. An Admin changing its Expires date, or clicking Clear (never expires), on its page in API Tokens ends the renewals: the assistant signs in again the next time it needs to renew, and that token stays until the date set or, with no expiry, until it is revoked. It acts as them and is listed on their Access tokens tab. An Admin sees and can revoke any personal access token on the API Tokens page, where each is marked Personal token with its owner.

A request made with a personal access token, including the CLI’s sign-in and an AI assistant’s, covers your whole organization: lists and search show every Space, and a feature, managed database or tag it creates lands in your organization’s default Space. To act in one Space instead, send that Space’s ID in the X-Ronja-Space header. GET /api/v2/space lists the Spaces you can enter, with their IDs.

  • Lists and search show that Space only, and a feature, managed database or tag the request creates lands in it.
  • What you can open or change doesn’t depend on the header: a row you can open by its ID opens with or without it.
  • GET /api/v2/authentication/me names that Space in space.
  • The response carries X-Ronja-Space naming the Space it acted in, so your client can confirm the header was honoured.
  • A Space you can’t enter, or one that doesn’t exist, is refused with 409 and "code": "space_unavailable", and nothing is done.

An API token from the API Tokens page (one not marked Personal token) can’t choose a Space. A request from one that sends X-Ronja-Space is refused with 400 and "code": "space_not_selectable"; send it without the header.

A Ronja API credential is a scoped API token sealed inside a secret and pointed at your own organization, so Ronja’s agents and workflows can call your Ronja API for what the built-in tools don’t cover. An Admin creates one by asking Ronja in a chat (“create a Ronja API credential”), which mints it after an approval step; see Let Ronja call your API.

Field Details
Endpoint POST /api/v2/secret/ronja-api. Admin only, and it refuses automated callers (see Actions the API can’t take), so ask Ronja in a chat instead
name A label for the secret
featureID Required: a Private Feature you own. A shared Feature is refused (403), Admins included, since its members could see the credential
scopeGrants Optional map of scope → read/write (token scopes). Omitted, it is Data, Structure and Analytics at Read, with Agents and Automation excluded
role Optional; the token’s role, capped to yours. The default Admin reaches role-gated reads such as listing every table, while the read-only scopes still bound writes. Pass User for a narrower credential
expiresInDays Optional. Omitted, it never expires; otherwise it stops working after that many days and must be re-created
  • The response is the secret’s metadata. The token is never returned: an agent or workflow references the secret, and Ronja adds the Authorization header.
  • Delete the secret to retire the credential. A credential can’t create another, and each organization can hold only a limited number at once; delete an unused one if you reach the limit.
  • Using one is Admin-only too. A non-Admin who can see the secret still can’t call the API with it in a chat. To let a non-Admin’s work use it, an Admin attaches it to an automation or a Saved Agent, which then runs for whoever triggers it. A run that doesn’t declare the credential among its references is refused.
  • A scoped credential is refused wherever any scoped token is; see Token scopes.

A short list of actions need a person signed in to Ronja. They refuse every automated caller (an API token, a personal access token, the CLI, a Workflow, an Automation, a Saved Agent, and Ronja itself) with:

{"code": "human_required", "error": "this action can only be taken by a person signed in to Ronja, not through the API (…). <where to do it instead>"}

This depends on the action, not your credentials: a wider scope, a higher role, another token or a retry won’t change it. The message names where to do it in Ronja. Most rows close the whole endpoint; three are decided by an argument, and the same endpoint answers normally otherwise.

Group The actions
Irreversible for the organization Deleting the organization; a cascade delete; every billing change: buying credits, saving a card, top-ups, auto-refill, and opening Manage billing, whose page can change billing
Who can get in: people Inviting and removing members; assigning and removing roles; registering or editing an auto-join email domain; making a maintainer; including a person in a Space
Who can get in: access Adding someone to an Access Group; attaching a Feature to one, or granting it access to a Feature’s tables; Give access and Remove access on several features at once (POST /api/v2/workspace/:id/features/bulk); granting access to a folder or file in Files
Who can get in: outside Adding a guest to an app, or opening an app to guests; listing an App User or a people-property value on an app; approving an access request from a bridged Slack or Microsoft Teams channel
Who can get in: Slack and Teams Adding Slack members to an Access Group or inviting people to Slack; connecting a Slack or Teams channel, one or several at once; the Slack setting that bridges every public channel
Who can set Ronja working Clearing an Automation’s webhook Signing secret; changing a Mailbox’s settings (Compose recipients, and the Watched label and Daily send limit, which share its Save)
Ronja’s own credentials Creating an API token; changing a token’s scopes; approving a CLI or AI-assistant sign-in; creating a Ronja API credential; creating a station or regenerating its link (each shows a long-lived link once)
Permanent deletion Every …/purge endpoint (emptying an item from the Trash); permanently deleting a Slack or Teams connection; disconnecting a Mailbox; Delete this version in a document’s History
Safety limits and settings Setting your daily AI safety limit (POST /api/v2/model-access/daily-limit); changing your monthly budget (POST /api/v2/model-access/monthly-budget); changing people properties
Documents Restore this version in a document’s History, which changes what every live share link to the document serves
Your notifications Reading and clearing the personal notification feed behind the bell: all three /api/v2/notification/inbox endpoints (list, mark one read, mark all read)
Deploying as you Approving a change list an AI assistant proposed, which deploys it as you

An Admin changes the daily limit and the monthly budget in Control Center › Rules, and people properties on People properties or a person’s page under Users & Access.

Argument Refused Still scriptable
allowAnySender on POST /api/v2/automations or PUT /api/v2/automations/{jobID} true, opening an Email trigger to any sender. It needs Admin and a person, and refuses even a personal access token bound to your own admin account false, and everything else about the automation
allUsers on PUT /api/v2/space/:id Sending the field at all, true or false: whether the Space includes everyone Renaming or re-describing the Space
webSearchEnabled on PUT /api/v2/organization/settings/governance or PUT /api/v2/tenant true, turning web search (Perplexity, a US service) back on. An Admin does it under Web search on Organization rules; see Turn web search on or off false
vertexEnabled on PUT /api/v2/organization/settings/governance or PUT /api/v2/tenant true, turning on the backup on Google Cloud (EU). An Admin does it under Backup on Google Cloud (EU) on Organization rules; see Turn the backup on Google Cloud (EU) on or off false

Cutting access off stays scriptable, so you can script a security response:

  • removing someone from an Access Group, or detaching a Feature from one (DELETE /api/v2/workspace/:id/features/:featureID, one feature at a time);
  • removing a folder’s access grant; removing a person from a Space; revoking a maintainer; declining an access request; removing an auto-join domain;
  • removing a guest, or closing an app to guests; removing an App User or a value from an app; disconnecting a bridged channel;
  • rotating a webhook signing secret; closing an email trigger, and muting its refused-sender alert;
  • revoking a token, and disconnecting a station;
  • rejecting a change list that is waiting, with a personal access token.

Removing someone from the organization, or taking away their role, is not scriptable: it ends their access entirely.

These stay ordinary automation too: creating Secrets, creating users on a Managed database, ordinary deletion (the item goes to the Trash for 30 days; see Restore from trash), turning web search or the backup on Google Cloud off, and reading and changing Notification routing.

Reading almost always stays open: you can list members, preview a cascade delete, read billing and usage, and list a document’s versions and get a link to one. These reads also answer:

  • GET /api/v2/people-property and its two read routes, for any member’s token that can read Structure;
  • GET /api/v2/model-access/daily-limit;
  • GET /api/v2/model-access/monthly-budget: whether a budget applies, the budget, this billing period’s percentage used and dates, and whether it is used up. While it is used up, a request that starts paid work answers 400 with the code monthly_budget_reached.

The personal notification feed is the one exception: closed to automated callers both ways.

A deleted document version can’t be recovered: it has no Trash.

Asking Ronja in a chat is not a way round it

Section titled “Asking Ronja in a chat is not a way round it”

When Ronja is about to take one of these actions in a chat, she stops and asks, and approving also needs a person signed in to Ronja. A chat you drive from the CLI, a coding agent or any API token gets the same human_required 403 on the approval, and a forwarded approval link can’t decide one either. Rejecting is always allowed, so a script can close the request and carry on.

The chat’s list overlaps the table above rather than matching it. It covers:

  • changing the organization policy;
  • creating a Ronja API credential;
  • adding someone to an Access Group, attaching a Feature to one, or setting its table access;
  • granting access to a folder or file in Files;
  • opening an Automation’s email trigger to any sender.

The organization policy is the clearest difference: PUT /api/v2/policy/org accepts an admin’s personal access token (not a token from the API Tokens page), while asking Ronja for the same change needs a person to approve it. Every other approval Ronja asks for (sending mail, deleting something, running a workflow) can be given by whoever is driving the chat.

Make a person or an access group a maintainer of one organization-scoped Feature. Every route needs the Admin role, except listing one Feature’s maintainers, which its maintainers can do too; a scoped token needs the Admin scope.

Method and path Notes
POST /api/v2/feature/{featureID}/maintainers Grant. Needs a person signed in to Ronja: every automated caller gets human_required. Send exactly one of userID (a member of your organization) or workspaceID (an access group). Granting the same one twice returns the existing grant
GET /api/v2/feature/{featureID}/maintainers List one Feature’s grants
DELETE /api/v2/feature/{featureID}/maintainers/{grantID} Revoke. It applies from the maintainer’s next change and undoes nothing they did
GET /api/v2/feature/maintainers List every grant in your organization, with featureID, featureName, featureScope, and featureInTrash for a Feature in the Trash. Filter with at most one of ?userID= or ?workspaceID=
  • The Feature must be organization-scoped and not in the Trash.
  • An access group containing every member of your organization also needs "acknowledgeAllUsers": true: {"workspaceID": "<access group ID>", "acknowledgeAllUsers": true}.
  • The grant response carries its id; keep it to revoke.
  • Each listed grant names its holder (principalName, plus principalEmail for a person; principalKind is user or workspace), who granted it and when, and active (false is Inactive).
  • ?userID= returns that person’s grants, including the ones they hold through an access group, which carry viaWorkspaceID and viaWorkspaceName.

From the CLI, ronja api /api/v2/feature/<feature ID>/maintainers lists them and ronja api -X DELETE /api/v2/feature/<feature ID>/maintainers/<grant ID> revokes one.

Store an API key or credential with POST /api/v2/secret, then read it from a Workflow. The value is write-only: no endpoint returns it, and reads show metadata only. It needs Secrets: Write, and a User for their own private Feature, a member with Full access for a project’s feature, or an Admin or a maintainer of the Feature when it is shared.

Field Notes
name A label for the secret
secretType api_key (default), oauth, client_credentials, database or url_scope
credentials Required: a JSON object of field → value, e.g. {"token":"sk-..."}
agentFields The field names a Workflow may read, e.g. ["token"]. A field missing here can’t be read at run time, and the run fails with an error like Field '<name>' not available on secret
allowedURLs The addresses it may be sent to, e.g. ["*.example.com"]. Required unless dialect is set
dialect Database secrets only, e.g. postgres. Without your own fieldSchema, Ronja applies the database’s list of fields, and a 400 names any that credentials is missing
featureID Required: the Feature it lives in. A private Feature must be your own, or a project’s where you have Full access
  • To rotate a value, send the new credentials with PUT /api/v2/secret/{secretID}, which also runs a health check and returns its result. For an OAuth secret whose sign-in doesn’t renew itself, the same call restores one that has expired.
  • A Workflow reads a field with {{ secret('secret-...', 'token') }}, where the second argument is a field in credentials that is also in agentFields.

Sync tables from your own PostgreSQL, MySQL, SQL Server or BigQuery into a Feature on a schedule; see Connect a data source for what a connection is. The recipe (store a secret, create, discover, choose tables, run) is at /docs/api/guides/import-a-database.md on your Ronja domain.

Every endpoint below needs the Admin role, reads included, and the Data scope: Read for reads, Write for writes.

Method and path Notes
GET /api/v2/connector/types The types a new connection may use. ?includeLegacy=true adds retired and internal types, for naming a connection you already have, never for picking one
POST /api/v2/connector/connection Create. Send secretId (a database secret), featureID and name; the type comes from the secret’s dialect. It starts status: "pending", and nothing syncs until tables are chosen with PUT …/{id}, which activates it
GET /api/v2/connector/connection List. Optional featureID narrows to one Feature; onlyMarked=true lists the ones in the Trash
GET /api/v2/connector/connection/{id} Read one: configuration, schedule, and syncedStreams, per table. Poll this after a sync; see below
PUT /api/v2/connector/connection/{id} Change the name, schedule or credentials, and choose the tables in config, which replaces the stored object: send all of it. Choosing the tables of a pending connection activates it: it reads success until its first run, which Ronja starts within about a minute
POST /api/v2/connector/connection/{id}/discover The tables the credentials can see. An empty body lists every schema with table names; datasetId shows one schema in detail. Changes nothing
POST /api/v2/connector/connection/{id}/sync Start a run now, without waiting for the schedule. It returns once the run has started, with the connection reading syncing. One already syncing is a 409: right after choosing the tables, the first run has started, so go straight to polling
POST /api/v2/connector/connection/{id}/stop Stop a run at its next checkpoint. That loses progress, never data
DELETE /api/v2/connector/connection/{id} Move it to the Trash and pause syncing; the tables it filled stay
POST /api/v2/connector/connection/{id}/restore Bring it back and resume syncing on its schedule
  • Scheduling is cronExpression (5 fields, in syncTimezone, UTC by default) or syncIntervalSeconds. With neither, it runs once a day. A schedule faster than hourly is refused.
  • Polling. Poll GET …/{id} until status leaves syncing; with the CLI, ronja api /api/v2/connector/connection/<id> --wait-until '.status != "syncing"' --wait-timeout 2h.
  • Reading the result. A table failing in syncedStreams doesn’t fail the connection, so read both. A failed sync keeps those records, so they describe the last run that reached each table: a table can read done: true while the connection reads status: "error". lastError describes the failure.
  • A run has 10 hours. Running out isn’t a failure: status comes back partial, and the next run continues from where it stopped.
  • A table re-read in full every run (on PostgreSQL, MySQL and SQL Server) is capped at 10,000,000 rows and 2 hours; one that takes longer fails, so give it a cursor column. The re-read is one long query, so point it at the primary: a PostgreSQL read replica on default settings can cancel it. On the replica, max_standby_streaming_delay or hot_standby_feedback = on make that rarer, at the cost of holding back cleanup on the primary.

Push data files into a manual-integration table, an Integration table fed by files instead of a connector. It needs a token whose role has Admin rights and, if scoped, Data: Write. Listing files needs only read access to the table; a table you can’t read answers 404, like one that doesn’t exist.

Files must be Parquet, with names matching [a-zA-Z0-9._-]+.parquet; convert CSV to Parquet first.

Step Endpoint Notes
1. Create the table (once) POST /api/v2/feature/model with {"name":"...","featureID":"...","kind":"manual_integration"} featureID goes in the body. Returns the table ID (table-…), also in the table’s URL
2. Upload a file PUT /api/v2/feature/model/{tableID}/file/{filename} The raw body (not multipart), at most your organization’s upload limit (1 GB unless Ronja has changed it). The same filename replaces the file; different filenames accumulate and build together
3. List files GET /api/v2/feature/model/{tableID}/files 200 per page, with nextCursor
4. Delete a file DELETE /api/v2/feature/model/{tableID}/file/{filename} 404 if the file doesn’t exist
5. Build POST /api/v2/feature/model/{tableID}/build Required: uploads alone aren’t queryable. It runs in the background; poll GET /api/v2/feature/model/{tableID} and branch on buildVerdict
  • The table’s columns come from the Parquet files.
  • Each upload must be a readable Parquet file (the footer parses, there is at least one column, the data pages decode), or it is refused with a 400 and discarded. An empty file (valid, zero rows) is accepted and adds nothing at build time.
  • Once a build lands, the Derived tables built from it rebuild on their own clock, unless you built with ?cascade=defer (below). To wait until one has caught up, follow Wait for a Derived table to catch up; ronja api … --wait-until from the CLI runs the poll.

Branch on buildVerdict, never on status: a table that already holds data goes back to status: "ready" after a failed rebuild, so it stays queryable.

buildVerdict Meaning
building, pending Keep polling
ok It worked
ok_partial Queryable, but the build skipped unreadable source files
failed_stale The run failed and the table is still queryable on its previous data. If the failure came after the rows were published, lastBuiltAt has moved and the data is this run’s. With no lastBuildError beside it, Ronja couldn’t read the failure record: the outcome is unknown, not known-bad
failed The run produced no result. That is not the same as empty: a table whose rebuilds are bound to fail, because an input table was deleted, keeps its last good data and stays queryable
invalidated Something upstream changed and the table is due a rebuild
  • lastBuildError ({message, type, occurredAt}) is the latest attempt’s error, and stays after a later build succeeds. It says why.
  • buildFailing ({since, reason}) is present only while updates keep failing: since is when this run of failures began, reason the latest message. It disappears when a build publishes, and can appear on a table that has never built. Its absence alone doesn’t mean your build worked, so read it beside buildVerdict. See When a table stops updating.
  • A table with no previous data ends at status: "build_failed", as does one whose rebuild can never succeed, though its last good data stays queryable. See Table types.

Whether a workflow’s table is behind its inputs

Section titled “Whether a workflow’s table is behind its inputs”

On a table a workflow wrote, GET /api/v2/feature/model/{tableID} also carries stale and provenance; see When a workflow’s inputs move on.

  • provenance names the workflow (workflowID), the run (runID, which stops resolving once the run ages out, so link the workflow), when the run read its inputs (snapshotAt), and each input in inputs[] as {id, name, changed, missing, changedAt}.
  • A table built from such a table carries stale on the matching inputRefs[] entry instead.
  • stale is true, false, or absent when Ronja can’t say: something else has since written the table (provenance.superseded), more than one workflow has (provenance.mixed), or the comparison couldn’t be made. Test for the key, and never read a missing one as fresh.
  • It is advisory: queries, row pushes and apps all proceed on a stale table.

Whether something a table is built from is failing

Section titled “Whether something a table is built from is failing”

GET /api/v2/feature/model/{tableID} also carries upstream and upstreamMore; see When something a table is built from is failing.

  • upstream holds up to 3 entries, one per problem on each broken table it is built from, at any depth (a table whose build and Admin-protected check both fail is two), each {id, name, problem, reason, since, lastBuiltAt}. upstreamMore counts the entries left out.
  • problem is build_failing (its updates keep failing), check_failing (a failing Admin-protected health check) or connection_broken (its connection needs re-authorization or is stalled). A table’s own connection counts, under the table’s own id.
  • An input you can’t open comes back as {problem, readable: false, reason} only. since is absent when it isn’t known, and always on a connection, which carries lastBuiltAt instead.
  • Both fields are absent when nothing upstream is broken or the lookup didn’t finish in time, and nothing refuses a table because of them.
  • The table list, GET /api/v2/feature/model, carries both on each row with includeUpstream=true; without it, the list doesn’t look upstream.

Push rows into a Dynamic table (Table types), as JSON or as a Parquet file. There is no build step: when the call returns, the rows are there. It needs write access to the table’s Feature and, if scoped, Data: Write.

Step Endpoint Notes
1. Create the table (once) POST /api/v2/feature/model with {"name":"...","featureID":"...","kind":"dynamic","fields":[{"name":"ts"},{"name":"amount"}]} Needs an Admin, the owner of a Private Feature, or a maintainer of an organization Feature. Returns the table ID (table-…). fields and schemaPolicy are optional; see below
2. Write rows POST /api/v2/feature/model/{tableID}/rows with {"rows":[{...}],"writeMode":"append"} At most 50,000 rows and 8 MiB of JSON per request. Returns {tableID, rowsWritten, writeMode, partitionCount, warnings, schemaChange, cascade, version}
2b. Or upload Parquet POST /api/v2/feature/model/{tableID}/rows/parquet?writeMode=append, the file as the raw body At most your organization’s upload limit (1 GB unless Ronja has changed it), no row limit. Returns {tableID, bytesReceived, writeMode, partitionCount, warnings, schemaChange, cascade, version}
2c. Or change rows with SQL POST /api/v2/feature/model/{tableID}/modify with {"sql":"UPDATE target SET … WHERE id = $1","params":[42]} INSERT, UPDATE, DELETE or MERGE on target. Returns {tableID, counts, version, partitionCount, replayed, cascade}; see Changing rows with SQL
3. Query POST /api/v2/duckdb/query with {"sql":"SELECT ts, amount FROM {{ ref('table-…') }}"} Answers tableVersions, the version of each table read, for a guarded write. Table IDs only: a table name such as Sales.orders is looked up only where SQL or code is saved, not here. A table with no writes yet answers with no rows
Undo: empty the table POST /api/v2/feature/model/{tableID}/clear with {"reason":"..."} The same access as writing rows. The contents are snapshotted first
Undo: restore a snapshot GET /api/v2/feature/model/{tableID}/dynamic-versions, then POST /api/v2/feature/model/{tableID}/dynamic-versions/{versionID}/restore The same access as writing rows. Snapshots expire after 7 days
  • Name the columns in a query rather than writing SELECT *. Before the first write the columns come out alphabetically, and afterwards in the order the data produced them, so a UNION, which pairs columns by position, starts pairing the wrong ones. Without fields, SELECT * returns one placeholder column.
  • This query endpoint answers success with a query error inside it. ronja query from the CLI fails loudly instead; see Query your data.
  • The query’s tableHealth names each table it read whose own updates are failing (buildFailing) or that is built on something failing (upstream, upstreamMore, as above). It is advisory: the query ran regardless, and tableHealth is absent when nothing is wrong or the lookup didn’t finish in time.
  • Who can write. Writing rows, clearing and restoring need write access to the table’s Feature: its owner or an Admin for a Private Feature, an Admin or a maintainer for a shared one. Any other colleague who can write the table inside Ronja gets a 403 over the API. To let a second person push, move the table to a shared Feature and make them a maintainer of it.
  • writeMode is append (the default) or replace, exactly: "REPLACE" or anything else is a 400. On the Parquet endpoint it is a query parameter; /rows takes it in the body or as the same query parameter, and a different value in each is a 400.
  • append is at-least-once. A retry after a timeout can write the batch twice. For a recurring refresh, send the whole current dataset with "writeMode":"replace", which is safe to repeat.
  • Each append adds a data file, and Ronja merges small files with the same shape (columns, types, order and nullability) in the background. A batch whose shape no other shares isn’t merged, and a table restored from a version isn’t merged again until its next replace or clear. partitionCount normally rises into the tens and drops after a merge. Past a ceiling an append is refused with a 400 naming the two fixes: only a count that keeps rising calls for replace or a clear.
  • Send the Parquet file as the raw body (curl --data-binary @data.parquet), never a form upload (curl -F), which is refused with a 400. A file that isn’t readable Parquet is refused and the table is untouched. Otherwise the Parquet endpoint behaves exactly like the row push: the same access, write modes, ceiling, warnings and schemaChange, dry run, automations and snapshots.
  • ?dryRun=true on either endpoint previews the write and writes nothing. It runs every check the write runs (the same 400 for a write that would be refused) and answers "dryRun": true, rowsWritten of 0, the warnings and schemaChange the write would return, no cascade, and dependents: the Derived tables you can see built directly from this one (Check a write before it lands). It holds no lock, so a write in between can change the answer.
  • dryRun is true or false; any other value, a misspelling such as dry_run, or "dryRun" in the row push’s JSON body is a 400. A response without "dryRun": true was a write.

A table’s version changes on every write. Every write answers the new one (/rows, /rows/parquet, /modify, /clear, /copy and a version restore), GET /api/v2/feature/model/{tableID} shows the current one, and a query answers the versions it read in tableVersions, taken at the same moment as its rows.

  • expectedVersion on /rows (in the body or as a query parameter) or /rows/parquet (a query parameter) lands the write only if the table is still at that version. On /rows, a different value in the body and the query is a 400, and nothing is written.
  • If another write landed since, the answer is a 409 with "code": "version_mismatch", currentVersion and expectedVersion, and nothing is written: read the table again and redo your change.
  • Take the version from the read your rows came from, not from a separate call afterwards: a version read later may already include the change you would otherwise overwrite.
  • A dry run doesn’t check expectedVersion; the write does.

POST /api/v2/feature/model/{tableID}/modify with {"sql": "…", "params": […]} changes a Dynamic table’s rows in place. It needs the same access as writing rows, plus read access to every table the SQL reads, and, if scoped, Data: Write.

  • The statements. INSERT, UPDATE, DELETE or MERGE only, separated by ;, run in order and landing together or not at all. The table is target; another table is {{ ref('table-…') }}. A {{ ref() }} to the table itself, or to a table with no rows yet, is refused.
  • params fill $1, $2, … in every statement: JSON strings, numbers, booleans or null. Very large whole numbers are kept exactly.
  • Name the columns in an INSERT: INSERT INTO target (id, status) VALUES (…). The table’s columns are in the order its files hold them, which is alphabetical for a table written from JSON rows, so a VALUES list without names can put a value in another column of the same type without an error.
  • What it can change. The table’s existing columns, on a table whose columns have types: one you have written rows to, or one set up with column types. A table with only named columns, or one emptied with /clear or by a /copy from an empty table, is refused until you write rows to it again. To add a column, write it with /rows first.
  • What it costs. Only the data files holding a changed row are rewritten. If another write lands while yours runs, yours runs once more against the new table.
  • The answer. counts lists each statement’s changed rows in order (0 is an answer), version is the table’s new version, and cascade is as on /rows, with ?cascade=defer accepted the same way.
  • Undo. A snapshot with your statements as its reason is kept first, so a version restore puts the table back for 7 days.
  • Idempotency-Key. Send the header (up to 255 printable characters) to make a retry safe. The same key with the same body and table within 24 hours changes nothing and answers the first write’s counts and version with "replayed": true and "cascade": "none", since the repeat told no dependent. A key belongs to the person or token that sent it. The same key with a different body or table is a 409 (idempotency_key_reused) naming the table it was first used for. Without a key, a retry after a lost answer runs the statements again.
  • /modify takes no expectedVersion: the statements run against the table as it is when they land.

On the row push a column takes its type from the JSON values:

You send Stored as
A string, including a numeric-looking one such as "020" Text, exactly as sent: the leading zero and any whitespace are kept, with no warning
true / false A boolean
A number with no fraction or exponent that fits in 64 bits (20) A whole number
Any other number (20.0, 1e3), or a whole number too large for 64 bits A decimal; a too-large whole number loses its low digits
A number too large even for a decimal (1e400) Text, which makes the column text

A new column is added, and earlier rows read null in it. Send numbers as numbers: "amount": "12.50" makes a text column, and text arriving on a column of numbers is a type change. JSON has no date or time type, so dates arrive as text and make a text column: cast (some_column::TIMESTAMP) before a date function; the same cast makes a query work before the first write, when the columns have no type yet.

On a column the table already stores as a date or a date-and-time, the text keeps the column’s type when every value in the write reads as one: 2026-10-01 for a date, and for a date-and-time with a time zone, its offset (2026-10-01T12:00:00Z, 2026-10-01 14:00:00+02); see Column types.

When you add rows and a column’s type changes, it is widened, or in a few cases refused, as When a column changes type describes; a refusal is a 400 naming the column, and nothing lands. A replace starts afresh: the table takes exactly the columns and types it sends, so a column can be added, dropped or change type, and nothing is refused or stored as text for that. Either way the write is compared with what the table held:

  • warnings names each column that changed (past 53 columns with one kind of change, it names 50 and counts the rest). The strings are prose for a person, not a stable contract, so don’t pattern-match them.
  • schemaChange is for code: {"added":[{"name","type"}],"dropped":["name"],"missing":["name"],"retyped":[{"name","from","to"}]}, each list left out when empty, so {} means no column changed. dropped is a replace’s (the table no longer has the column), missing an append’s (the added rows have no value there), and a retyped column’s to is the type it reads as after the write.

schemaPolicy is set on the create or a later PUT /api/v2/feature/model/{tableID}, on Dynamic tables only: "widen" (the default) or "strict", which refuses any write that adds, leaves out or retypes a column with a 400 (Schema policy). A widened column reports widenedFrom (its earlier type) and widenedAt on GET /api/v2/feature/model/field/table/{tableID}, which lists the columns; both are null on a column never widened. GET /api/v2/feature/model/{tableID} carries no column types.

A table with the Legacy typing marker reports jsonTyping: "legacy" on GET /api/v2/feature/model/{tableID}. It stores a numeric-looking string as a number and true/false as text, and every write says so in warnings, one line per column. Every other table is "typed".

  • Switch it with PUT /api/v2/feature/model/{tableID} and {"jsonTyping":"typed"} once your code sends real types, or by clearing it. {"jsonTyping":"legacy"} switches it back. The steps are in Switch a table to typed rows.
  • Under Widen, the first write after the switch from code that still sends quoted numbers, true/false or whole-number decimals such as 20.0 is a type change: a column of quoted numbers widens to text once, and arithmetic on it in a Derived table stops working; a boolean onto a text column lands, but every such write warns; a boolean onto a number column is stored as 1/0, and every such write warns until you send 1/0.
  • Under Strict, such a write is refused with a 400 until the payload matches the table or the schema policy changes.
  • Every successful write counts as an update to the table: the Derived tables built from it rebuild, and any Automation watching it fires, as for an in-app write. A write sent with ?cascade=defer holds the rebuild until you release it (below). Each response’s cascade field says "immediate" or "deferred".
  • A clear does the same, but those rebuilds fail, since a clear removes the table’s column types as well as its rows, so the Derived tables keep their data from before. The next write rebuilds them, and a write landing while that failed rebuild still runs is picked up by a follow-up rebuild, so you can clear and reload back to back.
  • Clearing keeps the column names, so a query naming them keeps working on the empty table; the types come back with the next write.

POST /api/v2/feature/model/{tableID}/copy with {"featureID":"collection-…"} copies a table into a Feature as a Dynamic table holding a copy of its rows as they are now. Use it to bring production tables into a Feature in another Space, so an app can be tested there on real data. It needs, if scoped, Data: Write.

Field Default Effect
featureID required The Feature to copy into. It may be in another Space than the source
name the source’s name The copy’s name, when this call creates it. On a copy that already exists it is ignored, but it must still be a valid name
rows true false creates the table with the source’s columns and no rows, for a table an app writes to. On a copy that already exists, it empties it

It returns {"table":{"id","name","featureID"},"rowsCopied":n,"outcome":"created"|"refreshed","version":"…"}. version is the copy’s version after the call, for a guarded write; it is absent when the call wrote nothing (a first copy with no rows).

  • Copying again refreshes the copy. A copy remembers the table it came from, and GET /api/v2/feature/model/{tableID} shows it as copiedFromModelID. When the Feature already holds a copy of this table, its rows and columns are replaced by the table’s current ones, and its ID, name and description stay, so whatever is bound to it keeps working. Renaming the copy or editing its description doesn’t change this. If the Feature holds more than one copy of the table (one restored from the trash, say), the oldest is the one refreshed.
  • Two tables with the same name. If a different table in the Feature already has the name, the call is refused with a 409 (name_taken) naming that table. Send name to copy under another name, which is also how you copy a table into its own Feature.
  • An empty table is copied as a table with its columns and no rows. Refreshing a copy from an empty table, or with "rows": false, empties the copy and keeps its column names, so whatever reads it still works; the column types come back with the next copy that has rows.
  • Size and time. When rows are copied, a table whose stored data is over 1 GB is refused before anything is copied: build a smaller Derived table with only the rows and columns you need, and copy that. The call waits for the copy. One that doesn’t finish within about 80 seconds is answered 504 (copy_timeout): the target table exists and holds its previous rows (none on a first copy), and copying again refreshes it. A copy is written whole or not at all, so a copy cut off before its write finished keeps the previous rows, and one whose write finished answers success. A first copy that fails for any other reason also leaves the new table in place with no rows, and the next call refreshes it.
  • What can’t be copied. A metric, and a table that lives only in a chat (not yet saved to a Feature): save it to a Feature first, then copy it from there. Both are refused before anything is created.
  • Who can copy. You need to be able to read the table (otherwise 404, as for a table that doesn’t exist) and to create a table in the target Feature (otherwise 403). Refreshing a copy also needs write access to it. The copy is made as you.

When one script sends several tables a Derived table reads together, hold back each table’s rebuild and release them all in one call, so the Derived table rebuilds once over the whole set. The walkthrough is Send several tables at once.

Step Endpoint Notes
1. Hold back the rebuild Add ?cascade=defer to POST …/rows, POST …/rows/parquet or POST …/clear on a Dynamic table, or to POST …/build on a file-fed Integration table immediate (the default) or defer; anything else is a 400. The data lands, and the table’s own Automations and health checks run; only its Derived tables wait
2. Wait for every build Poll each /build as in the File push API Integration tables only: start every build first, then wait. Dynamic writes need no wait
3. Release POST /api/v2/feature/model/cascade with {"tableIds":["table-…","table-…"]} 1 to 100 tables (a repeated ID counts once). Returns {"released":[…],"notPending":[…]}. Needs write access to every named table and, if scoped, Data: Write

A write’s cascade response field, notPending, the automatic release after 15–20 minutes and what Derived tables show while held are in the walkthrough. Two more details: a response without the cascade field came from a server that ignores the parameter (unless it carries "dryRun": true, since a dry run cascades nothing), and defer on /build is a 409 for a table already building and a 400 for any other kind of table.

The /llms.txt index asks an AI agent working over the API to tell the Ronja team when the product gets in its way: a confusing error, an endpoint or guide that didn’t do what it says, something it had to work around. It does this with POST /api/v2/vent, without asking you. A report holds what the agent wrote (a category, a one-line summary, and optionally the endpoint, the error and what it tried), your organization and account, the token’s name and the client it ran from. The agent is told to describe only how Ronja behaved, never your data, and the text is scrubbed of credentials, email addresses, phone numbers, long numbers and quoted values in the error text before it is stored; that filter is best effort. Only a person can send one: a browser session or a personal access token, which needs Data at Read if it is scoped. An API token is refused. The response is always 200 with {"recorded": true|false, "note": "…"} unless the credential is refused (403).

Every error body carries {"error": "<message>"}. Some also carry a code naming the kind of refusal, such as human_required or insufficient_scope, and some carry further fields. A missing or invalid token is always 401 Unauthorized. The two push APIs have separate messages, including two meanings of 403.

Only the row push and the Parquet upload accept ?dryRun=true. Every other endpoint that changes something refuses any spelling of dryRun in the query string with a 400 and does nothing.

Status Message Cause
403 forbidden Role below Admin, or a scoped token without Data: Write
400 invalid filename: must match [a-zA-Z0-9._-]+.parquet Bad filename
400 model is not a manual_integration table Wrong table kind
404 not found A table ID that doesn’t exist, or one you can’t reach; the two get the same answer
400 uploaded file is not a valid parquet file (corrupt or missing footer): re-export the file and upload again Not Parquet, or a corrupt or truncated footer; the upload is discarded
400 uploaded parquet file has no columns An empty schema; the upload is discarded
400 uploaded parquet file is unreadable (…): re-export the file and upload again The footer parses but the data pages don’t decode; the upload is discarded
404 file not found DELETE on a missing file
413 file too large: {filename} is … over this organization's 1 GB upload limit (1073741824 bytes). Ronja can raise it: contact support. (code file_too_large) Over your organization’s upload limit; split the file, or ask support to raise the limit
400 invalid cascade "…": must be "immediate" (default) or "defer" An unrecognized cascade on /build (case-sensitive)
400 cascade=defer on /build applies only to manual_integration tables, … ?cascade=defer on a Build of another kind of table. A Dynamic table holds back its rebuild on its write endpoints
409 table is already building — wait for that build to finish, then build again with cascade=defer ?cascade=defer while a build runs: that build would rebuild the Derived tables as soon as it lands
409 a build of this table is already running — poll GET /feature/model/… until buildVerdict leaves "building", then build again if you still need to /build while a build runs. It isn’t restarted, so your new files may not be in it: wait, then build again
400 table … is a dynamic table: it is written, not built — … /build on a Dynamic table; write rows to it instead
400 this route has no dry run, so the query parameter "…" was refused and nothing was done. … Any spelling of dryRun on an upload, a file delete or a Build, which have no dry run

Covers /rows, /rows/parquet, /modify, /clear and the version restore.

Status Message Cause
403 forbidden No write access to the table’s Feature (not the owner of a Private Feature or an Admin; not an Admin or a maintainer of a shared one), or a scoped token without Data: Write. Any role below User is refused
404 not found A table ID that doesn’t exist, or a deleted one
400 table … is a … table, not a dynamic one Not a Dynamic table
400 table … is a session-scoped scratch table and is not writable over HTTP … A chat’s table rather than a Feature’s; save it to a Feature first
400 no rows provided — \rows` must be a non-empty array of objects` Empty rows
400 row … is null, not an object; every element of rows must be a JSON object A null in rows (the index counts from zero). Nothing lands
400 too many rows: … exceeds the limit of 50000 per request Split the batch
400 invalid writeMode "…": must be "append" (default) or "replace" An unrecognized writeMode (case-sensitive)
400 invalid cascade "…": must be "immediate" (default) or "defer" An unrecognized cascade (case-sensitive)
400 invalid dryRun "…": must be "true" or "false" (the default); nothing was written An unrecognized dryRun on /rows or /rows/parquet (case-sensitive); dryRun is given … times when it is repeated
400 the query parameter "…" is not recognised, so nothing was done: this route's dry run is spelled "dryRun", as in ?dryRun=true A misspelled dryRun (dry_run, DryRun, dry-run) on /rows or /rows/parquet
400 "dryRun" in the request body is not read by this route, so nothing was written: … "dryRun": true in the /rows JSON body; send it as ?dryRun=true
400 this route has no dry run, so the query parameter "…" was refused and nothing was done. … Any spelling of dryRun on /clear or the version restore, which have no dry run
400 table already has … committed partitions (limit …) The append ceiling: the merge hasn’t kept up (batches of differing shape, or a restored table). Send with replace, or clear the table
400 table …: schema conflict: "…": was …, incoming has …. A struct, list or map column cannot be read alongside a column of another shape, so this write is refused under every schema policy … A column changing between a nested shape (a list or an object) and anything else. Refused under both schema policies; nothing lands
400 table …: column(s) "…" could not be read alongside the column(s) the table already holds, and cannot be rewritten as text either: … A type that can’t be read beside the stored one or written as text: a decimal, a time-of-day, a legacy-format timestamp, or a half-precision float, interval, geometry, geography or BSON column. Refused under both policies; nothing lands
400 table …: schema mismatch: added=[…] missing=[…] typed_differently=[…]. This table's schemaPolicy is "strict", so every write must carry exactly its columns with the same types … Strict only: the write added, left out or retyped a column. Nothing lands
409 table is busy with another write — retry shortly Another write held the table for more than 30 seconds (on /rows, /rows/parquet, /modify and /clear); nothing was written. A table is held only while a write lands, so this is rare. A client timeout shorter than 30 seconds sees its own timeout instead
409 this server is busy with other conflicting writes — retry shortly Another write moved the table while yours was prepared, and the server had no room to run yours again within 30 seconds; nothing was written
409 the table is at version …, not …: another write landed since you read it — … (code version_mismatch) A guarded write whose expectedVersion is out of date; the body carries currentVersion. Nothing was written
409 Idempotency-Key "…" was already used … (code idempotency_key_reused) /modify with a key another write used; the body names that write’s table. Nothing was written
400 the SQL write to table … failed: … /modify SQL that DuckDB rejects, or a statement that isn’t INSERT, UPDATE, DELETE or MERGE. Nothing was written
400 table … holds … rows (… compressed); a SQL write on this compute loads them all into memory, whatever it changes, and they do not fit … (code resource_limit; or … ran out of time / … disk room) A /modify (or a workflow’s modifyTable) over a table too large to load: a SQL write loads the whole table whatever it changes, so changing fewer rows does not help. Write the table with a replace or an append, or split it into smaller tables. Nothing was written
413 request body too large: limit is 8388608 bytes /rows over 8 MiB; split the batch, or send Parquet
400 request body is not a valid Parquet file (corrupt or missing footer). Send the file as the RAW request body … Not a Parquet file, most often a curl -F form upload; discarded
400 uploaded Parquet file has no columns An empty schema; discarded
400 uploaded Parquet file is unreadable: re-export the file and upload again The footer parses but the data pages don’t decode; discarded
413 file too large: the upload is … over this organization's 1 GB upload limit (1073741824 bytes). Ronja can raise it: contact support. (code file_too_large) Over your organization’s upload limit; split the file, or ask support to raise the limit

Covers POST /api/v2/feature/model/cascade. Every refusal except a 503 comes before anything is released.

Status Message Cause
403 forbidden A role below User, or a scoped token without Data: Write
404 table … not found A table that doesn’t exist, is in another organization, or that you can’t write: the same answer for all three
400 tableIds must name at least one table Empty list
400 tableIds names … tables; at most 100 may be released in one call — split the set More than 100 distinct tables
400 tableIds must not contain an empty id An empty string in the list
400 table … is a derived table — only dynamic and manual_integration tables can have their writes deferred and released; … A Derived table has nothing of yours to release
400 table … is not a dynamic or manual_integration table — … Any other kind of table
400 table … is a session-scoped scratch table — … A chat’s table rather than a Feature’s
409 … is still building — wait for its build to finish, then trigger A named table is still building. Nothing was released; wait, then call again
503 the release collided with a concurrent change and released nothing — retry Nothing was released; retry
503 The release may already have applied. Retrying is safe; if the retry lists the tables as notPending, the release had already applied. The outcome is unknown; retry