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:
- Swagger UI: http://localhost:9090/swagger-ui.html — interactive documentation with "Try it out" buttons
- OpenAPI Spec: http://localhost:9090/v3/api-docs — machine-readable JSON (OpenAPI 3.0) for code generation tools, Postman/Insomnia import, and CI/CD contract validation
Both are auto-generated from the server code and always reflect the current API surface.
API Domains
| Domain | Base Path | Purpose |
|---|---|---|
| Jobs | /api/jobs | Burst, generate, merge documents. Monitor and control running jobs. |
| Reports | /api/reports | Manage report configurations — create, edit, delete, duplicate. |
| Connections | /api/connections | Database and email connections — CRUD, test, schema exploration. |
| Analytics | /api/analytics | Server-side OLAP pivot queries (DuckDB, ClickHouse). |
| Queries | /api/queries | Ad-hoc SQL execution and schema exploration. |
| Starter Packs | /api/starter-packs | Start/stop database instances and Docker apps. |
| System | /api/system | System info, service status, diagnostics. |
| License | /api/license | License 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/infoKey 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
.jobfiles intemp/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
- CLI Reference — command-line interface for shell scripts
- cURL Integration — more cURL examples
- Swagger UI — interactive API explorer (requires running server)