Skip to main content

Reports

Download the built-in reports, build your own from a dataset with the columns and filters you choose, see what a report holds before you download it, and save reports to be sent on a schedule to people and notification channels. Every endpoint is authenticated with a Bearer JWT (see Authentication).

A report only ever covers the machines you may see. If your role or account is limited to some machine groups, every report, preview and saved report is limited to them too.

Endpoints​

MethodPathDescription
GET/api/v1/reports/fleet-summaryDownload the fleet summary (PDF)
GET/api/v1/reports/oeeDownload the OEE report (CSV or Excel)
GET/api/v1/reports/maintenanceDownload the maintenance report (CSV or Excel)
GET/api/v1/reports/downtimeDownload the downtime log (CSV or Excel)
GET/api/v1/reports/work-ordersDownload the work-orders report (CSV or Excel)
GET/api/v1/reports/previewWhat a built-in report holds, without generating it
POST/api/v1/reports/customBuild and download a custom report (CSV or Excel)
POST/api/v1/reports/custom/previewWhat a custom report holds, and its first rows
GET/api/v1/reports/templatesList saved reports
POST/api/v1/reports/templatesSave a report
PATCH/api/v1/reports/templates/{template_id}Change a saved report, its schedule or its recipients
DELETE/api/v1/reports/templates/{template_id}Delete a saved report
POST/api/v1/reports/templates/{template_id}/runSend a saved report now
GET/api/v1/reports/runsReports that were delivered and kept
GET/api/v1/reports/runs/{run_id}/downloadDownload a kept report

All report endpoints need the Reports page. Every role can download and preview reports. Saving, changing, deleting and sending saved reports takes the admin or operator role.

Custom reports, saved reports and their schedules are part of the Advanced Reports feature. A company without it gets 403 ("This feature is not included for your organization.") on /custom, /custom/preview and /templates. The built-in downloads, /preview and /runs stay available.

Built-in downloads, custom reports and sends of saved reports share a small additional cap of 10 per minute for your company, on top of the standard limits (see Rate Limiting).

Built-in reports​

Each download takes a days window and, for the tables, a format, and streams the file.

ParameterTypeDefaultDescription
daysint30Days to include, 1–365
formatstringcsvcsv or xlsx. Not taken by the fleet summary, which is always a PDF
curl -o downtime-30d.xlsx \
"https://api.haltless.io/api/v1/reports/downtime?days=30&format=xlsx" \
-H "Authorization: Bearer YOUR_TOKEN"
PathFormatsFile name
/api/v1/reports/fleet-summaryPDFfleet-summary-30d.pdf
/api/v1/reports/oeeCSV, Exceloee-report-30d.csv
/api/v1/reports/maintenanceCSV, Excelmaintenance-30d.csv
/api/v1/reports/downtimeCSV, Exceldowntime-30d.csv
/api/v1/reports/work-ordersCSV, Excelwork-orders-30d.csv

Asking for a table as pdf is refused with 422.

Content types​

FormatContent type
pdfapplication/pdf
csvtext/csv (UTF-8 with a byte-order mark, so Excel opens it with the right encoding)
xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Excel workbooks​

An Excel report is one sheet with a bold, frozen header row and a filter on every column. Dates and times are real date cells (in UTC), and numbers are numbers, so the sheet sorts and sums without conversion. A value that starts like a formula (=, +, -, @) is stored as text and is never run; the CSV files escape such values the same way.

Preview a built-in report​

GET /api/v1/reports/preview?report_type=downtime&days=30

Counts only, so it is cheap enough to call as a window is adjusted.

{
"report_type": "downtime",
"days": 30,
"row_count": 412,
"machine_count": 18,
"period_start": "2026-10-15T12:00:00Z",
"period_end": "2026-11-14T12:00:00Z",
"columns": ["ID", "Machine ID", "Machine Name", "Started At", "Ended At", "Duration (min)", "Reason Type", "Notes"]
}

row_count is the rows the file would carry (for the fleet summary, the machines it lists). report_type is one of fleet, oee, maintenance, downtime or work_orders; a custom report is previewed with POST /api/v1/reports/custom/preview.

Custom reports​

A custom report is a dataset, the columns you choose in the order you want them, filters on the dataset's own fields, and optionally the machines (and, for metric summaries, the metrics) to cover.

Build and download​

POST /api/v1/reports/custom

{
"definition": {
"dataset": "work_orders",
"columns": ["created_at", "machine", "title", "status", "priority", "assignee"],
"filters": { "status": ["open", "in_progress"], "priority": ["high", "critical"] },
"machine_ids": [],
"metrics": []
},
"days": 30,
"format": "xlsx"
}
FieldTypeDescription
definition.datasetstringOne of the datasets below
definition.columnsstring[]1–20 of the dataset's columns, in file order, none twice
definition.filtersobjectFilter name to the values allowed. An absent or empty filter allows everything
definition.machine_idsUUID[]Only these machines (up to 200). Empty means every machine you may see; a machine outside your scope narrows nothing
definition.metricsstring[]metrics dataset only: only these metrics (up to 50). Empty means all
daysint1–365, default 30
formatstringcsv (default) or xlsx

The file is named after its dataset and window, for example work-orders-report-30d.xlsx. Rows are newest first. A report holds at most 20,000 rows; past that the newest are kept and the preview says so.

A column, filter or value the dataset does not have is refused with 422, rather than silently dropped.

Datasets​

