"Seamlessly initiate flights with detailed telemetry data retrieval using Aeromegh's startFlight API."
This API provides programmatic access to detailed startFlight information with secure API key authentication. Retrieve parameters like flight ID, upstream topic, downstream topic, stream key, validity period, stream URI, and stream server base.
Authentication
To use the API, insert your API key in the Authorization header like this:
Authorization: Bearer <YOUR_API_KEY>
Replace <YOUR_API_KEY> with your AeroGCS API key. Without it, you'll get a 401 Unauthorized error.
Examples of how you can call this API using curl, Node.js, and Python
curl --location --request POST 'https://ags.aeromegh.com/Aeromegh/startFlight?projectName=sandip24april&planName=435pm&droneId=P00001004F002B3131510137383337&teamId=a16afc9b-5205-4fa5-8c42-6276ce1e3281&firmwareVersion=4.4.4&greenBuildNumber=103.265.20240425.01&areaCalculateMethod=spraying' \
--header 'Authorization: Bearer <API_KEY>'
//Please install 'axios' module first//Set your API key before making the requestconstaxios=require('axios');let config = { method:'post', maxBodyLength:Infinity, url: 'https://ags.aeromegh.com/Aeromegh/startFlight?projectName=sandip24april&planName=435pm&droneId=P00001004F002B3131510137383337&teamId=a16afc9b-5205-4fa5-8c42-6276ce1e3281&firmwareVersion=4.4.4&greenBuildNumber=103.265.20240425.01&areaCalculateMethod=spraying',
headers: { 'Authorization':'Bearer <API_KEY>' }};axios.request(config).then((response) => {console.log(JSON.stringify(response.data));}).catch((error) => {console.log(error);});
//Please install 'requests' package first//Set your API key before making the requestimport requestsurl = "https://ags.aeromegh.com/Aeromegh/startFlight?projectName=sandip24april&planName=435pm&droneId=P00001004F002B3131510137383337&teamId=a16afc9b-5205-4fa5-8c42-6276ce1e3281&firmwareVersion=4.4.4&greenBuildNumber=103.265.20240425.01&areaCalculateMethod=spraying"
payload ={}headers ={'Authorization':'Bearer <API_KEY>'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
Note: Replace <API_KEY> with the actual API_KEY provided by Aeromegh.
API Response
Example of API response in JSON format:
{"flightId":"54e9ce7b-e2b8-455e-b351-590c1bf2abdf","upStreamTopic":"wicqkj7f433mhkzxr8yzf5644vpnv36rtsept99wmq3zwq6h26xqhzaf2k1jlr32","downStreamTopic":"8ft0jnqc14va4tf2hfxmsqt8yg565yzf1hso86cfqp2dgdje1v8rj6o9464syefn","streamKey":"20pr1ospms","validTill":"Sun, 12 May 2024 07:53:48 GMT","streamUri":"rtmp://stream02.aeromegh.com/LiveApp","streamServerBase":"stream02.aeromegh.com"}
API Response Parameter
The following parameters are included in API response: