Comment on page

Get Plan Data

The above API provides list of plan data. you can search plans by plan name or paginate plan list through this API.
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

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 plan data

HTTP Request

HTTP Response

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/AeroStack/getPlan?projectName=test&planName=xx "
-H "Authorization: Bearer <API_key>"
-H "Content-Type: application/json"
// 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/AeroStack/getPlan?projectName=test&planName=xx", requestOptions)
// Set your API key before making the request
import requests
url = "https://ags.aeromegh.com/AeroMegh/AeroStack/getPlan?projectName=test&planName=xx&"
payload = {}
headers = {
'Authorization' : 'Bearer' <API_key>,
}
response = requests.request("GET", url, headers=headers, data=payload)

API Response

{
{
"Geofence": {
"geofence": [
{
"lat": 20.009584292136523,
"lon": 73.7541407905519,
"alt": 1
},
{
"lat": 20.009079601546873,
"lon": 73.754923325032,
"alt": 1
},
{
"lat": 20.00857553941703,
"lon": 73.754204493016,
"alt": 1
},
{
"lat": 20.008862224951415,
"lon": 73.75354332849383,
"alt": 1
},
{
"lat": 20.009584292136523,
"lon": 73.7541407905519,
"alt": 1
}
]
},
"Mission": {
"waypoints": [
{
"alt": 1,
"coordType": 1,
"lat": 20.008864460155227,
"lon": 73.75356073295823,
"speed": 1
},
{
"alt": 1,
"coordType": 0,
"lat": 20.008868663387137,
"lon": 73.75356073295823,
"speed": 1
},
{
"alt": 1,
"coordType": 1,
"lat": 20.008891803010293,
"lon": 73.7535798542622,
"speed": 1
},
{
"alt": 1,
"coordType": 0,
"lat": 20.00885612626373,
"lon": 73.7535798542622,
"speed": 1
},
{
"alt": 1,
"coordType": 1,
"lat": 20.008847792618187,
"lon": 73.75359897499509,
"speed": 1
}
]
},
"MissionStatistics": {
"missionStatistics": [
{
"sprayingSpacing": 2,
"headingLockStatus": true,
"sprayLockHeading": 0,
"sprayingPumpRate": 10,
"sprayingSpeedMin": 1,
"sprayingArea": 8167.118676843368,
"sprayingAltitude": 1,
"sprayingSpot": 579,
"sprayingTrigger": 1,
"landAltLatitue": 0,
"landAltLongitude": 0,
"landAltitude": 0,
"landLatitue": 0,
"landLongitude": 0,
"missionDefaultAltitude": 10,
"missionDefaultSpeed": 5,
"missionHomeAltitude": 0,
"missionHomeLatitude": 0,
"missionHomeLongitude": 0,
"missionType": 2,
"planeMaxSpeed": 0,
"planeMinSpeed": 0,
"sprayingSpeed": 1,
"surveyCoordCount": 0,
"takeOffAltitude": 0,
"takeOffLatitue": 0,
"takeOffLongitude": 0,
"totalPlanDistance": 0,
"turnaroundDistance": 0,
"turnaroundAngle": 0,
"vehicleType": 0,
"verticalMission": 0,
"verticalRularScaleMaxValue": 0,
"wpRadius": 0
}
]
},
"DGCAfence": {
"geofence": [
{
"lat": 20.00960202004002,
"lon": 73.754137683502,
"alt": 1
},
{
"lat": 20.00907992797021,
"lon": 73.75494244273294,
"alt": 1
},
{
"lat": 20.00855767389576,
"lon": 73.75420651930422,
"alt": 1
},
{
"lat": 20.008858273393678,
"lon": 73.75352467585893,
"alt": 1
},
{
"lat": 20.00960202004002,
"lon": 73.754137683502,
"alt": 1
}
]
},
"planConfiguration": {
"projectDetails": [
{
"clientName": "",
"dateTime": "Sept 08,2023 16:53 pm",
"planCompletedStatus": 0,
"planName": "xx",
"projectName": "/AeroGCSWorkspace/test"
}
]
},
"projectName": "test",
"planName": "xx",
"corridor": "File not found in DB",
"obstacle": {
"polygons": [],
"circles": []
}
}
}

Response Parameter Details

  • Geofence:Contains a list of geofence points with latitude, longitude, and altitude coordinates.
  • Mission: Contains a list of waypoints for the mission, each specifying altitude, coordinate type, latitude, longitude, and speed.
  • MissionStatistics: Contains statistics related to the mission, including parameters like spraying spacing, spraying speed, altitude, area covered, etc.
  • DGCAfence: Similar to the Geofence section, contains a list of geofence points with latitude, longitude, and altitude coordinates.
  • planConfiguration: Contains project details, including client name, date and time, plan completion status, plan name, and project name.
  • projectName: Specifies the name of the project ("test").
  • planName: Specifies the name of the plan ("xx").
  • corridor: Provides information about a corridor, indicating that a file associated with it was not found in the database.
  • obstacle: Contains information about obstacles, including polygons and circles.
Last modified 2mo ago