Skip to main content
GET
/
api
/
v1
/
status
/
{asset_id}
Get Health Status
curl --request GET \
  --url https://api.example.com/api/v1/status/{asset_id}
{
  "asset_id": "<string>",
  "timestamp": "<string>",
  "health_score": 123,
  "risk_level": "<string>",
  "maintenance_window_days": 123,
  "explanations": [
    {}
  ],
  "model_version": "<string>",
  "baseline_targets": {},
  "degradation_index": 123,
  "rul_hours": 123
}

Overview

This endpoint returns the latest health status for a monitored asset. It uses cumulative degradation tracking (Phase 20) to provide monotonic health degradation with prognostic capabilities.

Key Features

  • Degradation Index (DI): Cumulative wear accumulation from 0.0 (pristine) to 1.0 (end-of-life)
  • Health Score: Derived from DI, ranges from 0-100 (inverse relationship)
  • Risk Level: LOW, MODERATE, HIGH, or CRITICAL based on health score
  • RUL Estimation: Remaining useful life in hours, extrapolated from damage rate
  • Explanations: Plain-English diagnostic reasons for current health state

Path Parameters

asset_id
string
required
Unique identifier for the asset (e.g., Motor-01, Pump-A3)

Response

asset_id
string
The asset identifier from the request
timestamp
string
ISO 8601 timestamp of the health assessment
health_score
integer
Current health score (0-100). Higher is healthier.
  • 75-100: LOW risk
  • 50-74: MODERATE risk
  • 25-49: HIGH risk
  • 0-24: CRITICAL risk
risk_level
string
Current risk classification: LOW, MODERATE, HIGH, or CRITICAL
maintenance_window_days
float
Recommended maintenance window in days. Calculated from RUL or scaled by remaining health percentage.
explanations
array
Array of plain-English diagnostic messages explaining the current health state.Example: ["Voltage readings within normal range (230.0V)", "Current draw stable at 15.2A"]
model_version
string
Model identifier including degradation index and cycle count.Format: cumulative-di:{DI_VALUE}|cycles:{CYCLE_COUNT}Example: cumulative-di:0.0234|cycles:142
baseline_targets
object
Baseline reference values for each monitored signal.
{
  "voltage_v": 230.5,
  "current_a": 15.2,
  "power_factor": 0.95,
  "vibration_g": 0.02
}
degradation_index
float
Cumulative degradation index (0.0 to 1.0). Only present when DI state is hydrated.
  • 0.0: Pristine condition
  • 0.15: 15% degradation threshold
  • 0.30: 30% degradation threshold
  • 0.50: 50% degradation threshold (critical)
  • 0.75: 75% degradation threshold (critical)
  • 1.0: End of useful life
rul_hours
float
Remaining Useful Life in hours. Only present when DI state is hydrated.Returns 99999.0 when no active fault is present (infinite RUL).

Example Request

curl -X GET "http://localhost:8000/api/v1/status/Motor-01"

Example Response

Healthy Asset (Low Risk)

{
  "asset_id": "Motor-01",
  "timestamp": "2026-03-02T14:30:00.123456Z",
  "health_score": 92,
  "risk_level": "LOW",
  "maintenance_window_days": 90.0,
  "explanations": [
    "Voltage readings within normal range (230.5V)",
    "Current draw stable at 15.2A",
    "Power factor excellent at 0.95",
    "Vibration levels nominal (0.02g)"
  ],
  "model_version": "cumulative-di:0.0234|cycles:142",
  "baseline_targets": {
    "voltage_v": 230.5,
    "current_a": 15.2,
    "power_factor": 0.95,
    "vibration_g": 0.02
  },
  "degradation_index": 0.0234,
  "rul_hours": 99999.0
}

Degraded Asset (High Risk)

{
  "asset_id": "Motor-01",
  "timestamp": "2026-03-02T18:45:00.987654Z",
  "health_score": 35,
  "risk_level": "HIGH",
  "maintenance_window_days": 7.2,
  "explanations": [
    "Vibration spike (0.45g) — possible bearing wear",
    "Power factor degradation (0.82)",
    "Current surge detected (22.3A)"
  ],
  "model_version": "cumulative-di:0.4521|cycles:847",
  "baseline_targets": {
    "voltage_v": 230.5,
    "current_a": 15.2,
    "power_factor": 0.95,
    "vibration_g": 0.02
  },
  "degradation_index": 0.4521,
  "rul_hours": 172.8
}

Asset Without Baseline

{
  "asset_id": "Motor-02",
  "timestamp": "2026-03-02T10:00:00.000000Z",
  "health_score": 85,
  "risk_level": "LOW",
  "maintenance_window_days": 30.0,
  "explanations": [
    "Baseline not yet established. Collecting data..."
  ],
  "model_version": "pending"
}

Error Responses

Asset Not Found

{
  "detail": "No data for asset 'Motor-99'"
}
HTTP Status: 404 Not Found

State Dependencies

This endpoint requires:
  1. Sensor data history for the asset (from /api/v1/data/simple ingestion)
  2. A trained baseline model (from /api/v1/baseline/build)
  3. Degradation state hydration (automatic on first access)
Without a baseline, the endpoint returns default healthy values with “pending” status.

Integration Workflow

  • Build Baseline - Create baseline model before calling this endpoint
  • Sensor History - View raw sensor data used for health calculation
  • Events - View state transition events (anomaly detection/clearing)

Build docs developers (and LLMs) love