← Back to Library

Template-Store API

api ·  integrators
apitemplate-storewip-v1

Template-Store API

What it is. The template-store owns WIP's document schemas (templates): field definitions, identity_fields, cross-field validation rules, template inheritance (extends), and the entity/reference/relationship usage classes. It registers new templates with the registry to get a template_id, tracks a version history per template_id, and exposes activation (draft → active), deactivation/reactivation, cascade-to-children, and relationship-endpoint widening. (components/template-store/src/template_store/api/templates.py; schemas/template-store.json)

Reaching it. Base path /api/template-store/templates (the service mounts an api_router with prefix /api/template-store and includes the templates router, itself prefixed /templatescomponents/template-store/src/template_store/api/__init__.py). Every route under /templates carries dependencies=[Depends(require_api_key)] at the router level (templates.py:36-40), and the schema declares a global ApiKeyAuth (X-API-Key header) security scheme (schemas/template-store.json). See also: Auth & Access; Routing & Ingress.

Conventions that apply.

See also: API Conventions; PoNIFs.

Endpoints

Listed in router-registration order (templates.py).

POST /api/template-store/templates

GET /api/template-store/templates

GET /api/template-store/templates/stamp

GET /api/template-store/templates/{template_id}

GET /api/template-store/templates/{template_id}/raw

GET /api/template-store/templates/by-value/{value}

GET /api/template-store/templates/by-value/{value}/raw

GET /api/template-store/templates/by-value/{value}/versions

GET /api/template-store/templates/by-value/{value}/versions/{version}

GET /api/template-store/templates/{template_id}/versions

PUT /api/template-store/templates

GET /api/template-store/templates/{template_id}/dependencies

DELETE /api/template-store/templates

POST /api/template-store/templates/{template_id}/validate

POST /api/template-store/templates/{template_id}/activate

POST /api/template-store/templates/{template_id}/reactivate

POST /api/template-store/templates/{template_id}/cascade

POST /api/template-store/templates/{template_id}/endpoints

GET /api/template-store/templates/{template_id}/children

GET /api/template-store/templates/{template_id}/descendants

The schema (schemas/template-store.json) also lists standard operational endpoints tagged Health: GET /, GET /health, GET /api/template-store/health, GET /ready, GET /health/integrity. These aren't part of the Templates resource and their route module isn't under components/template-store/src/**/api/ (this doc's scope), so they're noted here rather than documented as full endpoint entries — see the ⚠ GAP below.

⚠ GAP: the health/readiness route module (root /, /health, /ready, /health/integrity) isn't in this doc's source_scope (only components/template-store/src/**/api/ is), so their auth requirement and implementation can't be verified against code — only their shape as recorded in schemas/template-store.json is confirmed.

Store-specific gotchas

See also

Generated from real source code, not hand-written — see the WIP Technical Library.