Rela AIRela AI Docs
API Reference

Assets API

Asset CRUD endpoints, hierarchy, health, prognostics, digital twin, baselines, and condition.

CRUD Endpoints

MethodEndpointDescription
GET/api/v1/assetsList assets
POST/api/v1/assetsCreate asset
GET/api/v1/assets/{asset_id}Get asset
PUT/api/v1/assets/{asset_id}Update asset
DELETE/api/v1/assets/{asset_id}Delete asset

Asset Hierarchy

Assets are organized in a parent-child structure:

POST /api/v1/assets
{
  "name": "Pump Motor P-101",
  "type": "motor",
  "parent_id": "asset_north_plant",
  "location": { "building": "A", "floor": 1, "zone": "pumping" },
  "metadata": { "manufacturer": "ABB", "model": "M3BP-315", "year": 2022 }
}

Query the full hierarchy tree:

GET /api/v1/assets/tree?root_id=asset_north_plant&depth=3
ParameterDescription
root_idRoot asset ID (optional)
depthDepth levels (default: 5)

Asset Health

GET /api/v1/assets/{asset_id}/health

Response:

{
  "health_score": 82,
  "status": "good",
  "factors": [
    { "name": "vibration", "score": 75, "trend": "stable" },
    { "name": "temperature", "score": 90, "trend": "improving" },
    { "name": "maintenance_compliance", "score": 80, "trend": "declining" }
  ],
  "last_updated": "2026-03-25T09:30:00Z"
}
StatusScore Range
critical0-25
poor26-50
fair51-70
good71-90
excellent91-100

Prognostics

GET /api/v1/assets/{asset_id}/prognostics

Returns predictions based on machine learning models:

FieldDescription
remaining_useful_lifeEstimate in days
failure_probabilityFailure probability in 30 days (0-1)
recommended_actionAction suggested by the model
confidencePrediction confidence level
model_versionModel version used

Digital Twin

GET /api/v1/assets/{asset_id}/digital-twin

Returns the asset's virtual state with real-time data:

  • Active sensors — Current readings from all associated sensors
  • Operational parameters — Speed, load, temperature, pressure
  • Simulations — Results from the last simulated scenario
  • Detected anomalies — Deviations from the base model

Baselines

Baselines define the expected normal behavior of an asset:

POST /api/v1/assets/{asset_id}/baselines
{
  "parameter": "vibration_rms",
  "baseline_value": 2.5,
  "tolerance_percent": 15,
  "measurement_unit": "mm/s"
}
GET /api/v1/assets/{asset_id}/baselines

When a reading exceeds the defined tolerance, an automatic alert is generated.

Current Condition

GET /api/v1/assets/{asset_id}/condition
FieldDescription
overall_conditionOverall condition: good, fair, poor, critical
parametersArray of monitored parameters
last_inspectionDate of last inspection
next_inspectionRecommended next inspection date
open_work_ordersNumber of open work orders
Condition is recalculated automatically each time a new sensor reading is received or an inspection is completed.

On this page