Module Info (v1)#
REST Requests:#
Websockets:#
Websocket endpoint: GET /api/v1/info/notifications
Websocket Events:
Module Info REST API (v1)#
- GET /api/v1/info/properties#
Get device property list (a fixed subset)
Example:
Get device property list
GET /api/v1/info/properties
[ { "key": "persist.product.name", "label": "Wi-Fi Access Point", "value": "anafi4k-flc" }, { "key": "ro.factory.wifi.mac_address", "label": "Wi-Fi MAC Address", "value": "" }, { "key": "ro.product.model", "label": "Model", "value": "Anafi4K" }, { "key": "ro.factory.serial", "label": "Serial Number", "value": "000000000000000000" }, { "key": "ro.parrot.build.version", "label": "Software Version", "value": "0.0.0" }, { "key": "ro.build.date", "label": "Software Build Date", "value": "Thu Dec 21 19:45:55 CET 2017" }, { "key": "ro.revision", "label": "Hardware Version", "value": "0" } ]
- PUT /api/v1/info/usb_mode#
switch usb mode
- Parameters:
usb_mode (usb_mode) – the requested usb mode
- Status Codes:
200 OK – no error
400 Bad Request – if the request is incorrect (not PUT method for instance)
401 Unauthorized – if usb mode switch is not allowed
404 Not Found – if the requested usb mode is unknown
500 Internal Server Error – if there is a server internal error
Example:
switch usb mode to mass_storage
PUT /api/v1/info/usb_mode?mode=mass_storage
Module Info Websocket events (v1)#
Endpoint:
- GET /api/v1/info/notifications#
- Request Headers:
Connection – Upgrade
Upgrade – websocket
Events:
Module Info JSON Schema (v1)#
property_changed#
type |
object |
properties |
|
|
string |
|
property#
type |
object |
properties |
|
|
string |
|
string |
|
string |
usb_mode#
type |
string |
|
oneOf |
in this usb mode the drone is view as an ethernet over usb device |
|
const |
rndis |
|
in this usb mode the drone is view as a classic mass storage device |
||
const |
mass_storage |
property_changed_event_data#
type |
object |
properties |
|
|
property_change#
type |
object |
properties |
|
|
string |
|
string |
|
string |