Skip to main content

Sensor Data & Ingestion

Push sensor readings and query time-series data from your machines.

Batch ingestion

POST /ingest

Auth: API Key (X-API-Key header)

Push up to 1,000 readings in a single request.

curl -X POST https://api.haltless.io/api/v1/ingest \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"readings": [
{
"machine_identifier": "CNC-001",
"timestamp": "2026-04-04T10:30:00Z",
"metric_name": "temperature",
"value": 72.5,
"unit": "celsius"
},
{
"machine_identifier": "CNC-001",
"timestamp": "2026-04-04T10:30:00Z",
"metric_name": "vibration",
"value": 3.2,
"unit": "mm/s",
"raw_tag": "ns2_i1002"
}
]
}'

Reading fields:

FieldTypeRequiredConstraints
machine_identifierstringYesMust match a registered machine
timestampstringYesISO 8601 UTC, max 5 min future, max 3,650 days past
metric_namestringYesMax 255 characters
valuenumberYesMust be finite (no NaN/Infinity)
unitstringYesUnit label (e.g., celsius, mm/s, psi)
raw_tagstringNoOriginal tag name from source system

Response 207:

{
"accepted_count": 2,
"rejected_count": 0,
"errors": []
}

Error example:

{
"accepted_count": 1,
"rejected_count": 1,
"errors": [
{
"index": 1,
"machine_identifier": "UNKNOWN-001",
"error": "Machine not found"
}
]
}
tip

Batch your readings for efficiency. One request with 100 readings is much more efficient than 100 individual requests.

Latest readings

GET /machines/{machine_id}/readings/latest

Auth: Bearer JWT (any role)

Returns the most recent value for each metric on a machine.

curl https://api.haltless.io/api/v1/machines/MACHINE_ID/readings/latest \
-H "Authorization: Bearer YOUR_TOKEN"
{
"machine_id": "...",
"readings": [
{
"metric_name": "temperature",
"value": 72.5,
"unit": "celsius",
"timestamp": "2026-04-04T10:30:00Z"
},
{
"metric_name": "vibration",
"value": 3.2,
"unit": "mm/s",
"timestamp": "2026-04-04T10:30:00Z"
}
]
}

Time-series query

GET /machines/{machine_id}/readings

Auth: Bearer JWT (any role)

Query historical readings with optional time aggregation.

ParameterTypeDefaultDescription
startdatetime-Start of time range (ISO 8601 UTC)
enddatetime-End of time range
metricstring-Filter by metric name (max 255 chars)
intervalstring-Aggregation interval: 1m, 5m, 15m, 1h, 6h, 1d
curl "https://api.haltless.io/api/v1/machines/MACHINE_ID/readings?metric=temperature&interval=5m&start=2026-04-04T00:00:00Z&end=2026-04-04T12:00:00Z" \
-H "Authorization: Bearer YOUR_TOKEN"
[
{
"metric_name": "temperature",
"unit": "celsius",
"data": [
{"timestamp": "2026-04-04T00:00:00Z", "value": 71.2},
{"timestamp": "2026-04-04T00:05:00Z", "value": 72.1},
{"timestamp": "2026-04-04T00:10:00Z", "value": 72.8}
]
}
]
info

The maximum query range is 90 days. For longer periods, make multiple paginated requests.

Machine summary

GET /machines/{machine_id}/summary

Auth: Bearer JWT (any role)

Returns aggregated stats for a machine.

Tag mappings

GET /machines/{machine_id}/tag-mappings

Auth: Bearer JWT (any role)

Returns all tag-to-metric mappings for a machine.

Auto-map tags (AI)

POST /tag-mappings/auto-map

Auth: Bearer JWT (admin, operator)

Uses AI to suggest standardized metric names for raw tags.

{
"tags": [
{"machine_id": "uuid", "raw_tag": "ns2_i1001_temp_motor_1"}
]
}

Update a mapping

PATCH /tag-mappings/{mapping_id}

{"standardized_name": "motor_temperature", "unit": "celsius"}

Confirm a mapping

POST /tag-mappings/{mapping_id}/confirm

Metric baselines

GET /machines/{machine_id}/baselines

Auth: Bearer JWT (any role)

Returns computed baselines (mean, std_dev) for each metric. Baselines are auto-calculated over a 7-day window with a minimum of 30 samples.

Supported units

GET /units/supported

Auth: None required

Returns all supported unit types and conversion capabilities.

CategoryUnits
Temperaturecelsius, fahrenheit, kelvin
Pressurepsi, bar, kpa, atm
Vibrationmm/s, in/s