templateVersions
Platform module · 6 operations
List template version rows
GET/template-versions
A version of a template (1032): the project defaults and ordered items. Edited while a draft; publishing (templateVersions.publish) freezes it and makes it the template's current version. Returns a cursor page of template version rows the caller may see. The default order is `template_id`, then `version_number` ascending. Supports sparse fieldsets and the filter grammar.
Create a template version
POST/template-versions
A version of a template (1032): the project defaults and ordered items. Edited while a draft; publishing (templateVersions.publish) freezes it and makes it the template's current version. Creates a template version. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.
Get a template version
GET/template-versions/{id}
A version of a template (1032): the project defaults and ordered items. Edited while a draft; publishing (templateVersions.publish) freezes it and makes it the template's current version. Returns one template version with its `ETag`. A template version the caller may not see returns 404.
Update a template version
PATCH/template-versions/{id}
A version of a template (1032): the project defaults and ordered items. Edited while a draft; publishing (templateVersions.publish) freezes it and makes it the template's current version. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.
Delete a template version
DELETE/template-versions/{id}
A version of a template (1032): the project defaults and ordered items. Edited while a draft; publishing (templateVersions.publish) freezes it and makes it the template's current version. Soft-deletes the template version: it moves to Trash and can be restored for its table's retention period.
Publish a template version
POST/template-versions/{id}/publish
Publishes a draft version (app.publish_template_version, projects.template.write): freezes it and makes it the template's current version. A published version answers 422 (template_version_published). Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.