Trigger OTA Updates via HTTP¶
This guide shows how to send OTA commands using the ToloMEO HTTP API. For a complete command reference, see OTA Commands.
Prerequisites
- A valid control channel ID and bearer token
curlinstalled
Base URL
https://apis.tolomeo.io/iot/http/channels/<control-channel-id>/messages/services%2Fswupdate%2Freq
Replace <control-channel-id> with your actual channel ID.
Typical Update Flow¶
1. Notify the system of an available update¶
curl -X POST \
"https://apis.tolomeo.io/iot/http/channels/<control-channel-id>/messages/services%2Fswupdate%2Freq" \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '[{"n":"NotifyOTAUpdate","vs":"{\"id\":\"swupdate\", \"fw_name\":\"firmware\", \"fw_version\":\"1.2.3\", \"url\":\"https://example.com/firmware/v1.2.3.swu\"}"}]'
2. Start the download¶
curl -X POST \
"https://apis.tolomeo.io/iot/http/channels/<control-channel-id>/messages/services%2Fswupdate%2Freq" \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '[{"n":"StartOTADownload","vs":"{\"id\":\"swupdate\"}"}]'
3. Install the update¶
curl -X POST \
"https://apis.tolomeo.io/iot/http/channels/<control-channel-id>/messages/services%2Fswupdate%2Freq" \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '[{"n":"InstallOTAUpdate","vs":"{\"id\":\"swupdate\"}"}]'
Recovery Commands¶
Warning
ResetOTAState discards any pending update, removes the checkpoint, and
returns the device to updated. Use it only to recover a stuck service —
a pending update will need to be re-announced afterwards.
# Abort a failed download or install → returns to update_available
curl -X POST "..." -H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '[{"n":"AbortOTAUpdate","vs":"{\"id\":\"swupdate\"}"}]'
# Cancel an in-progress download → returns to update_available
curl -X POST "..." -H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '[{"n":"CancelOTAUpdate","vs":"{\"id\":\"swupdate\"}"}]'
# Reset: discards any pending update and returns to updated
curl -X POST "..." -H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '[{"n":"ResetOTAState","vs":"{\"id\":\"swupdate\"}"}]'