Skip to main content

PMaaS API

Integrate Vehk data into your own systems.

Authentication

All API requests require an API key:

Authorization: Bearer YOUR_API_KEY

Get Your API Key

  1. Dashboard → Settings → API Keys
  2. Click "Create New Key"
  3. Name it (e.g., "Production")
  4. Copy immediately (shown only once)

Example: sk_live_1234567890abcdef


Base URL

Production API endpoints:

EnvironmentBase URL
Productionhttps://vehk-api.bravedune-34ccdec3.centralindia.azurecontainerapps.io/api/v1
Dashboardhttps://axle.vehk.in
API Documentation

Full interactive API documentation (Swagger) is available at your API base URL + /docs


Common Endpoints

List Vehicles

GET /vehicles

Response:

{
"vehicles": [
{
"id": "MH01AB1234",
"vin": "1HGBH41JXMN109186",
"make": "Tata",
"model": "LPT 1518",
"healthScore": 87.5
}
]
}

Get Vehicle Health

GET /vehicles/{id}/health

Response:

{
"vehicleId": "MH01AB1234",
"healthScore": 87.5,
"components": {
"engine": 92,
"transmission": 85,
"brakes": 78
},
"alerts": []
}

Get Predictions

GET /predictions?vehicleId={id}

Response:

{
"predictions": [
{
"vehicleId": "MH01AB1234",
"component": "battery",
"issue": "Voltage degradation detected",
"rul_days": 45,
"confidence": 0.87,
"severity": "medium"
}
]
}

Get Alerts

GET /alerts?severity=critical

Response:

{
"alerts": [
{
"id": "alert_123",
"vehicleId": "MH01AB1234",
"severity": "critical",
"message": "Engine overheating detected",
"timestamp": "2026-01-12T10:00:00Z"
}
]
}

Ingest Telemetry Data

Push vehicle telemetry data to Vehk:

Via REST API

POST /telemetry
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

Request Body:

{
"vehicleId": "MH01AB1234",
"timestamp": "2026-01-13T10:00:00Z",
"engine_speed": 2400,
"coolant": 92,
"battery_voltage": 13.2,
"vehicleSpeed": 65
}

Via Kafka

For high-volume streaming, use Kafka integration:

  1. Go to Settings → Kafka Config in the dashboard
  2. Configure your Kafka broker connection
  3. Publish telemetry messages to the configured topic

Rate Limits

PlanRate Limit
Starter100,000 calls/month
ProfessionalUnlimited
EnterpriseUnlimited

Webhooks

Receive real-time notifications:

Setup

  1. Dashboard → Settings → Webhooks
  2. Add endpoint URL
  3. Select events to receive

Events

EventDescription
vehicle.health.changedHealth score changed significantly
alert.createdNew alert generated
prediction.createdNew maintenance prediction
maintenance.completedMaintenance marked complete

Example Payload:

{
"event": "alert.created",
"timestamp": "2026-01-13T10:00:00Z",
"data": {
"vehicleId": "MH01AB1234",
"severity": "critical",
"message": "Brake failure predicted in 7 days"
}
}

Code Examples

Python

import requests

API_KEY = "sk_live_your_api_key"
BASE_URL = "https://vehk-api.bravedune-34ccdec3.centralindia.azurecontainerapps.io/api/v1"

headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}

# Get all vehicles
response = requests.get(f"{BASE_URL}/vehicles", headers=headers)
vehicles = response.json()

# Get predictions for a vehicle
response = requests.get(f"{BASE_URL}/predictions?vehicleId=MH01AB1234", headers=headers)
predictions = response.json()

JavaScript

const API_KEY = 'sk_live_your_api_key';
const BASE_URL = 'https://vehk-api.bravedune-34ccdec3.centralindia.azurecontainerapps.io/api/v1';

// Get all vehicles
const response = await fetch(`${BASE_URL}/vehicles`, {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}
});
const vehicles = await response.json();

cURL

curl -X GET "https://vehk-api.bravedune-34ccdec3.centralindia.azurecontainerapps.io/api/v1/vehicles" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json"

Error Handling

All errors return JSON:

{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid"
}
}

Common Errors:

StatusCodeDescription
400invalid_requestMalformed request
401invalid_api_keyAPI key is invalid or missing
404not_foundResource not found
429rate_limit_exceededToo many requests
500server_errorInternal server error

Next Steps