Batch Write
Write records to multiple tables in a single transaction.
Supports:
- Batch references: Use "_ref" to label records, "@refname" to reference them
- Natural keys: Use human-readable values for foreign keys (e.g., recipe name)
- Automatic FK ordering: Tables are inserted in dependency order
- Upsert mode: Update existing records based on match columns
- Dry run: Validate without committing changes
Committed writes are recorded against a job execution (created automatically
if not supplied) and the job_execution_id is returned, so the write can be
reverted as a unit.
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
tables
Map of table_name to list of records to insert.
options
Optional write options (mode, match_on, dry_run, return_records).
Response
OK
summary
Count of created/updated records per table.
refs
Map of _ref labels to their created IDs.
success
Whether the operation succeeded.
job_execution_id
The job execution this write was recorded under. Use it to revert the write as a unit. Null for dry runs.
records
Created/updated records (only if return_records=True).
plan
Execution plan (only if dry_run=True).
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error