Home Docs Schema Formats Errors
Conduit

CRUD API

CRUD API

The CRUD API provides record-level operations for any table exposed through Conduit. Endpoints are automatically generated based on your database schema.

CRUD API

Work with table records via /v1/<table> and /v1/<table>/<id>.

GET    /v1/books
GET    /v1/books/42
POST   /v1/books
PUT    /v1/books/42
PATCH  /v1/books/42
DELETE /v1/books/42

GET /v1/<table>

Returns a list of records from the specified table. Supports pagination and multiple output formats.

GET /v1/books?limit=50&offset=0
GET /v1/books?order=title
GET /v1/books?where=author='Asimov'
GET /v1/books?format=xml

Query parameters:

  • limit — maximum number of rows to return
  • offset — number of rows to skip
  • order — sort by a column
  • where — SQL-like filter expression
  • format — output format (json, yaml, xml, toml, csv, ndjson)

If limit exceeds the server's configured default limit, Conduit clamps it to the maximum allowed value.

GET /v1/<table>/<id>

Returns a single record by primary key.

GET /v1/books/42

If the record does not exist, Conduit returns a 404 error with a localized message.

POST /v1/<table>

Inserts a new record into the table. Conduit accepts JSON, YAML, TOML, or XML input.

POST /v1/books
Content-Type: application/json

{
  "title": "Foundation",
  "author": "Isaac Asimov",
  "year": 1951
}

Columns ignored during POST (such as auto-increment IDs) are determined by the schema and driver behavior.

PUT /v1/<table>/<id>

Replaces an existing record entirely. All fields must be provided.

PUT /v1/books/42
Content-Type: application/json

{
  "title": "Foundation (Revised Edition)",
  "author": "Isaac Asimov",
  "year": 1951
}

If the record does not exist, Conduit returns a 404 error.

PATCH /v1/<table>/<id>

Partially updates an existing record. Only the fields provided in the request body are modified.

PATCH /v1/books/42
Content-Type: application/json

{
  "year": 1952
}

PATCH is ideal for small updates without resending the entire record.

DELETE /v1/<table>/<id>

Deletes a record by primary key.

DELETE /v1/books/42

If the record does not exist, Conduit returns a 404 error.

Supported Formats

All CRUD endpoints support multiple output formats:

  • JSON
  • YAML
  • XML
  • TOML
  • CSV
  • NDJSON
  • CBOR

Input formats for POST, PUT, and PATCH include JSON, YAML, TOML, XML, CSV, and CBOR.

Notes

  • CRUD operations respect authorization and policy settings.
  • All endpoints are generated dynamically based on your schema.
  • Errors are localized based on the Accept-Language header.
  • Pagination defaults are controlled by server.default_limit.