Document Template Versions
4 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List a document template's version history (newest first)#
GET
/document-templates/{templateId}/versionsTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
templateIdPflicht | Pfad | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/document-templates/{templateId}/versions" \
-H "Authorization: Bearer $XISUITE_TOKEN"Manually snapshot the current template as a new version#
POST
/document-templates/{templateId}/versionsTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
templateIdPflicht | Pfad | string | – |
Antworten
- 201Erstellt
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/{templateId}/versions" \
-H "Authorization: Bearer $XISUITE_TOKEN"Get one version with its definition snapshot (read-only preview)#
GET
/document-templates/{templateId}/versions/{versionId}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
templateIdPflicht | Pfad | string | – |
versionIdPflicht | Pfad | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/document-templates/{templateId}/versions/{versionId}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Restore a version onto the live template (version-locked)#
POST
/document-templates/{templateId}/versions/{versionId}/restoreTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
templateIdPflicht | Pfad | string | – |
versionIdPflicht | Pfad | string | – |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
versionPflicht | number | Expected current template.version (optimistic lock). A mismatch → 409, so a concurrent edit is never silently overwritten. |
Antworten
- 201Erstellt
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/{templateId}/versions/{versionId}/restore" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"version":"3"}'