API Reference
REST API endpoints for programmatic access.
SUPi exposes a RESTful API for programmatic access to predictions, alerts, asset data, and configuration.
Authentication
curl -X POST https://api.supi.ai/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"api_key": "your-api-key", "api_secret": "your-secret"}'
# Response
{
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"expires_in": 3600,
"token_type": "Bearer"
}
Assets
# List assets
GET /v1/assets?site_id=SITE-001&status=active
# Get asset health
GET /v1/assets/PUMP-042/health
# Response
{
"asset_id": "PUMP-042",
"health_score": 0.73,
"rul_days": 47,
"top_risks": [
{"mode": "bearing_wear", "probability": 0.82},
{"mode": "seal_leakage", "probability": 0.31}
],
"last_updated": "2025-02-10T14:30:00Z"
}
Predictions
# Get predictions for an asset
GET /v1/predictions?asset_id=PUMP-042&horizon=30d
# Get anomalies
GET /v1/anomalies?severity=critical&status=open&limit=50
Webhooks
Register webhooks to receive real-time notifications:
POST /v1/webhooks
{
"url": "https://your-system.com/supi-alerts",
"events": ["anomaly.critical", "prediction.rul_low"],
"secret": "your-webhook-secret"
}
Rate Limits
| Plan | Requests/min | Burst |
|---|---|---|
| Standard | 100 | 200 |
| Enterprise | 1,000 | 2,000 |
| Dedicated | Unlimited | Unlimited |