API docs
API reference

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

GET/v1/status
AccessAPI key · read

Everything a dashboard needs at a glance: counts, each vehicle's state, the missions under way, the open alerts and any silent sensors.

Returns

site (name, center, operating area), time, version, counts, vehicles, active_missions with their progress, open_alerts (open and responding) and silent_sensors.

Request
curl "$OCHIO_URL/v1/status" \
  -H "Authorization: Bearer $OCHIO_API_KEY"
Response
{
  "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

GET/v1/health
AccessNo key needed

Whether Ochio is up. It needs no key, so a load balancer or a monitor can call it.

Returns

status (ok), version, time, dev_mode (whether test mode is on) and instance_id, which changes when Ochio starts from a fresh state.

Request
curl "$OCHIO_URL/v1/health"
Response
{
  "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.

Attributes
idstring
The vehicle's id, like drone-1.
namestring
A name people read.
typestring
quadcopter, or another kind of vehicle.
modelstring
The model.
adapterstring
How Ochio talks to it. sim in the sandbox.
capabilitiesarray
What it carries, like camera and depth. Missions need a camera.
homeobject
Its dock: {"lat", "lon"}.
positionobject
Where it is now: lat, lon and alt_m above home.
heading_degnumber
The way it's pointing, 0 to 360 degrees from north.
ground_speed_mpsnumber
Its speed over the ground now.
speed_mpsnumber
Its cruise speed.
range_mnumber
The longest round trip it can fly.
battery_pctnumber
Its battery level.
statusstring
docked, en_route, on_scene, returning or fault.
readyboolean
true when it can take a mission now: docked, no fault, battery at or above the minimum.
chargingboolean
true while it charges on its dock.
mission_idstringor null
The mission it's flying.
faultstringor null
A fault it reported, in words.
created_atstring
When it was added.
updated_atstring
When it last changed status.
The vehicle object
{
  "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

GET/v1/vehicles
AccessAPI key · read

Every vehicle, with where it is and what it's doing.

Returns

{"data": [...]} with a vehicle for each.

Request
curl "$OCHIO_URL/v1/vehicles" \
  -H "Authorization: Bearer $OCHIO_API_KEY"
Response
{
  "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

GET/v1/vehicles/{vehicle_id}
AccessAPI key · read

One vehicle, by id.

Path
vehicle_idstringrequired
The vehicle's id.
Returns

The vehicle.

Errors
StatusCodeWhen
404not_foundNo vehicle with this id.
Request
curl "$OCHIO_URL/v1/vehicles/drone-1" \
  -H "Authorization: Bearer $OCHIO_API_KEY"
Response
{
  "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:

kindWhat it is
operating_areaWhere vehicles may fly. One per site; no mission target may be outside it.
watchAn area alerts are placed in and rules can name, like a fence line or a gate.
no_flyWhere 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

GET/v1/zones
AccessAPI key · read

The operating area and every zone, with their outlines.

Returns

{"data": [...]}, each with id, name, kind, polygon (its corners) and center.

Request
curl "$OCHIO_URL/v1/zones" \
  -H "Authorization: Bearer $OCHIO_API_KEY"
Response
{
  "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.

FieldMeans
whenalert, or sensor_silent for a sensor that stopped checking in.
zonesThe zones it applies to, or * for anywhere.
min_priorityThe lowest alert priority it answers.
missionThe mission it requests: inspect or patrol.
approvalauto launches at once; ask waits for a person.
cooldown_sHow 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_s before it sends another to that sensor. Alerts in that window stay open for a person.

List rules

GET/v1/rules
AccessAPI key · read

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.

Request
curl "$OCHIO_URL/v1/rules" \
  -H "Authorization: Bearer $OCHIO_API_KEY"
Response
{
  "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
}