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
| Method | Path | Body | Success | Errors |
|---|
| POST | /templates/:name/render | JSON object (non-empty) | 200 application/pdf | 400 bad body/name; 404 no template; 422 schema violation; 500 render error |
| GET | /templates/:name/examples/:example | — | 200 application/pdf | 404; 500 |
| POST | /templates/:name/preview/render-plan | JSON object | 200 application/json — array of {template_name, data} | 400; 404; 500 (composite templates only) |
| Method | Path | Success |
|---|
| GET | /templates/:name/examples-data | 200 JSON map {example: data} |
| GET | /templates/:name/schema.json | 200 JSON schema, 404 if none |
| GET | /spec/swagger.json | 200 generated Swagger 2.0 spec |
| GET | /_status | 200 pool stats + browser metadata (see Status & metadata) |
| GET | /_status/schema.json | 200 JSON schema of the status object |
| GET | /_metadata | 200 version info |
| GET | / | 307 → /static/ (tester UI + spec viewers) |
Examples
curl -X POST -H 'Content-Type: application/json' -d '{"value":1}' \
http://localhost:9999/templates/mustache_template/render -o out.pdf
curl http://localhost:9999/templates/examples_template/examples/alice -o alice.pdf
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 error | HTTP |
|---|
| Data fails schema validation | 422 |
| Template / example not found | 404 |
| Empty body / invalid JSON / bad name | 400 |
| Anything else | 500 |
There is no authentication on these endpoints. Deploy behind an authenticating proxy — see the hardening checklist.