Get All Flights

This API is used to retrieve all flight logs

This API provides programmatic access to details about all flights within AeroGCS Enterprise. Retrieve comprehensive information for each flight, such as start and end times, drone ID, status, area covered, distance covered, and more. Integrate detailed flight data seamlessly into your applications..

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 the flight

HTTP Request

https://ags.aeromegh.com/Aeromegh/remoteMission/AllFlightsLogs/{start}/{end}/{page}/{pageSize}?type={type}

URL Parameters

URL parameters are

Key
Description

searchString :

search by drone_id

startDate / fromDate :

get data between fromdate to todate

startIndex (offset)

fetch records from offsets

pageSize (limit)

fetch limited records

Note: To retrieve all records, set both the startIndex and pageSize values to '0' (zero).

Note: Convert human-readable date/time to Unix timestamp for using epoch time in the URL start time parameter, ensuring API compatibility.

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

curl --location 'https://ags.aeromegh.com/Aeromegh/remoteMission/AllFlightsLogs/${droneId}/${fromDate}/${toDate}/${startIndex}/${pageSize}?type=${type}' \
--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.

{
    "logs": [
        {
            "id": "02abe77f-75e5-4e6d-9f8d-ec09e6a1f481",
            "project_name": "ManualProject",
            "plan_name": "SprayingPlan",
            "user_id": "598cc675-8126-4d62-be60-03c8d4b5e62b",
            "start_time": "2024-05-06T13:12:11.000Z",
            "end_time": "2024-05-06T13:13:14.000Z",
            "drone_id": "P00001003A00433032511533383839",
            "streamkey": "apig87b47le",
            "stream_uploaded": true,
            "title": null,
            "stream_viewer_minutes": "0",
            "status": "ended",
            "last_activity": "2024-05-06T13:13:14.000Z",
            "area_covered": "0",
            "distance_covered": "66",
            "customer_id": null,
            "size": "0",
            "stream_base_id": null,
            "area_calculation_method": "spraying",
            "firmware_version_number": "ArduCopter V4.4.4 Secured",
            "green_build_number": "104.301.20240504.02",
            "drone_name": null,
            "uin": null
        },
        {
            "id": "c8f46700-248f-4d82-88ad-6ad9dc8780f7",
            "project_name": "ManualProject",
            "plan_name": "SprayingPlan",
            "user_id": "598cc675-8126-4d62-be60-03c8d4b5e62b",
            "start_time": "2024-05-04T06:32:27.008Z",
            "end_time": "2024-05-04T06:35:37.449Z",
            "drone_id": "P000010024003B3131510137383337",
            "streamkey": "apirxflz7xd",
            "stream_uploaded": true,
            "title": null,
            "stream_viewer_minutes": "0",
            "status": "ended",
            "last_activity": "2024-05-04T06:35:35.294Z",
            "area_covered": "9978",
            "distance_covered": "444",
            "customer_id": null,
            "size": "16.154824256896973",
            "stream_base_id": "9fb7b0b0-1a6e-4fbf-aaed-a74c9f4c53dd",
            "area_calculation_method": "plot",
            "firmware_version_number": "ArduCopter V4.4.4 Secured",
            "green_build_number": "104.298.20240503.01",
            "drone_name": "KAM29032024",
            "uin": "145897"
        }
    ],
    "count": "2"
}

API Response Parameter

The following table outlines the parameters included in the API response for retrieving all flight logs

Parameter
Description

logs

An array containing log entries for drone operations.

id

Unique identifier for each log entry.

project_name

The name of the project associated with the log entry.

plan_name

The name of the plan associated with the log entry.

user_id

The unique identifier of the user who initiated the drone operation.

start_time

The timestamp indicating the start time of the drone operation.

end_time

The timestamp indicating the end time of the drone operation.

drone_id

The unique identifier of the drone involved in the operation.

streamkey

The stream key associated with the drone operation.

stream_uploaded

A boolean value indicating whether the stream was uploaded successfully.

title

The title of the log entry.

stream_viewer_minutes

The duration, in minutes, for which the stream was viewed.

status

The status of the drone operation (e.g., "ended", "ongoing").

last_activity

The timestamp indicating the time of the last activity in the drone operation.

area_covered

The area covered, in square units, during the drone operation.

distance_covered

The distance covered, in units, during the drone operation.

customer_id

The unique identifier of the customer associated with the drone operation.

size

The size, in units, associated with the drone operation.

stream_base_id

The base identifier of the stream associated with the drone operation.

area_calculation_method

The method used to calculate the area covered during the drone operation (e.g., "spraying", "plot").

firmware_version_number

The version number of the drone's firmware used during the operation.

green_build_number

The build number of the green (secure) firmware version used during the operation.

drone_name

The name of the drone involved in the operation.

uin

The unique identifier number associated with the drone.

count

The total count of log entries returned in the response.

Last updated