REST API · v1.0

DiagAI API

Integrate DiagAI directly into your MES, SCADA, or CMMS. Push sensor readings, retrieve anomaly alerts, and manage maintenance tasks programmatically.

Quick start — ingest a reading

# Push a sensor reading
curl -X POST https://rca-backend-5jlv.onrender.com/api/sensor/ingest \
-H "Content-Type: application/json" \
-d '{
"machine_id": "eq-001",
"air_temperature": 298.1,
"process_temperature": 308.6,
"rotational_speed": 1551,
"torque": 42.8,
"tool_wear": 0,
"machine_type": "M"
'}'
# Response
{
"ensemble_score": 0.49,
"is_anomaly": false,
"severity": "normal"
}

Endpoints

POSTCore
/api/sensor/ingest

Submit a sensor reading. Returns ensemble anomaly score, severity, and workflow_id if RCA is triggered.

GETDashboard
/api/dashboard/summary

Fleet overview — total equipment, active alerts, anomalies in last 24h, open maintenance tasks.

GETEquipment
/api/equipment

List all registered equipment with current health scores and status.

GETEquipment
/api/equipment/{id}

Get full detail for a single piece of equipment.

POSTEquipment
/api/equipment

Register a new piece of equipment in the fleet.

GETAlerts
/api/alerts

List all active alerts, filterable by severity and acknowledged status.

PATCHAlerts
/api/alerts/{id}/acknowledge

Acknowledge an alert. Removes it from the active alerts count.

GETSensors
/api/sensors/history

Retrieve sensor reading history for an equipment ID over a configurable time window.

GETMaintenance
/api/maintenance/tasks

List all maintenance tasks with status (open / in_progress / done).

POSTMaintenance
/api/maintenance/history

Log a completed maintenance event to the permanent history.

Base URLhttps://rca-backend-5jlv.onrender.comFull API Reference →