curl --request GET \
--url https://api.example.com/api/v1/data/history/{asset_id}{
"asset_id": "<string>",
"sensor_data": [
{
"timestamp": "<string>",
"voltage_v": 123,
"current_a": 123,
"power_factor": 123,
"vibration_g": 123,
"is_faulty": true,
"_batch_features": {}
}
],
"events": [
{
"timestamp": "<string>",
"type": "<string>",
"severity": "<string>",
"message": "<string>"
}
],
"count": 123
}Retrieve time-series sensor data for an asset with optional event stream for state transitions.
curl --request GET \
--url https://api.example.com/api/v1/data/history/{asset_id}{
"asset_id": "<string>",
"sensor_data": [
{
"timestamp": "<string>",
"voltage_v": 123,
"current_a": 123,
"power_factor": 123,
"vibration_g": 123,
"is_faulty": true,
"_batch_features": {}
}
],
"events": [
{
"timestamp": "<string>",
"type": "<string>",
"severity": "<string>",
"message": "<string>"
}
],
"count": 123
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/BhaveshBytess/PREDICTIVE-MAINTENANCE/llms.txt
Use this file to discover all available pages before exploring further.
Motor-01, Pump-A3)60 = Last 1 minute300 = Last 5 minutes3600 = Last 1 hourShow Sensor Reading Object
true when sensor values deviate from baseline by >25% tolerance.{
"voltage_v_std": 2.3,
"voltage_v_peak_to_peak": 8.5,
"current_a_std": 1.1,
"current_a_peak_to_peak": 4.2,
"power_factor_std": 0.012,
"vibration_g_std": 0.023,
"vibration_g_peak_to_peak": 0.09
}
Show Event Object
ANOMALY_DETECTED - Transition from healthy to faultyANOMALY_CLEARED - Transition from faulty to healthyDEGRADATION_WARNING - Degradation index crossed thresholdHEARTBEAT - Periodic health check (reserved)info - Normal operational events (ANOMALY_CLEARED)warning - Early degradation warnings (15%, 30% thresholds)critical - Urgent attention required (ANOMALY_DETECTED, 50%+ thresholds)"ANOMALY: Vibration spike (0.45g) — possible bearing wear; Power factor degradation (0.82).""RECOVERY: All sensor readings have returned to within normal operating range.""Motor fatigue reached 30% (DI=0.3012). Remaining Useful Life: 240.5h."sensor_data array)curl -X GET "http://localhost:8000/api/v1/data/history/Motor-01?limit=50&range_seconds=300"
{
"asset_id": "Motor-01",
"sensor_data": [
{
"timestamp": "2026-03-02T14:25:00.000000Z",
"voltage_v": 230.2,
"current_a": 15.1,
"power_factor": 0.95,
"vibration_g": 0.02,
"is_faulty": false
},
{
"timestamp": "2026-03-02T14:25:01.000000Z",
"voltage_v": 230.5,
"current_a": 15.3,
"power_factor": 0.94,
"vibration_g": 0.02,
"is_faulty": false
},
{
"timestamp": "2026-03-02T14:25:02.000000Z",
"voltage_v": 230.1,
"current_a": 15.0,
"power_factor": 0.95,
"vibration_g": 0.03,
"is_faulty": false,
"_batch_features": {
"voltage_v_std": 2.1,
"voltage_v_peak_to_peak": 7.8,
"current_a_std": 1.0,
"current_a_peak_to_peak": 3.9,
"power_factor_std": 0.009,
"vibration_g_std": 0.018,
"vibration_g_peak_to_peak": 0.08
}
}
],
"events": [],
"count": 3
}
{
"asset_id": "Motor-01",
"sensor_data": [
{
"timestamp": "2026-03-02T15:42:30.000000Z",
"voltage_v": 245.2,
"current_a": 22.5,
"power_factor": 0.78,
"vibration_g": 0.52,
"is_faulty": true,
"_batch_features": {
"voltage_v_std": 8.3,
"voltage_v_peak_to_peak": 28.5,
"current_a_std": 4.2,
"current_a_peak_to_peak": 15.1,
"power_factor_std": 0.045,
"vibration_g_std": 0.089,
"vibration_g_peak_to_peak": 0.31
}
}
],
"events": [
{
"timestamp": "2026-03-02T15:42:30.000000Z",
"type": "ANOMALY_DETECTED",
"severity": "critical",
"message": "ANOMALY: High vibration variance (mechanical jitter): σ=0.0890g; Vibration transient spike: peak-to-peak=0.310g; High voltage variance (grid instability): σ=8.30V."
}
],
"count": 1
}
{
"asset_id": "Motor-01",
"sensor_data": [
{
"timestamp": "2026-03-02T15:50:15.000000Z",
"voltage_v": 230.3,
"current_a": 15.2,
"power_factor": 0.94,
"vibration_g": 0.02,
"is_faulty": false
}
],
"events": [
{
"timestamp": "2026-03-02T15:50:15.000000Z",
"type": "ANOMALY_CLEARED",
"severity": "info",
"message": "RECOVERY: All sensor readings have returned to within normal operating range."
}
],
"count": 1
}
is_faulty changes:healthy → faulty → Emits ANOMALY_DETECTED (critical)faulty → healthy → Emits ANOMALY_CLEARED (info)same state → No event emitted_sensor_history is used only for:_batch_features)// Poll every 1 second for last 60 seconds of data
setInterval(async () => {
const response = await fetch(
'/api/v1/data/history/Motor-01?range_seconds=60&limit=60'
);
const {sensor_data, events} = await response.json();
updateChart(sensor_data);
if (events.length > 0) {
showAlert(events[0]);
}
}, 1000);
# Get last hour of data for analysis
curl -X GET "http://localhost:8000/api/v1/data/history/Motor-01?limit=1000&range_seconds=3600" \
| jq '.sensor_data[] | select(.is_faulty == true)'