ServicesTemplate Service
API
HTTP endpoints, response envelope, and OpenAPI for the template service.
Discovery and ops
| Path | Method | Notes |
|---|---|---|
/ | GET | Service discovery (enveloped) |
/api-docs | GET | Swagger UI |
/openapi.yaml, /openapi.json | GET | Spec from binary |
/healthz | GET | Liveness |
/readyz | GET | Readiness (Postgres ping) |
Versioned API
| Path | Method | Contract |
|---|---|---|
/v1/domain1 | POST | Create record; requires Idempotency-Key |
/v1/domain1/{id} | GET | Get by UUID |
/v1/domain2 | POST | Create record; requires Idempotency-Key |
/v1/domain2/{id} | GET | Get by UUID |
Enveloped All /v1/* JSON uses the Response envelope: The template service wraps every JSON response in {header, payload}; accounting still returns bare bodies and RFC 9457 errors until the divergence is resolved..
Authorization is not wired in the template service yet — endpoints are open aside from
Idempotency-Key on writes. Audit columns use a placeholder actor (system).
Headers
| Header | Required | Purpose |
|---|---|---|
Idempotency-Key | POST only | Stable across retries |
Content-Type | POST | application/json |
OpenAPI
Generated from Go handler types and served at runtime. Merged platform spec excludes template today
(DEPLOYED_SERVICES in the Makefile).
Source: services/template/openapi.yaml.