HTTP endpoints

All routes are served on the configured --addr (default :9999). :template_name is a URL path component — escape nested names (invoices%2Feu) and composition names (composition%3Ainvoice-bundle).

Rendering

MethodPathBodySuccessErrors
POST/templates/:name/renderJSON object (non-empty)200 application/pdf400 bad body/name; 404 no template; 422 schema violation; 500 render error
GET/templates/:name/examples/:example200 application/pdf404; 500
POST/templates/:name/preview/render-planJSON object200 application/json — array of {template_name, data}400; 404; 500 (composite templates only)

Metadata

MethodPathSuccess
GET/templates/:name/examples-data200 JSON map {example: data}
GET/templates/:name/schema.json200 JSON schema, 404 if none
GET/spec/swagger.json200 generated Swagger 2.0 spec
GET/_status200 pool stats + browser metadata (see Status & metadata)
GET/_status/schema.json200 JSON schema of the status object
GET/_metadata200 version info
GET/307/static/ (tester UI + spec viewers)

Examples

# Render with data
curl -X POST -H 'Content-Type: application/json' -d '{"value":1}' \
  http://localhost:9999/templates/mustache_template/render -o out.pdf

# Render a named example
curl http://localhost:9999/templates/examples_template/examples/alice -o alice.pdf

# Preview a composition's plan without rendering
curl -X POST -H 'Content-Type: application/json' -d '{"iterations":[1,2]}' \
  http://localhost:9999/templates/composition%3Aonly_static/preview/render-plan

Error mapping

Domain errorHTTP
Data fails schema validation422
Template / example not found404
Empty body / invalid JSON / bad name400
Anything else500

There is no authentication on these endpoints. Deploy behind an authenticating proxy — see the hardening checklist.