Get All Reports

"Effortlessly access and analyze all your reports with Aeromegh's allReports API."

This API provides programmatic access to retrieve all reports within a specified timeframe based on search criteria, with secure API key authentication. Authorized users can use it for analysis or reference.

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 : retrieve all reports

HTTP Request

https://ags.aeromegh.com/Aeromegh/getAllReports?searchString={searchString}&fromDateTime={fromDateTime}&toDateTime={toDateTime}&orderBy={orderBy}&orderType={orderType}&pageSize={pageSize}&pageNumber={pageNumber}

URL Parameters

URL parameters are:

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/getAllReports?searchString=t&fromDateTime=2023-08-19T00%3A00%3A20.335Z&toDateTime=2024-05-07T23%3A59%3A20.335Z&orderBy=created_datetime&orderType=DESC&pageSize=15&pageNumber=2' \
--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:

{
    "allReports": [
        {
            "id": "40128c02-993d-4405-bb50-3725a284a056",
            "userid": "d5dc6351-d96b-49e2-afa8-ff7d509af7aa",
            "customer_id": "247052d0-1c49-42b1-aa31-f7212092675c",
            "droneid": "P000010024003B3131510137383337",
            "customer_name": "chetan shinde",
            "project_name": "ManualProject",
            "plan_name": "SprayingPlan",
            "crop_type": "rice",
            "area_percentage": "0",
            "amount": "100",
            "spray_spacing": "3.0",
            "spray_area": "0.2494",
            "flight_time": "00:03:48",
            "created_datetime": "2024-04-05T09:28:20.000Z",
            "pesticide": "water",
            "spray_volume": "600 ml"
        },
        {
            "id": "35f74126-9eb7-4c22-826f-47324508053c",
            "userid": "d5dc6351-d96b-49e2-afa8-ff7d509af7aa",
            "customer_id": "3396b947-6e87-4fa5-a709-0382931b266e",
            "droneid": "P000010024003B3131510137383337",
            "customer_name": "chetan shinde",
            "project_name": "sandip05042024",
            "plan_name": "plan1",
            "crop_type": "rice",
            "area_percentage": "67",
            "amount": "100",
            "spray_spacing": "3.0",
            "spray_area": "0.2559",
            "flight_time": "00:03:46",
            "created_datetime": "2024-04-05T09:16:51.000Z",
            "pesticide": "water",
            "spray_volume": "13790 ml"
        }
    ]
}

API Response Parameter

The following parameters are included in the API response:

Last updated