Skip to content

Comfly REST API Reference

Overview

The Comfly platform (formerly Altuxo CCM) exposes a comprehensive REST API for document generation, template management, and communication delivery. This is the public API reference, covering the endpoints available to all integrators.

Enterprise API

Administrative and infrastructure endpoints (resource lifecycle, channels, environments, users & roles, and system operations) are documented in the access-controlled Enterprise API reference.

Authentication

All API endpoints require the X-API-KEY header:

X-API-KEY: your-api-key

API keys are issued per tenant and can be managed through the Comfly administration interface.

Base URL

https://your-comfly-instance.com

Common Response Patterns

Paginated List

Most list endpoints return a Spring Page wrapper:

{
  "content": [ { "id": 1, "name": "..." } ],
  "totalElements": 42,
  "totalPages": 5,
  "size": 10,
  "number": 0
}

Validation Result

Create and update endpoints return a ValidationResultDto:

{
  "valid": true,
  "resource": { "id": 42, "name": "My Resource" },
  "errors": []
}

On validation failure:

{
  "valid": false,
  "resource": { "name": "" },
  "errors": [
    {
      "field": "name",
      "code": "NotBlank",
      "message": "must not be blank",
      "rejectedValue": ""
    }
  ]
}

Error Response

{
  "status": 400,
  "message": "Detailed error description"
}

Common Tasks

These pages provide task-oriented, cross-controller references for the two most common operations:

Page Description
Documents Generation Consolidated reference for all generation endpoints — synchronous, asynchronous, and preview — with full GenerationParams, AsyncGenerationParams, GenerationResult, OutputFormat, and OutputMode schemas
Communications Delivery Consolidated reference for all delivery endpoints — by template UUID, by template ID, and communication delivery properties — with DeliveryParams, OutputChannelType routing explained

API Pages

Templates

Page Description
Template Controllers Document generation, async generation, delivery, preview

The Template Controllers page covers:

  • TemplateController/api/templates
  • EmailTemplateController/api/email-templates
  • FopTemplateController/api/fop-templates
  • OfficeTemplateController/api/office-templates
  • ModificationTemplateController/api/modificationTemplates

Samples and Scripts

Page Description
Sample Controller Sample data management and retrieval
Script Controller Script management and compilation

Key Enumerations

OutputFormat

Value Content-Type Description
PDF application/pdf PDF output
HTML text/html HTML output
RAW application/octet-stream Raw/native format

OutputMode

Value Description
RAW Document bytes returned directly in the HTTP response body
BASE64 Document encoded as base64 string within a GenerationResult JSON
ARCHIVE Document routed to the archive output channel; no bytes in response

OutputChannelType

Value Description
FILE Write to a filesystem file path
ARCHIVE Archive the document
PREVIEW Generate a preview
SMTP Send via email
PRINTER Send to a printer
POST_PROC Route through a post-processing stage

ResourceType

Value Description
TEMPLATE HTML/document template
OFFICE_TEMPLATE DOCX/XLSX Office template
EMAIL_TEMPLATE Email template
FOP_TEMPLATE XSL-FO template
MODIFICATION_TEMPLATE Overlay/modification template
SAMPLE Sample data set
SCRIPT Groovy/Java script