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:
| Field | Type | Required | Constraints |
|---|---|---|---|
machine_identifier | string | Yes | Must match a registered machine |
timestamp | string | Yes | ISO 8601 UTC, max 5 min future, max 3,650 days past |
metric_name | string | Yes | Max 255 characters |
value | number | Yes | Must be finite (no NaN/Infinity) |
unit | string | Yes | Unit label (e.g., celsius, mm/s, psi) |
raw_tag | string | No | Original 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"
}
]
}
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
start | datetime | - | Start of time range (ISO 8601 UTC) |
end | datetime | - | End of time range |
metric | string | - | Filter by metric name (max 255 chars) |
interval | string | - | 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}
]
}
]
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.
| Category | Units |
|---|---|
| Temperature | celsius, fahrenheit, kelvin |
| Pressure | psi, bar, kpa, atm |
| Vibration | mm/s, in/s |