Add Drone

"Seamlessly integrate new drones into your system with Aeromegh's addDrone API."

The addDrone API enables authorized users to add a new drone to the system

Authentication with API Keys

This API uses API keys for authentication. To access the API, you'll need to include a valid API key in the Authorization header of your request using the Bearer token scheme. Here's the format:

Authorization: Bearer <YOUR_API_KEY>
  • Replace <YOUR_API_KEY> with your actual API key obtained from Aeromegh.

  • Requests without a valid API key will result in a 401 Unauthorized error.

Method

POST

Post Data Parameters

ParameterDescriptionOptional

droneID

Unique identifier for the drone.

No

droneName

Name assigned to the drone.

No

uin

Unique Identification Number of the drone.

No

model

Model of the drone.

Yes

serialNo

Serial number of the drone.

Yes

fcsNo

Flight control system number of the drone.

Yes

rcsNo

Remote control system number of the drone.

Yes

board_type

Type of board used in the drone.

Yes

green_build_number

Build number for the green version.

Yes

device_ram

RAM capacity of the device.

Yes

android_version

Version of the Android operating system.

Yes

device_model_name

Model name of the device.

Yes

firmware_version

Version of the drone's firmware.

Yes

license_type

Type of license associated with the drone.

Yes

HTTP Request

https://ags.aeromegh.com/Aeromegh/addDrone?${teamId}

URL Parameters

Request Parameters:

ParameterDescription

teamID

Unique identifier for the team managing the drones.

HTTP Response

Response Codes Explanation:

CodeDetailsMessage

200

The request was successful.

"OK"

400

Request parameters missing.

"Request parameters missing"

500

Internal server error.

"Internal server error"

Code Snippet

Take a look at how you might call this method using our official libraries, or via curl:

curl --location 'https://ags.aeromegh.com/Aeromegh/addDrone?teamId=a16afc9b-5205-4fa5-8c42-6276ce1e3281' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
    "droneID": "P000010024003B3131510137381045",
    "droneName": "testapi",
    "uin": "BTASD123DB746",
    "model": "134", 
    "serialNo": "34665dffd4554", 
    "fcsNo": "dgf34554", 
    "rcsNo": "ws43433", 
    "board_type": "cubeOrangePlus", 
    "green_build_number": "103.265.20240425.01", 
    "device_ram": "12GB", 
    "android_version": "Android 9", 
    "device_model_name": "QUALCOMM MK15", 
    "firmware_version": "4.4.4", 
    "license_type": "OEM" 
}'

Note: Replace <API_KEY> with the actual API_KEY provided by Aeromegh.

API Response

The API response provides details regarding the initiated flight, including the flight ID, upstream and downstream topics for communication, stream key, validity period, stream URI, and stream server base. Below is an example JSON response illustrating these details:

{
    "message" : "Drone has been registered"
}

API Response Parameter Details

Upon successful addition, the API responds with a message indicating the successful addition of the drone. If the UIN already exists in the system, the API returns a message stating, "This UIN already exists.

ParameterDescription

message

returned message indicating response

Last updated