Response Envelope

The common envelope shape returned by every endpoint.

≈ 2 min read 331 words Updated 2026-08-29

On this page

Every endpoint returns JSON in the same envelope:

{
  "apiVersion": "v1",
  "kind": "WikiEntry",
  "metadata": {
    "generated": "2026-05-21T18:28:41Z",
    "language": "en",
    "schemaUrl": "/v1/schema/wiki-entry/"
  },
  "data": { /* the resource — shape depends on kind */ },
  "links": {
    "self": "/v1/wiki/elohim/",
    "canonical_html": "https://www.wheelofheaven.world/wiki/elohim/",
    "index": "/v1/wiki/",
    "schema": "/v1/schema/wiki-entry/"
  }
}

Top-level fields#

FieldTypeDescription
apiVersionstringAlways "v1" until the next breaking version cuts.
kindstringThe resource kind (one of the entries in Schemas).
metadataobjectGeneration timestamp, response language, schema reference.
datavariesThe resource payload. Shape determined by kind.
linksobjectURLs to the canonical HTML twin, the index, the schema, related resources.

metadata#

FieldTypeDescription
generatedstring (ISO 8601)When the file was generated by the prebuild + Zola pipeline.
languagestringTwo- or four-letter language code (en, de, zh-Hant, etc.) per /v1/enums/languages/.
countintegerPresent on index responses. The number of items in data.
schemaUrlstringRelative URL of the JSON Schema that validates the data field.

The keys vary by kind, but these are common:

KeyWhenWhat
selfalwaysThis endpoint’s own URL.
canonical_htmlcontent resourcesThe corresponding www HTML page.
indexindividual itemsThe index endpoint listing siblings.
schemaalwaysThe JSON Schema URL for this kind.
translationscontent resources (planned)Per-language URLs for the same resource.
librarysourcesCross-link to a digitised text in /v1/library/.

Response headers#

HeaderValue
Content-Typeapplication/json; charset=utf-8
Access-Control-Allow-Origin*
Access-Control-Allow-MethodsGET, HEAD, OPTIONS
Cache-Controlpublic, max-age=3600 (content) / max-age=86400 (schema/enums/context)
X-LicenseCC0-1.0
X-Citabletrue
X-API-Versionv1

Not-translated response#

Requesting a language-prefixed URL for a resource that doesn’t exist in that language returns 404 with a hint envelope (best-effort — Cloudflare may serve the bare 404 page first; the hint envelope is the intended form):

{
  "apiVersion": "v1",
  "kind": "NotTranslated",
  "data": null,
  "links": {
    "canonical": "/v1/wiki/elohim/",
    "available_in": ["en", "de", "fr"]
  }
}

Why this envelope#

The shape mirrors Kubernetes API conventions (apiVersion / kind / metadata / data) for two reasons: consumers can route on kind without parsing the URL, and the apiVersion field gives us an explicit place to declare future breaks. URL permanence (Decision 9) locks the path; the envelope locks the shape.

Edit this page on GitHub