YAML
YAML input and output
Content-Type: application/x-yaml, and responses can be
requested using ?format=yaml or Accept: application/x-yaml.
YAML Input
To send YAML to Conduit, set the Content-Type header to
application/x-yaml or text/yaml.
title: Example
created_at: 2024-01-01T00:00:00Z
Conduit maps YAML keys directly into schema‑aware rows. YAML scalars, quoted strings, booleans, and numbers are all supported.
YAML Output
YAML output is selected when:
?format=yamlor?format=ymlis usedAccept: application/x-yamlis sent- The input format is YAML
GET /v1/books?format=yaml
Example response:
- id: 1
title: Example
created_at: "2024-01-01T00:00:00Z"
YAML Schema Responses
Schema endpoints return YAML describing the table’s columns, types, and metadata.
GET /v1/schema/books?format=yaml
Example:
columns:
- name: id
type: INTEGER
pk: true
autoincrement: true
- name: title
type: TEXT
nullable: false
- name: created_at
type: TEXT
YAML Error Responses
Conduit returns a consistent YAML error envelope for all error conditions. This structure matches the JSON, XML, TOML, NDJSON, CSV, and CBOR envelopes.
Example YAML error:
error:
title: "Resource Not Found"
message: "The requested record does not exist."
status: 404
documentation_url: "https://docs.conduit.dev/errors/not-found"
details:
- "No record with ID 999 exists in table 'books'."
The fields in the error envelope come directly from the ErrorSpec used by Conduit’s
internal error system.
Format Negotiation
YAML is selected when:
?format=yamlor?format=ymlis usedAccept: application/x-yamlis sent- The input format is YAML
GET /v1/books?format=yaml