OEE
Overall Equipment Effectiveness (OEE) records capture a machine's production for a shift. A machine that names its production signals has its OEE measured from its own readings, and each finished shift is recorded for it; elsewhere, OEE records are submitted by hand. Haltless computes availability, performance, quality, and the combined OEE percentage, and rolls them up into summaries. All endpoints require a bearer JWT.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /api/v1/oee/records | Create an OEE record |
GET | /api/v1/oee/records | List OEE records for a machine |
GET | /api/v1/oee/summary | Averaged OEE summary for a machine |
GET | /api/v1/machines/{machine_id}/production-signals | A machine's production signals |
PUT | /api/v1/machines/{machine_id}/production-signals | Name a machine's production signals |
DELETE | /api/v1/machines/{machine_id}/production-signals | Stop measuring a machine |
POST | /api/v1/machines/{machine_id}/oee/measured | Measured OEE for the windows given |
GET | /api/v1/machines/{machine_id}/oee/measured/shifts | Measured OEE shift by shift |
Create a record
POST /api/v1/oee/records
Requires an operator or administrator role. Availability, performance, quality, and OEE percentages are computed from the inputs and returned in the response.
| Field | Type | Required | Description |
|---|---|---|---|
machine_id | uuid | Yes | Machine the record applies to |
shift_date | date | Yes | Shift date (YYYY-MM-DD) |
shift_definition_id | uuid | No | Shift this record belongs to |
planned_production_minutes | integer | Yes | Planned production time (> 0) |
downtime_minutes | integer | No | Downtime minutes (≥ 0, default 0, no more than planned_production_minutes) |
ideal_cycle_time_seconds | number | Yes | Ideal seconds per piece (> 0) |
total_count | integer | Yes | Total pieces produced (≥ 0) |
good_count | integer | Yes | Good pieces (≥ 0, no more than total_count) |
notes | string | No | Free-text notes |
{
"machine_id": "550e8400-e29b-41d4-a716-446655440000",
"shift_date": "2026-08-07",
"planned_production_minutes": 480,
"downtime_minutes": 36,
"ideal_cycle_time_seconds": 22.0,
"total_count": 1200,
"good_count": 1189
}
Response: 201 Created
{
"id": "c4d5...",
"machine_id": "550e8400-e29b-41d4-a716-446655440000",
"shift_date": "2026-08-07",
"shift_definition_id": null,
"planned_production_minutes": 480,
"downtime_minutes": 36,
"ideal_cycle_time_seconds": 22.0,
"total_count": 1200,
"good_count": 1189,
"notes": null,
"source": "manual",
"availability_pct": 92.5,
"performance_pct": 99.1,
"quality_pct": 99.08,
"oee_pct": 90.83,
"created_at": "2026-08-07T16:00:00Z"
}
Run time is the planned time less downtime (444 of 480 minutes here). Performance is ideal cycle time × total count over run time, capped at 100%: 22 s × 1200 ÷ 26,640 s = 99.1%. A machine or shift definition that is not yours is refused with 404.
List records
GET /api/v1/oee/records
| Parameter | Type | Required | Description |
|---|---|---|---|
machine_id | uuid | Yes | Machine to list records for |
from_date | date | No | Start date (YYYY-MM-DD) |
to_date | date | No | End date (YYYY-MM-DD) |
Returns an array of OEE records. source is manual for a record typed in, or measured for a shift recorded from the machine's signals.
Summary
GET /api/v1/oee/summary
| Parameter | Type | Required | Description |
|---|---|---|---|
machine_id | uuid | Yes | Machine to summarize |
days | integer | No | Lookback window (1–365, default 30) |
Response: 200 OK
{
"machine_id": "550e8400-e29b-41d4-a716-446655440000",
"period_days": 30,
"avg_availability_pct": 91.2,
"avg_performance_pct": 88.5,
"avg_quality_pct": 98.9,
"avg_oee_pct": 79.83,
"record_count": 28,
"daily_points": [
{
"shift_date": "2026-08-07",
"oee_pct": 80.01,
"availability_pct": 92.5,
"performance_pct": 87.3,
"quality_pct": 99.08
}
]
}
Production signals
A machine's production signals name the readings OEE is measured from. PUT requires an operator or administrator role with permission to change machines; GET returns null until they are named.
PUT /api/v1/machines/{machine_id}/production-signals
| Field | Type | Required | Description |
|---|---|---|---|
run_state_metric | string | Yes | The reading that says the machine is running |
running_above | number | No | Running while the run-state value is above this (default 0: suits 1/0 flags and speeds alike) |
total_count_metric | string | No | Counter of all parts made, for performance and quality |
good_count_metric | string | No | Counter of good parts, for quality; needs total_count_metric |
ideal_cycle_time_seconds | number | No | Ideal seconds per part, for performance |
min_stop_seconds | integer | No | Shorter stops are not logged (default 120, up to 3600) |
stops_enabled | boolean | No | Log automatic stops (default true) |
signal_on_change | boolean | No | The machine sends its run state only when it changes, so the last value holds (default false: a silence is time without a signal) |
{
"run_state_metric": "spindle_running",
"total_count_metric": "parts_total",
"good_count_metric": "parts_good",
"ideal_cycle_time_seconds": 22.0
}
The response repeats the settings and adds state: what the run state last said (running or stopped), since when, and when the automatic stop open now began, if one is. It is null until the first run-state reading after the signals were saved. Counters are read by their increases, so a counter that restarts from zero loses nothing.
Measured OEE
For given windows
POST /api/v1/machines/{machine_id}/oee/measured
Up to 31 windows (a shift or a day, each up to 24 hours, starting within the last 90 days), each with its time zone:
{
"windows": [
{ "start": "2026-11-12T06:00:00-06:00", "end": "2026-11-12T14:00:00-06:00" }
]
}
Response: 200 OK, each window measured, and overall for all of them together:
{
"machine_id": "550e8400-e29b-41d4-a716-446655440000",
"windows": [
{
"start": "2026-11-12T12:00:00Z",
"end": "2026-11-12T20:00:00Z",
"window_seconds": 28800,
"planned_seconds": 27000,
"signal_seconds": 27000,
"running_seconds": 24300,
"coverage_pct": 100.0,
"total_count": 1050,
"good_count": 1041,
"availability_pct": 90.0,
"performance_pct": 95.06,
"quality_pct": 99.14,
"oee_pct": 84.82,
"stop_count": 4
}
],
"overall": { "...": "the same fields, over every window" }
}
- Availability is running time over the planned time the signal covered. Planned time is the window less the
plannedstops logged in it. - Performance is ideal cycle time × parts made over running time.
- Quality is good parts over all parts.
A reading's state holds until the next reading for at most 15 minutes; a longer silence is time without a signal, reported in coverage_pct rather than counted as running or stopped. A percentage is null when what it needs is not named: performance without a part counter and an ideal cycle time, quality without a good-parts counter.
Shift by shift
GET /api/v1/machines/{machine_id}/oee/measured/shifts?days=7
The last days (1 to 90, default 7) measured shift by shift, newest first, with the shifts laid out in the plant's time zone. Each window adds shift_definition_id, shift_name, shift_color, shift_date (the plant's date the shift began on) and in_progress (still running, measured up to now). A company with no shift definitions gets whole days. The response also carries the timezone used and an overall.
Recorded shifts
For a machine that names all three parts (a run state, counters of all and of good parts, and an ideal cycle time), each shift is measured once it has ended (plus ten minutes for late readings) and recorded as an OEE record with source: "measured", once. The dashboard's fleet OEE, the Sites page, the summary and the shift comparison read these records with those typed in. A shift with no signal at all is not recorded.
The OEE calculation
OEE is the product of its three factors:
OEE = Availability x Performance x Quality
| Factor | Driven by |
|---|---|
| Availability | Planned production time versus downtime |
| Performance | Actual output versus the ideal cycle time |
| Quality | Good pieces versus total pieces |