API reference
Push events to a mission over plain HTTP. Anything that can make a request — a script, a
device, or a code-writing agent — can send data. Base URL
https://api.ollebo.com
(interactive spec at /doc).
Authentication
Each mission has a mission key (a UUID) used directly in the URL path. Copy yours from the Missions page. Set it once in your shell for the snippets below:
KEY=YOUR_MISSION_KEY API=https://api.ollebo.com
Check a key is valid: it returns the mission name, or 404 if unknown.
curl "$API/mission/validate/$KEY"
# -> {"valid":true,"mission_id":"...","name":"demo"}
Endpoints
| Method & path | Purpose |
|---|---|
| PUT /event/{key} | Ingest one event (telemetry / measurement / picture / alert) |
| GET /event/{key}/recent?minutes=N | Read events from the last N minutes (max 60) |
| GET /event/{key}/stream | Live SSE stream for one mission (backfill + live) |
| GET /event/public/stream | Live SSE firehose of all public missions |
| GET /mission/validate/{key} | Validate a mission key |
| GET /mission/{key}/hello | Mission identity, stats and ingest URLs (handshake) |
| PUT|GET /mission/{key}/picture/{id} | Upload / fetch a picture's image bytes |
Event body
PUT /event/{key} takes a JSON object with
Content-Type: application/json. Every field is optional except
type; omitted fields take their default.
| Field | Type | Notes |
|---|---|---|
| type | string | telemetry · measurement · picture · alert (free-form ok) |
| geopoint | [lon, lat] | decimal degrees, lon first — where it's pinned on the map |
| device | string | stable id for the asset (one marker per device) |
| jsonData | object | arbitrary per-type detail (see below) |
| data | number | scalar value (measurements) |
| img | string | image URL (pictures) |
| temp, humidity, x, y, z | number | optional extra scalars |
Per-type jsonData the live map understands:
- telemetry (a moving asset):
{assetType, name, model, heading, altitude, speed, battery, visibility} - measurement (sensor reading):
{kind, unit}+ top-leveldata - picture:
{picture_id, status}+imgonce uploaded - alert (detection):
{kind, severity, message}
Send events
A moving asset (drops/updates a drone marker with heading & battery):
curl -X PUT "$API/event/$KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"telemetry","device":"drone-01","geopoint":[18.0686,59.3293],
"jsonData":{"assetType":"drone","name":"Falcon","heading":90,
"altitude":120,"speed":8.5,"battery":76,"visibility":"public"}}'
# -> {"data":"stored"}
A sensor measurement (drops a measurement marker):
curl -X PUT "$API/event/$KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"measurement","device":"sensor-1","geopoint":[18.0686,59.3293],
"data":21.5,"jsonData":{"kind":"temperature","unit":"C"}}'
An alert / detection:
curl -X PUT "$API/event/$KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"alert","device":"drone-01","geopoint":[18.0686,59.3293],
"jsonData":{"kind":"person","severity":"high","message":"Person detected"}}'
A picture — two phases: post the event, then upload the bytes:
# 1) announce the picture (choose any picture_id)
curl -X PUT "$API/event/$KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"picture","device":"drone-01","geopoint":[18.0686,59.3293],
"jsonData":{"picture_id":"shot-001","status":"pending"}}'
# 2) upload the image bytes for that picture_id
curl -X PUT "$API/mission/$KEY/picture/shot-001" \
-H 'Content-Type: image/jpeg' --data-binary @photo.jpg
The boot handshake
GET /mission/{key}/hello is what a device calls once on startup. It returns
the mission's identity and stats, where to send events — and a
video block, because the handshake also registers a fresh video stream for
this boot. (The mission has a permanent stream of its own from the moment it was created;
this one is additional, so a device never has to remember credentials across reboots.)
curl "$API/mission/$KEY/hello?device=drone-01"
{
"ok": true, "mission_id": "...", "name": "demo", "is_public": true,
"ingest": { "event_method": "PUT", "event_url": "...", "stream_url": "..." },
"stats": { "events": 0, "pictures": 0, "updated_at": null },
"video": {
"stream_id": "7540cc47-...",
"publish": { "username": "publish", "password": "...",
"rtsps_url": "rtsps://ingest.ollebo.com:443/7540cc47-..." },
"playback": { "hls": "https://video.ollebo.com/7540cc47-.../index.m3u8",
"webrtc": "https://video.ollebo.com/7540cc47-.../whep" }
}
}
The video block is best-effort: if the video service is unavailable it is
simply omitted, and the rest of the handshake is unaffected — a device must still
get its event ingest URLs. Take video.publish straight to
Send live video for the
ffmpeg commands.
Read it back
# recent events (JSON) curl "$API/event/$KEY/recent?minutes=5" # live stream (Server-Sent Events) curl -N "$API/event/$KEY/stream"
Public missions are readable without auth; private missions require a bearer token whose groups include the mission's space. Either way, everything you send shows up live on the map.