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
| Method | Path | Description |
|---|---|---|
GET | /api/v1/reports/fleet-summary | Download the fleet summary (PDF) |
GET | /api/v1/reports/oee | Download the OEE report (CSV or Excel) |
GET | /api/v1/reports/maintenance | Download the maintenance report (CSV or Excel) |
GET | /api/v1/reports/downtime | Download the downtime log (CSV or Excel) |
GET | /api/v1/reports/work-orders | Download the work-orders report (CSV or Excel) |
GET | /api/v1/reports/preview | What a built-in report holds, without generating it |
POST | /api/v1/reports/custom | Build and download a custom report (CSV or Excel) |
POST | /api/v1/reports/custom/preview | What a custom report holds, and its first rows |
GET | /api/v1/reports/templates | List saved reports |
POST | /api/v1/reports/templates | Save 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}/run | Send a saved report now |
GET | /api/v1/reports/runs | Reports that were delivered and kept |
GET | /api/v1/reports/runs/{run_id}/download | Download 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
days | int | 30 | Days to include, 1–365 |
format | string | csv | csv 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"
| Path | Formats | File name |
|---|---|---|
/api/v1/reports/fleet-summary | fleet-summary-30d.pdf | |
/api/v1/reports/oee | CSV, Excel | oee-report-30d.csv |
/api/v1/reports/maintenance | CSV, Excel | maintenance-30d.csv |
/api/v1/reports/downtime | CSV, Excel | downtime-30d.csv |
/api/v1/reports/work-orders | CSV, Excel | work-orders-30d.csv |
Asking for a table as pdf is refused with 422.
Content types
| Format | Content type |
|---|---|
pdf | application/pdf |
csv | text/csv (UTF-8 with a byte-order mark, so Excel opens it with the right encoding) |
xlsx | application/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"
}
| Field | Type | Description |
|---|---|---|
definition.dataset | string | One of the datasets below |
definition.columns | string[] | 1–20 of the dataset's columns, in file order, none twice |
definition.filters | object | Filter name to the values allowed. An absent or empty filter allows everything |
definition.machine_ids | UUID[] | Only these machines (up to 200). Empty means every machine you may see; a machine outside your scope narrows nothing |
definition.metrics | string[] | metrics dataset only: only these metrics (up to 50). Empty means all |
days | int | 1–365, default 30 |
format | string | csv (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
| Dataset | One row per | Columns (defaults in bold) | Filters |
|---|---|---|---|
alerts | Alert raised in the period | raised_at, machine, severity, metric, value, threshold, message, state, acknowledged_at, resolved_at | severity: info, warning, critical; state: open, acknowledged, resolved |
work_orders | Work order created in the period | created_at, machine, title, status, priority, assignee, due_date, completed_at, fix_check, completion_notes | status: open, in_progress, completed, cancelled; priority: low, medium, high, critical |
downtime | Stop that started in the period | started_at, ended_at, machine, duration_minutes, category, reason, note, source | category: planned, unplanned, changeover, maintenance; source: manual, automatic |
maintenance | Maintenance event scheduled from the start of the period on (done or planned) | scheduled_start, scheduled_end, machine, title, status, by_use, created_at | status: scheduled, in_progress, completed, cancelled |
oee | Machine and shift day | shift_date, machine, availability, performance, quality, oee, planned_minutes, downtime_minutes, total_count, good_count, source | source: manual, measured |
metrics | Machine and metric | machine, metric, unit, readings, minimum, average, maximum, first_at, last_at | metrics (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
| Field | Type | Description |
|---|---|---|
name | string | Up to 100 characters |
report_type | string | fleet, oee, maintenance, downtime, work_orders or custom |
days | int | 1–365, default 30 |
format | string | pdf for the fleet summary; csv (default) or xlsx for every other type |
definition | object | Required for custom, refused for every other type. As for custom reports |
schedule | string | null | daily, weekly or monthly; null (default) runs only on demand |
recipients | string[] | Up to 25 email addresses |
channel_ids | UUID[] | Notification channels it is also delivered to (up to 25) |
send_at_time | string | Local time it goes out, HH:MM:SS, default 08:00:00 |
send_at_timezone | string | The 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).