Document Templates
15 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List document templates#
GET/document-templatesToken Parameter
| Name | Ort | Typ | Beschreibung |
|---|
search | Query | string | – |
source_entity | Query | string | Werte: tasksprocesseswikilistsdashboardsboardsplansautomationsassetsfile_explorerform_builder |
include_archived | Query | boolean | – |
page | Query | number | – |
pageSize | Query | number | – |
Antworten
- 200Template list with pagination metadata.
- 403Document Designer module disabled or insufficient permissions.
curl -X GET "https://xapi.ambertech.cloud/api/v1/document-templates" \
-H "Authorization: Bearer $XISUITE_TOKEN"
Create a document template#
POST/document-templatesToken Request-Bodyapplication/jsonCreateDocumentTemplateDto
| Name | Typ | Beschreibung |
|---|
namePflicht | string | Beispiel: Task Status Report |
description | object | – |
source_entityPflicht | string | Werte: tasksprocesseswikilistsdashboardsboardsplansautomationsassetsfile_explorerform_builder |
modePflicht | string | Werte: repeat_per_itemfixed_document |
definitionPflicht | object | Template definition JSON (schemaVersion 1); deep-validated by the service against the zod contract. |
Antworten
- 201Template created.
- 400Invalid payload or template definition.
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Task Status Report","source_entity":"tasks","mode":"repeat_per_item","definition":{}}'
Get a document template by ID#
GET/document-templates/{id}Token Parameter
| Name | Ort | Typ | Beschreibung |
|---|
idPflicht | Pfad | string | – |
Antworten
- 200Template row.
- 404Template not found.
curl -X GET "https://xapi.ambertech.cloud/api/v1/document-templates/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"
Update a document template#
PATCH/document-templates/{id}Token Parameter
| Name | Ort | Typ | Beschreibung |
|---|
idPflicht | Pfad | string | – |
Request-Bodyapplication/jsonUpdateDocumentTemplateDto
| Name | Typ | Beschreibung |
|---|
name | string | – |
description | object | – |
source_entity | string | Werte: tasksprocesseswikilistsdashboardsboardsplansautomationsassetsfile_explorerform_builder |
mode | string | Werte: repeat_per_itemfixed_document |
definition | object | Template definition JSON; re-validated by the service when present. |
is_archived | boolean | – |
Antworten
- 200Updated template row.
- 400Invalid payload or template definition.
- 404Template not found.
curl -X PATCH "https://xapi.ambertech.cloud/api/v1/document-templates/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"…","description":{},"source_entity":"tasks"}'
Delete a document template#
DELETE/document-templates/{id}Token Parameter
| Name | Ort | Typ | Beschreibung |
|---|
idPflicht | Pfad | string | – |
Antworten
- 200Template deleted.
- 404Template not found.
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/document-templates/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"
Duplicate a document template#
POST/document-templates/{id}/duplicateToken Parameter
| Name | Ort | Typ | Beschreibung |
|---|
idPflicht | Pfad | string | – |
Request-Bodyapplication/jsonDuplicateDocumentTemplateDto
| Name | Typ | Beschreibung |
|---|
name | string | Name for the copy. Defaults to "<name> (Copy)". |
Antworten
- 201Duplicated template row.
- 404Template not found.
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/{id}/duplicate" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"…"}'
Upload an image for an image element (max 5 MB, JPEG/PNG/GIF/WEBP)#
POST/document-templates/{id}/imagesToken Parameter
| Name | Ort | Typ | Beschreibung |
|---|
idPflicht | Pfad | string | – |
Request-Bodymultipart/form-data
| Name | Typ | Beschreibung |
|---|
filePflicht | string (binary) | – |
Antworten
- 201Image uploaded — bucket + path returned.
- 400No file, too large, or invalid MIME type.
- 404Template not found.
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/{id}/images" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-F "file=@./datei.pdf"
Sign a batch of storage-kind image sources for canvas display#
POST/document-templates/{id}/images/resolveToken Parameter
| Name | Ort | Typ | Beschreibung |
|---|
idPflicht | Pfad | string | – |
Request-Bodyapplication/jsonResolveImagesDto
Keine Felder dokumentiert.
Antworten
- 200Signed URLs keyed by "bucket/path" (empty string if unresolved).
- 404Template not found.
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/{id}/images/resolve" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Render a preview of a stored template's definition#
POST/document-templates/{id}/previewToken Parameter
| Name | Ort | Typ | Beschreibung |
|---|
idPflicht | Pfad | string | – |
Request-Bodyapplication/jsonPreviewDocumentDto
| Name | Typ | Beschreibung |
|---|
definition | object | Template definition to preview. Required for POST /preview; ignored for POST /:id/preview (the stored definition is used). |
scope | object | Item scope: { savedFilterId } | { query, source_space_ids } | { ids }. Defaults to the first permitted items of the entity. |
itemLimit | number | Standard: 3 |
Antworten
- 200Rendered preview ({ html, itemCount, warnings }).
- 404Template not found.
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/{id}/preview" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"definition":{},"scope":{},"itemLimit":0}'
List bindable fields and relation types for the designer#
GET/document-templates/bindable-fieldsToken Parameter
| Name | Ort | Typ | Beschreibung |
|---|
source_entityPflicht | Query | string | Werte: tasksprocesseswikilistsdashboardsboardsplansautomationsassetsfile_explorerform_builder |
space_ids | Query | string | Comma-separated space UUIDs to scope space custom fields. |
Antworten
- 200Bindable field catalog ({ fields, relationTypes }).
- 400Invalid source_entity.
curl -X GET "https://xapi.ambertech.cloud/api/v1/document-templates/bindable-fields" \
-H "Authorization: Bearer $XISUITE_TOKEN"
Delete several document templates#
POST/document-templates/bulk-deleteToken Request-Bodyapplication/jsonBulkDocumentTemplateIdsDto
| Name | Typ | Beschreibung |
|---|
idsPflicht | string[] | – |
Antworten
- 200Deleted ids and ids that failed ({ succeeded, failed }).
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/bulk-delete" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ids":[]}'
Archive or restore several document templates#
POST/document-templates/bulk-updateToken Request-Bodyapplication/jsonBulkUpdateDocumentTemplatesDto
| Name | Typ | Beschreibung |
|---|
idsPflicht | string[] | – |
is_archivedPflicht | boolean | true archives, false restores. |
Antworten
- 200Updated ids and ids that failed ({ succeeded, failed }).
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/bulk-update" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ids":[],"is_archived":true}'
Render an ad-hoc definition preview#
POST/document-templates/previewToken Request-Bodyapplication/jsonPreviewDocumentDto
| Name | Typ | Beschreibung |
|---|
definition | object | Template definition to preview. Required for POST /preview; ignored for POST /:id/preview (the stored definition is used). |
scope | object | Item scope: { savedFilterId } | { query, source_space_ids } | { ids }. Defaults to the first permitted items of the entity. |
itemLimit | number | Standard: 3 |
Antworten
- 200Rendered preview ({ html, itemCount, warnings }).
- 400Invalid definition or scope.
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/preview" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"definition":{},"scope":{},"itemLimit":0}'
List the built-in starter template catalog#
GET/document-templates/starter-templatesToken Antworten
curl -X GET "https://xapi.ambertech.cloud/api/v1/document-templates/starter-templates" \
-H "Authorization: Bearer $XISUITE_TOKEN"
Create a document template from a starter catalog entry#
POST/document-templates/starter-templates/{key}/useToken Parameter
| Name | Ort | Typ | Beschreibung |
|---|
keyPflicht | Pfad | string | – |
Request-Bodyapplication/jsonDuplicateDocumentTemplateDto
| Name | Typ | Beschreibung |
|---|
name | string | Name for the copy. Defaults to "<name> (Copy)". |
Antworten
- 201Template created from the starter entry.
- 404Unknown starter template key.
curl -X POST "https://xapi.ambertech.cloud/api/v1/document-templates/starter-templates/{key}/use" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"…"}'