DatasetOne row perColumns (defaults in bold)Filters
alertsAlert raised in the periodraised_at, machine, severity, metric, value, threshold, message, state, acknowledged_at, resolved_atseverity: info, warning, critical; state: open, acknowledged, resolved
work_ordersWork order created in the periodcreated_at, machine, title, status, priority, assignee, due_date, completed_at, fix_check, completion_notesstatus: open, in_progress, completed, cancelled; priority: low, medium, high, critical
downtimeStop that started in the periodstarted_at, ended_at, machine, duration_minutes, category, reason, note, sourcecategory: planned, unplanned, changeover, maintenance; source: manual, automatic
maintenanceMaintenance event scheduled from the start of the period on (done or planned)scheduled_start, scheduled_end, machine, title, status, by_use, created_atstatus: scheduled, in_progress, completed, cancelled
oeeMachine and shift dayshift_date, machine, availability, performance, quality, oee, planned_minutes, downtime_minutes, total_count, good_count, sourcesource: manual, measured
metricsMachine and metricmachine, metric, unit, readings, minimum, average, maximum, first_at, last_atmetrics (by name)

Percentages (availability, performance, quality, oee) are 0–100 with two decimal places. The metrics dataset summarises readings, and looks back at most 90 days whatever days is. by_use is yes for maintenance due by running hours, cycles or starts rather than by the calendar.

The column headers in the file are the dataset's English names (Raised, Machine, Duration (min), …), as columns in the preview shows.

Preview a custom report​

POST /api/v1/reports/custom/preview takes the same body and returns the counts and the first five rows, as the CSV would read them:

{
"days": 30,
"row_count": 23847,
"machine_count": 11,
"truncated": true,
"period_start": "2026-10-15T12:00:00Z",
"period_end": "2026-11-14T12:00:00Z",
"columns": ["Created", "Machine", "Title", "Status"],
"sample": [
["2026-11-14 07:42", "Press 4", "Replace the spindle bearing", "in_progress"]
]
}

truncated is true when more rows match than a report holds (row_count is then the 20,000 kept).

Saved reports​

A saved report keeps what to run (type, window, format and, for a custom report, its definition) and, optionally, where and when to send it.

List saved reports​

GET /api/v1/reports/templates lists the saved reports you could run: those covering only machines you may see.

[
{
"id": "...",
"tenant_id": "...",
"created_by": "USER_UUID",
"name": "Open high-priority work",
"report_type": "custom",
"days": 7,
"format": "xlsx",
"definition": {
"dataset": "work_orders",
"columns": ["created_at", "machine", "title", "priority"],
"filters": { "status": ["open"], "priority": ["high", "critical"] },
"machine_ids": [],
"metrics": []
},
"schedule": "weekly",
"recipients": ["maintenance-leads@example.com"],
"send_at_time": "07:00:00",
"send_at_timezone": "Europe/Berlin",
"channel_ids": [],
"last_sent_at": "2026-11-09T06:00:00Z",
"next_due_at": "2026-11-16T06:00:00Z",
"created_at": "2026-08-01T09:00:00Z"
}
]

Save a report​

POST /api/v1/reports/templates

FieldTypeDescription
namestringUp to 100 characters
report_typestringfleet, oee, maintenance, downtime, work_orders or custom
daysint1–365, default 30
formatstringpdf for the fleet summary; csv (default) or xlsx for every other type
definitionobjectRequired for custom, refused for every other type. As for custom reports
schedulestring | nulldaily, weekly or monthly; null (default) runs only on demand
recipientsstring[]Up to 25 email addresses
channel_idsUUID[]Notification channels it is also delivered to (up to 25)
send_at_timestringLocal time it goes out, HH:MM:SS, default 08:00:00
send_at_timezonestringThe IANA zone that time is in, default UTC

A scheduled report needs at least one recipient or channel. An account holds at most 50 saved reports; past that, 422. Every channel in channel_ids must be an active channel of your company that can carry a file, otherwise 422.

A saved report is generated with its owner's data scope (the person who last saved it), so it never covers more than they may see.

Change a saved report​

PATCH /api/v1/reports/templates/{template_id} takes any of the fields above; only those sent are written. "schedule": null puts a scheduled report back to on demand. Type, format and definition are checked together once merged: changing a custom report to another type drops its definition, and changing a report to custom needs one.

Changing, deleting or sending a report that covers machines you cannot see is refused with 403. A report whose owner has left is taken over by whoever saves it next; sending such a report returns 409 until someone saves it, and anyone who may delete reports can delete it.

Delete a saved report​

DELETE /api/v1/reports/templates/{template_id} returns 204.

Send a saved report now​

POST /api/v1/reports/templates/{template_id}/run generates the report and sends it to its recipients and channels:

{ "run_id": "...", "emails": 2, "recipients": 3, "channels": 1, "channels_configured": 1 }

emails of recipients and channels of channels_configured say what was actually reached. A report with nowhere to send is refused with 422; one that could not be generated answers 502.

Delivered reports​

Every report that is sent is kept for 90 days, so a channel that cannot carry a file can link to it, and a lost email can be fetched again.

GET /api/v1/reports/runs lists them, newest first (those covering only machines you may see):

[
{
"id": "...",
"template_id": "...",
"name": "Open high-priority work",
"report_type": "custom",
"days": 7,
"format": "xlsx",
"filename": "work-orders-report-7d.xlsx",
"size_bytes": 18234,
"delivered_count": 3,
"is_available": true,
"created_at": "2026-11-09T06:00:00Z",
"expires_at": "2027-02-07T06:00:00Z"
}
]

GET /api/v1/reports/runs/{run_id}/download returns the file. 404 if there is no such run (or it covers machines you cannot see); 410 once its file is gone, or when it was delivered without a copy being kept (is_available: false).