Site and fleet
Read the site the way Mission Control sees it: its status at a glance, the vehicles, the zones on the map, and the rules that turn alerts into missions.
Get the site's status
Everything a dashboard needs at a glance: counts, each vehicle's state, the missions under way, the open alerts and any silent sensors.
Returnssite (name, center, operating area), time, version, counts, vehicles, active_missions with their progress, open_alerts (open and responding) and silent_sensors.
curl "$OCHIO_URL/v1/status" \
-H "Authorization: Bearer $OCHIO_API_KEY"import os
import requests
r = requests.get(
f"{os.environ['OCHIO_URL']}/v1/status",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/status`, {
headers: { Authorization: `Bearer ${process.env.OCHIO_API_KEY}` },
});
console.log(res.status, await res.json());{
"site": {
"name": "Demo Depot",
"center": {
"lat": 38.5005,
"lon": -98.0005
},
"operating_area_id": "depot"
},
"time": "2026-10-19T21:39:17.000Z",
"version": "1.0.0",
"instance_id": "inst_72ff46ed59a2",
"dev_mode": true,
"sim_speed": 1.0,
"counts": {
"alerts_open": 1,
"alerts_responding": 1,
"missions_active": 1,
"missions_pending_approval": 0,
"sensors_online": 3,
"sensors_silent": 0,
"sensors_pending": 0,
"vehicles_ready": 1,
"vehicles_flying": 1
},
"vehicles": [
{
"id": "drone-1",
"name": "Drone 1",
"status": "en_route",
"battery_pct": 99.4,
"ready": false,
"mission_id": "msn_ab6c41ad6b73",
"fault": null
},
{
"id": "drone-2",
"name": "Drone 2",
"status": "docked",
"battery_pct": 100.0,
"ready": true,
"mission_id": null,
"fault": null
}
],
"active_missions": [
{
"id": "msn_ab6c41ad6b73",
"type": "inspect",
"status": "en_route",
"vehicle_id": "drone-1",
"target": {
"kind": "alert",
"alert_id": "alt_214ab1f49295",
"sensor_id": "north-fence-pir-01",
"location": {
"lat": 38.5033,
"lon": -98.0032
},
"zone_id": "north-fence",
"name": "North fence motion sensor"
},
"priority": "high",
"progress": {
"phase": "en_route",
"distance_to_target_m": 443,
"eta_s": 37,
"battery_pct": 99.4,
"distance_flown_m": 72,
"detections": 0
}
}
],
"open_alerts": [
{
"id": "alt_214ab1f49295",
"source": "north-fence-pir-01",
"type": "motion",
"priority": "high",
"zone_id": "north-fence",
"status": "responding",
"mission_id": "msn_ab6c41ad6b73",
"created_at": "2026-10-19T21:39:10.997Z"
},
{
"id": "alt_02fcb2845e3a",
"source": "generator-yard-door-01",
"type": "door_open",
"priority": "medium",
"zone_id": "generator-yard",
"status": "open",
"mission_id": null,
"created_at": "2026-10-19T21:34:46.531Z"
}
],
"silent_sensors": []
}Check health
Whether Ochio is up. It needs no key, so a load balancer or a monitor can call it.
Returnsstatus (ok), version, time, dev_mode (whether test mode is on) and instance_id, which changes when Ochio starts from a fresh state.
curl "$OCHIO_URL/v1/health"import os
import requests
r = requests.get(f"{os.environ['OCHIO_URL']}/v1/health")
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/health`);
console.log(res.status, await res.json());{
"status": "ok",
"version": "1.0.0",
"time": "2026-10-19T21:33:02.751Z",
"dev_mode": true,
"instance_id": "inst_72ff46ed59a2"
}The vehicle object
A drone, rover or boat Ochio can task. Vehicles are part of the site's setup.
Attributesdrone-1.quadcopter, or another kind of vehicle.sim in the sandbox.camera and depth. Missions need a camera.{"lat", "lon"}.lat, lon and alt_m above home.docked, en_route, on_scene, returning or fault.true when it can take a mission now: docked, no fault, battery at or above the minimum.true while it charges on its dock.{
"id": "drone-1",
"name": "Drone 1",
"type": "quadcopter",
"model": "Ochio quad (simulated)",
"adapter": "sim",
"capabilities": [
"camera",
"depth"
],
"home": {
"lat": 38.499,
"lon": -98.001
},
"position": {
"lat": 38.4996049,
"lon": -98.0013095,
"alt_m": 40.0
},
"heading_deg": 338.2,
"ground_speed_mps": 12.0,
"speed_mps": 12.0,
"range_m": 6000.0,
"battery_pct": 99.4,
"status": "en_route",
"ready": false,
"charging": false,
"mission_id": "msn_ab6c41ad6b73",
"fault": null,
"created_at": "2026-10-19T21:30:10.072Z",
"updated_at": "2026-10-19T21:39:10.998Z"
}List vehicles
Every vehicle, with where it is and what it's doing.
Returns{"data": [...]} with a vehicle for each.
curl "$OCHIO_URL/v1/vehicles" \
-H "Authorization: Bearer $OCHIO_API_KEY"import os
import requests
r = requests.get(
f"{os.environ['OCHIO_URL']}/v1/vehicles",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/vehicles`, {
headers: { Authorization: `Bearer ${process.env.OCHIO_API_KEY}` },
});
console.log(res.status, await res.json());{
"data": [
{
"id": "drone-1",
"name": "Drone 1",
"type": "quadcopter",
"model": "Ochio quad (simulated)",
"adapter": "sim",
"capabilities": [
"camera",
"depth"
],
"home": {
"lat": 38.499,
"lon": -98.001
},
"position": {
"lat": 38.4996049,
"lon": -98.0013095,
"alt_m": 40.0
},
"heading_deg": 338.2,
"ground_speed_mps": 12.0,
"speed_mps": 12.0,
"range_m": 6000.0,
"battery_pct": 99.4,
"status": "en_route",
"ready": false,
"charging": false,
"mission_id": "msn_ab6c41ad6b73",
"fault": null,
"created_at": "2026-10-19T21:30:10.072Z",
"updated_at": "2026-10-19T21:39:10.998Z"
},
{
"id": "drone-2",
"name": "Drone 2",
"type": "quadcopter",
"model": "Ochio quad (simulated)",
"adapter": "sim",
"capabilities": [
"camera",
"depth"
],
"home": {
"lat": 38.499,
"lon": -98.0007
},
"position": {
"lat": 38.499,
"lon": -98.0007,
"alt_m": 0.0
},
"heading_deg": 155.5,
"ground_speed_mps": 0.0,
"speed_mps": 12.0,
"range_m": 6000.0,
"battery_pct": 100.0,
"status": "docked",
"ready": true,
"charging": false,
"mission_id": null,
"fault": null,
"created_at": "2026-10-19T21:30:10.072Z",
"updated_at": "2026-10-19T21:35:12.126Z"
}
]
}Get a vehicle
One vehicle, by id.
PathThe vehicle.
Errors| Status | Code | When |
|---|---|---|
404 | not_found | No vehicle with this id. |
curl "$OCHIO_URL/v1/vehicles/drone-1" \
-H "Authorization: Bearer $OCHIO_API_KEY"import os
import requests
r = requests.get(
f"{os.environ['OCHIO_URL']}/v1/vehicles/drone-1",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/vehicles/drone-1`, {
headers: { Authorization: `Bearer ${process.env.OCHIO_API_KEY}` },
});
console.log(res.status, await res.json());{
"id": "drone-1",
"name": "Drone 1",
"type": "quadcopter",
"model": "Ochio quad (simulated)",
"adapter": "sim",
"capabilities": [
"camera",
"depth"
],
"home": {
"lat": 38.499,
"lon": -98.001
},
"position": {
"lat": 38.4996049,
"lon": -98.0013095,
"alt_m": 40.0
},
"heading_deg": 338.2,
"ground_speed_mps": 12.0,
"speed_mps": 12.0,
"range_m": 6000.0,
"battery_pct": 99.4,
"status": "en_route",
"ready": false,
"charging": false,
"mission_id": "msn_ab6c41ad6b73",
"fault": null,
"created_at": "2026-10-19T21:30:10.072Z",
"updated_at": "2026-10-19T21:39:10.998Z"
}Zones
Zones are the named areas on the site's map. There are three kinds:
kind | What it is |
|---|---|
operating_area | Where vehicles may fly. One per site; no mission target may be outside it. |
watch | An area alerts are placed in and rules can name, like a fence line or a gate. |
no_fly | Where vehicles never fly: no target inside, and no straight path across. |
An alert or sensor in two zones belongs to the watch zone, then the no-fly zone, then the operating area.
List zones
The operating area and every zone, with their outlines.
Returns{"data": [...]}, each with id, name, kind, polygon (its corners) and center.
curl "$OCHIO_URL/v1/zones" \
-H "Authorization: Bearer $OCHIO_API_KEY"import os
import requests
r = requests.get(
f"{os.environ['OCHIO_URL']}/v1/zones",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/zones`, {
headers: { Authorization: `Bearer ${process.env.OCHIO_API_KEY}` },
});
console.log(res.status, await res.json());{
"data": [
{
"id": "depot",
"name": "Depot operating area",
"kind": "operating_area",
"polygon": [
{
"lat": 38.4955,
"lon": -98.0085
},
{
"lat": 38.5058,
"lon": -98.0085
},
{
"lat": 38.506,
"lon": -97.999
},
{
"lat": 38.504,
"lon": -97.9915
},
{
"lat": 38.496,
"lon": -97.9915
},
{
"lat": 38.4952,
"lon": -97.999
}
],
"center": {
"lat": 38.500497,
"lon": -98.000295
}
},
{
"id": "north-fence",
"name": "North fence",
"kind": "watch",
"polygon": [
{
"lat": 38.5025,
"lon": -98.0065
},
{
"lat": 38.5047,
"lon": -98.0065
},
{
"lat": 38.5049,
"lon": -97.9995
},
{
"lat": 38.5027,
"lon": -97.9995
}
],
"center": {
"lat": 38.5037,
"lon": -98.003
}
}
]
}Rules
Rules turn alerts and silent sensors into missions. They're part of the site's setup, and Ochio reads them in order: the first rule that matches decides.
| Field | Means |
|---|---|
when | alert, or sensor_silent for a sensor that stopped checking in. |
zones | The zones it applies to, or * for anywhere. |
min_priority | The lowest alert priority it answers. |
mission | The mission it requests: inspect or patrol. |
approval | auto launches at once; ask waits for a person. |
cooldown_s | How long after a drone has looked at a sensor before the rule sends another. |
Two guards keep a noisy sensor from launching a drone per alert, and each writes a rule.suppressed event:
- A mission is already on it. If a mission for the same sensor is waiting, queued, on its way or over the target, the new alert joins it. An automatic rule doesn't wait behind a mission that's waiting for approval; it starts its own.
- Cooldown. Once a drone has looked and turned for home, the rule waits
cooldown_sbefore it sends another to that sensor. Alerts in that window stay open for a person.
List rules
The site's rules, in the order Ochio reads them.
Returns{"data": [...], "first_match_wins": true}; each rule has the fields above and its order.
curl "$OCHIO_URL/v1/rules" \
-H "Authorization: Bearer $OCHIO_API_KEY"import os
import requests
r = requests.get(
f"{os.environ['OCHIO_URL']}/v1/rules",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/rules`, {
headers: { Authorization: `Bearer ${process.env.OCHIO_API_KEY}` },
});
console.log(res.status, await res.json());{
"data": [
{
"id": "perimeter-motion",
"name": "Motion on the perimeter",
"order": 1,
"when": "alert",
"zones": [
"north-fence",
"east-gate"
],
"min_priority": "medium",
"mission": "inspect",
"approval": "auto",
"cooldown_s": 60.0
},
{
"id": "generator-yard-door",
"name": "Generator yard door opened",
"order": 2,
"when": "alert",
"zones": [
"generator-yard"
],
"min_priority": "low",
"mission": "inspect",
"approval": "ask",
"cooldown_s": 60.0
},
{
"id": "silent-sensor",
"name": "A sensor went silent",
"order": 3,
"when": "sensor_silent",
"zones": [
"*"
],
"min_priority": "low",
"mission": "inspect",
"approval": "auto",
"cooldown_s": 120.0
}
],
"first_match_wins": true
}