The REST API uses standard HTTP verbs for writes:Documentation Index
Fetch the complete documentation index at: https://archie.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
POST to create, PATCH to update, DELETE to delete. Updates follow RFC 7396 JSON Merge Patch — only the fields you send are changed. The endpoints are auto-generated from your Data Model, so adding a field to a table extends the request and response schema automatically.
The examples assume a students table with fields like firstName, email, age, isActive, and a city relationship.
Single record
Create
POST /api/rest/<table> with a JSON body. Returns 201 Created with the new record and a Location header.
Prefer: return=minimal — you’ll get 201 Created with no body.
To link to a related record, include the foreign key in the input:
Idempotency-Key header — see Idempotency.
Update
PATCH /api/rest/<table>/<id> with the fields you want to change. Fields you don’t include are left alone.
null value:
application/merge-patch+json and application/json are accepted as Content-Type.
Delete
DELETE /api/rest/<table>/<id>. Returns 204 No Content on success.
Bulk create
POST /api/rest/<table>/_bulk creates up to 100 records in one request.
Transaction modes
| Mode | Behavior |
|---|---|
ALL_OR_NOTHING (default) | Single transaction. Any failure rolls back the whole batch. |
BEST_EFFORT | Independent inserts. Failures are reported but don’t block other rows. |
transactionMode in the body, or as a query parameter (?mode=BEST_EFFORT).
Success — 201
Partial success in BEST_EFFORT — 207
Rollback in ALL_OR_NOTHING — 422
When any row fails inALL_OR_NOTHING mode, the API returns 422 and totalSucceeded is 0 — none of the rows were inserted.
Bulk delete
DELETE /api/rest/<table>/_bulk removes multiple records in one request.
By ids (single primary key)
By filters (composite primary keys)
ids and filters in the same request. Composite primary keys require filters.
Update by filter
PATCH /api/rest/<table> (no id in the path) updates every record matching the filter parameters. Useful for batch operations like “mark all expired”.
Limits
| Setting | Default |
|---|---|
| Max items in a bulk request | 100 |
| Max field selection depth | 3 |
| Max relations per query | 10 |
422 Unprocessable Entity with details.
Error responses
Errors follow the Problem Details format withContent-Type: application/problem+json.
Permissions
Every mutation is checked against Role-Based Access. Field-level write rules apply too — fields a role isn’t allowed to write are rejected.FAQ
PATCH or PUT — which should I use?
PATCH or PUT — which should I use?
Use
PATCH. Archie’s update endpoints implement RFC 7396 Merge Patch semantics — only the fields you send are changed. There’s no full-record PUT replacement variant.How do I retry a failed POST safely?
How do I retry a failed POST safely?
Send the same
Idempotency-Key header on the retry. The API will return the cached response from the first call instead of creating a duplicate. See Idempotency.Why is bulk delete returning 207 Multi-Status?
Why is bulk delete returning 207 Multi-Status?
BEST_EFFORT mode reports per-row outcomes — some succeeded, some didn’t. The body’s errors array tells you which rows failed and why. For all-or-nothing semantics, switch to ALL_OR_NOTHING.Can I create a record with related rows in one call?
Can I create a record with related rows in one call?
What happens if I PATCH a field that doesn't exist?
What happens if I PATCH a field that doesn't exist?
The API returns
422 Unprocessable Entity with the offending field name. Unknown fields are not silently ignored.