Module Update (v1)#
REST Requests:#
Websockets:#
Websocket endpoint: GET /api/v1/update/notifications
Websocket Events:
Module Update REST API (v1)#
- PUT /api/v1/update/upload#
Upload update file / Trigger update / Reboot
- Query Parameters:
reboot – enable/disable automatic reboot
- Status Codes:
200 OK – no error
400 Bad Request – if the request is incorrect (method is not PUT for instance)
415 Unsupported Media Type – if there is an error with the update file (bad format for instance)
429 Too Many Requests – if an update is already in progress
500 Internal Server Error – if there is a server internal error
512 – if the battery level is lower than threshold
540 – if the drone is not landed
Example:
Upload update file / Trigger update (with reboot)
PUT /api/v1/update/upload <upload file content in request body>
Upload update file / Trigger update (without reboot)
PUT /api/v1/update/upload?reboot=no <upload file content in request body>
Module Update Websocket events (v1)#
Endpoint:
- GET /api/v1/update/notifications#
- Request Headers:
Connection – Upgrade
Upgrade – websocket
Events:
Module Update JSON Schema (v1)#
upload_progress#
type |
object |
properties |
|
|
string |
|
step_changed#
type |
object |
properties |
|
|
string |
|
reboot#
type |
string |
|
oneOf |
the drone will reboot automatically at the end of the process |
|
const |
yes |
|
the drone will not reboot automatically at the end of the process |
||
const |
no |
upload_progress_event_data#
type |
object |
properties |
|
|
integer |
step_changed_event_data#
type |
object |
properties |
|
|
step#
type |
string |
|
oneOf |
the update file is being parsed / verified |
|
const |
check |
|
the update file is being extracted and written in memory |
||
const |
trigger |
|
the device is about to reboot |
||
const |
reboot |