Comment on page

Get All Drones Status

This API is called to query all the registered drones of the user and retrieve their latest status.

Description

This API is called to query all the registered drones of the user and retrieve their latest status regarding: 1. Online/Offline status 2. Flight Status 3. Latest telemetery data packet received

API Key

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
Key

Method

GET : get all the drones status

HTTP Request

Headers: "authorization": "Bearer <API_key>"

HTTP Response

The API responds with the list of all the registered drones of the user along with their latest flight status, flight location and online/offline status.
Response codes explanation
Code
Details
200
message: "ok" { response shown on right side }
400
request parameters missing
500
internal server error

Code Snippet

Take a look at how you might call this method using our official libraries, or via curl:
curl
JS
Python
curl GET " https://ags.aeromegh.com/AeroMegh/getDronesStatus "
-H "Authorization: Bearer" <API_key>
// require the myapi module and set it up with your API key
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer" <API_key>);
var requestOptions = {
method:'GET',
headers: myHeaders,
redirect :'follow'
};
fetch("https://ags.aeromegh.com/AeroMegh/getDronesStatus", requestOptions)
// Set your API key before making the request
import requests
url = "https://ags.aeromegh.com/AeroMegh/getDronesStatus"
payload = {}
headers = {
'Authorization' : 'Bearer' <API_key>,
}
response = requests.request("GET", url, headers=headers, data=payload)

API Response

{
{
"drones": [
{
"drone_id": "P00001DESKTOP-4R4A4U6E",
"drone_name": "DroneD",
"userid": "edb1bf33-0a01-4362-8474-e54e97873391",
"project": null,
"plan": null,
"last_keep_alive": null,
"last_tele_data": null,
"total_flight_time": {
"minutes": 41,
"seconds": 24,
"milliseconds": 181
},
"last_flight_log": null,
"flight_id": null,
"stream_key": null,
"registered_date": "2023-08-24T13:36:35.451Z",
"lease_drone": false,
"drone_rent": "0",
"dsp_drone_id": null,
"uin": null,
"id": "edf7cf95-9a09-44b4-b887-cdd3039f91b9",
"topic": "pmuxrjjbik1y40vhd4djrv2wd1zdqifkn78jyv5loqljs0j9nqgbqizillam9bun",
"status": "{\"type\":\"INFO\",\"message\":\"Flight moving safely\",\"timestamp\":1694504730.196}",
"online": false,
"flightID": null,
"teleData": null
},
{
"drone_id": "P00001DESKTOP-A7J4QKQ",
"drone_name": "drone29",
"userid": "edb1bf33-0a01-4362-8474-e54e97873391",
"project": null,
"plan": null,
"last_keep_alive": null,
"last_tele_data": null,
"total_flight_time": {},
"last_flight_log": null,
"flight_id": null,
"stream_key": null,
"registered_date": "2023-08-29T11:24:22.275Z",
"lease_drone": false,
"drone_rent": "0",
"dsp_drone_id": null,
"uin": null,
"id": "03063e58-a012-4a91-9b0f-bc2aedc9bf06",
"topic": "klzucp0gb9c92s3lfsyos0aa37vzbp9dwb4mkeyo2r2tpqu59ijheqnchjlkqe66",
"status": "{\"type\":\"INFO\",\"message\":\"Flight moving safely\",\"timestamp\":1694504730.2}",
"online": false,
"flightID": null,
"teleData": null
}
]
}
}

Response Parameter Details

  • drone_id : Unique identifier for the drone
  • drone_name : Name or label associated with the drone
  • userid : ID of the user associated with the drone.
  • project : Project or initiative the drone is associated with.
  • plan : Flight plan associated with the drone.
  • last_keep_alive : Timestamp of the drone's last keep-alive signal.
  • last_tele_data :Timestamp of the last telemetry data received from the drone.
  • total_flight_time : Accumulated flight time of the drone.
  • last_flight_log : Information about the most recent flight log.
  • flight_id : Identifier for a specific flight.
  • stream_key : Unique key associated with the drone's video stream needs to send to media server
  • registered_date : Timestamp indicating when the drone was registered.
  • lease_drone : Indicates if the drone is on lease.
  • dsp_drone_id : Identifier associated with the drone in a particular Drone Service Provider (DSP).
  • uin : User Identification Number.
  • id : Another identifier associated with the drone.
  • topic : Topic or category related to the drone generated for the communication
  • status : Current status of the drone.
  • online : Indicates if the drone is currently online
  • flightID : Identifier associated with a flight.
  • teleData : Telemetry data associated with the drone.