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.

This API provides programmatic access to plan data with secure API key authentication. Use a GET request to retrieve details like geofence points, mission waypoints, statistics, and project configuration. Comprehensive documentation helps developers leverage the API effectively.

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.

Method

GET : get plan data

HTTP Request

https://ags.aeromegh.com/AeroMegh/AeroStack/getPlan?projectName=test&planName=xx

HTTP Response

Response codes explanation:

Code Snippet

Examples of how you can call this API using curl, Node.js, and Python

 
 curl --location 'https://ags.aeromegh.com/AeroMegh/AeroStack/getPlan?projectName=test&planName=xx' \
--header 'Authorization: Bearer <API_KEY>'
 

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

API Response

Example of API response in JSON format:

        
{
            
              {
                "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": []
                }
            }
                      
            
        }

API Response Parameter

The following parameters are included in the API response :

Last updated