Module Upload (v1)#
REST Requests:#
Websockets:#
Websocket endpoint: GET /api/v1/upload/notifications
Websocket Events:
Module Upload REST API (v1)#
- PUT /api/v1/upload/flightplan#
upload a flight plan
- Status Codes:
200 OK – unique id generated for the uploaded flight plan (in response body) – JSON Schema: string
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 flight plan file (bad format or too big for instance)
500 Internal Server Error – if there is a server internal error
Example:
Upload a flight plan (oldest flight plan could be removed if too many have been uploaded)
PUT /api/v1/upload/flightplan
"68238cd792d215bdfdddc7bbb6d10db4"
- GET /api/v1/upload/flightplan/(uid)#
download an available flight plan
- Parameters:
uid (string) – the unique id of the requested flight plan
- Status Codes:
200 OK – content of the requested flight plan (in response body) – JSON Schema: array(byte)
400 Bad Request – if the request is incorrect (method is not GET for instance)
404 Not Found – if the requested flight plan does not exist
500 Internal Server Error – if there is a server internal error
- GET /api/v1/upload/flightplans#
Get the available flight plan list
- Status Codes:
200 OK – the available flight plan list – JSON Schema: array(flightplan)
400 Bad Request – if the request is incorrect (method is not GET for instance)
500 Internal Server Error – if there is a server internal error
Example:
Get the available flight plan list
GET /api/v1/upload/flightplans
[ { "uid": "68238cd792d215bdfdddc7bbb6d10db4", "date": "19700103T182145+0100" }, { "uid": "a178914dea39e23c117e164b05b43995", "date": "20180120T084545+0200" } ]
- GET /api/v1/upload/flightplan/current/info#
get the currently in progress flight plan
- Status Codes:
200 OK – the currently in progress flight plan – JSON Schema: flightplan
400 Bad Request – if the request is incorrect (method is not GET for instance)
404 Not Found – if there is no flight plan currently in progress
500 Internal Server Error – if there is a server internal error
Example:
get the currently in progress flight plan
GET /api/v1/upload/flightplan/info
{ "uid": "68238cd792d215bdfdddc7bbb6d10db4", "date": "19700103T182145+0100" }
- GET /api/v1/upload/flightplan/current#
download the currently in progress flight plan
- Status Codes:
200 OK – content of the currently in progress flight plan (in response body) – JSON Schema: array(byte)
400 Bad Request – if the request is incorrect (method is not GET for instance)
404 Not Found – if there is no flight plan currently in progress
500 Internal Server Error – if there is a server internal error
- PUT /api/v1/upload/ephemeris#
upload an ephemeris file
- 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 ephemeris file (too big for instance)
500 Internal Server Error – if there is a server internal error
540 – if the drone is not landed
Example:
Upload and update GPS ephemeris (nothing is done if ephemeris is already up to date)
PUT /api/v1/upload/ephemeris
Module Upload Websocket events (v1)#
Endpoint:
- GET /api/v1/upload/notifications#
- Request Headers:
Connection – Upgrade
Upgrade – websocket
Events:
Module Upload JSON Schema (v1)#
flightplan_created#
type |
object |
properties |
|
|
string |
|
flightplan_removed#
type |
object |
properties |
|
|
string |
|
flightplan#
type |
object |
properties |
|
|
string |
|
string |
flightplan_created_event_data#
type |
object |
properties |
|
|
flightplan_removed_event_data#
type |
object |
properties |
|
|