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:
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
URL Parameters
URL parameters are:
Parameter | Description | Optional | Example |
---|---|---|---|
searchString | User can search by customer name. | Yes | "John Doe" |
fromDateTime | Start date and time in UTC. | Yes | 2023-08-19T00:00:20.335Z |
toDateTime | End date and time in UTC. | Yes | 2024-05-07T23:59:20.335Z |
orderBy | Field name to order the results by. Default is | Yes | "register_date" |
orderType | Order type, either ASC or DESC. Default is DESC. | Yes | "DESC" |
pageSize | Number of records to show on each page. | Yes | 15 |
pageNumber | Page number, greater than zero. | Yes | 1 |
HTTP Response
Response Codes Explanation:
Code | Details | Message |
---|---|---|
200 | The request was successful. | "OK" |
400 | Request parameters missing. | "Request parameters missing" |
500 | Internal server error. | "Internal server error" |
Code Snippet
Examples of how you can call this API using curl, Node.js, and Python
Note: Replace <API_KEY>
with the actual API_KEY provided by Aeromegh.
API Response
Example of API response in JSON format:
API Response Parameter
The following parameters are included in the API response:
Parameter Name | Description |
---|---|
id | Unique identifier for the report. |
userid | Unique identifier for the user associated with the report. |
customer_id | Unique identifier for the customer associated with the report. |
droneid | Unique identifier for the drone associated with the report. |
customer_name | Name of the customer associated with the report. |
project_name | Name of the project associated with the report. |
plan_name | Name of the plan associated with the report. |
crop_type | Type of crop associated with the report. |
area_percentage | Percentage of area covered by spraying. |
amount | Amount associated with the report. |
spray_spacing | Spacing used for spraying. |
spray_area | Total area covered by spraying. |
flight_time | Duration of the flight. |
created_datetime | Date and time when the report was created. |
pesticide | Type of pesticide used. |
spray_volume | Volume of spray used. |
Last updated