REST API

Integrate DataPallas programmatically using the REST API — burst documents, generate reports, manage connections, and monitor jobs.


Overview

DataPallas provides a REST API that covers every operation available in the UI and CLI. Use it to integrate report processing into your own applications, scripts, and workflows.

The REST API and CLI are two interfaces to the same engine — both produce identical results. Use the CLI for shell scripts and cron jobs. Use the REST API for programmatic integration from applications.

Interactive API Reference

When DataPallas Server is running, the full API reference is available at:

Both are auto-generated from the server code and always reflect the current API surface.

API Domains

DomainBase PathPurpose
Jobs/api/jobsBurst, generate, merge documents. Monitor and control running jobs.
Reports/api/reportsManage report configurations — create, edit, delete, duplicate.
Connections/api/connectionsDatabase and email connections — CRUD, test, schema exploration.
Analytics/api/analyticsServer-side OLAP pivot queries (DuckDB, ClickHouse).
Queries/api/queriesAd-hoc SQL execution and schema exploration.
Starter Packs/api/starter-packsStart/stop database instances and Docker apps.
System/api/systemSystem info, service status, diagnostics.
License/api/licenseLicense activation and management.

Examples

All examples below use sample files that ship with DataPallas — start the server and run them directly.

Burst a PDF into Individual Payslips

curl -X POST http://localhost:9090/api/jobs/burst \
  -H "Content-Type: application/json" \
  -d '{"inputFile": "samples/burst/Payslips.pdf", "reportId": "split-only"}'

Burst an Excel File by Distinct Sheets

curl -X POST http://localhost:9090/api/jobs/burst \
  -H "Content-Type: application/json" \
  -d '{"inputFile": "samples/burst/Payslips-Distinct-Sheets.xls", "reportId": "split-only"}'

Generate DOCX Reports from CSV

curl -X POST http://localhost:9090/api/jobs/generate \
  -H "Content-Type: application/json" \
  -d '{"reportId": "g-csv2docx", "input": "samples/reports/payslips/Payslips.csv"}'

Generate HTML Reports from SQL Query

curl -X POST http://localhost:9090/api/jobs/generate \
  -H "Content-Type: application/json" \
  -d '{"reportId": "g-sql2htm-cst-stmt"}'

Generate with Ad-Hoc Parameters

curl -X POST http://localhost:9090/api/jobs/generate \
  -H "Content-Type: application/json" \
  -d '{"reportId": "g-scr2pdf-adhoc", "params": {"EmployeeID": "E001", "FirstName": "John", "LastName": "Doe"}}'

Merge and Burst

# Step 1: Prepare the file list
curl -X POST http://localhost:9090/api/jobs/merge/prepare-list \
  -H "Content-Type: application/json" \
  -d '{"filePaths": ["samples/burst/Invoices-Oct.pdf", "samples/burst/Invoices-Nov.pdf", "samples/burst/Invoices-Dec.pdf"]}'
# Returns: {"listFile": "temp/merge-files-abc123"}
 
# Step 2: Merge and burst the result
curl -X POST http://localhost:9090/api/jobs/merge \
  -H "Content-Type: application/json" \
  -d '{"listFile": "temp/merge-files-abc123", "outputName": "merged.pdf", "burst": true, "reportId": "split-only"}'

Dry Run (Test Without Distributing)

curl -X POST http://localhost:9090/api/jobs/burst \
  -H "Content-Type: application/json" \
  -d '{"inputFile": "samples/burst/Payslips.pdf", "reportId": "split-only", "testAll": true}'

Check System Info

curl http://localhost:9090/api/system/info

Key Concepts

reportId

Most endpoints use reportId instead of file paths. The reportId is the folder name of your report configuration (e.g., monthly-invoices, customer-statements). The server resolves it to the correct settings file internally.

Asynchronous Execution

Job endpoints (/api/jobs/burst, /api/jobs/generate, /api/jobs/merge) return immediately with {"status": "submitted"}. The job runs in the background. Monitor progress via:

  • WebSocket at /api/ws (topic: /topic/execution-stats) — real-time status updates
  • Job files — the server creates .job files in temp/ while processing; they're removed on completion

Input Files

The inputFile parameter accepts both relative paths (resolved against the DataPallas installation directory) and absolute paths — same as the CLI.

Tip: Check the output/ folder after each command to see the generated files.

See Also