Get End Flight

"Effortlessly manage flight sessions and retrieve essential data with Aeromegh's endFlight API."

This API facilitates programmatic access to flight session management, enabling authorized users to efficiently terminate flights and gather pertinent information for further analysis.

Authentication with API Keys

This API uses API keys for authentication. To access the API, you'll need to include a valid API key in the Authorization header of your request using the Bearer token scheme. Here's the format:

Authorization: Bearer <YOUR_API_KEY>
  • Replace <YOUR_API_KEY> with your actual API key obtained from Aeromegh.

  • Requests without a valid API key will result in a 401 Unauthorized error.

Method

GET - Retrieve Flight Ended Status

HTTP Request

https://ags.aeromegh.com/Aeromegh/endFlight?flightId={flightId}&teamId={teamId}&distanceCovered={distanceCovered}&areaCovered={areaCovered}

URL Parameters

Request Parameters:

ParameterDescription

flightId

Unique identifier for the flight session.

teamId

Unique identifier for the team managing the flight.

distanceCovered

Distance covered during the flight (in meters).

areaCovered

Area covered by the drone during the flight (in square meters).

HTTP Response

Response Codes Explanation:

CodeDetailsMessage

200

The request was successful.

"OK"

400

Request parameters missing.

"Request parameters missing"

500

Internal server error.

"Internal server error"

Code Snippet

Take a look at how you might call this method using our official libraries, or via curl:

curl --location 'https://ags.aeromegh.com/Aeromegh/endFlight?flightId=1887ab99-f7e2-4926-b5f4-a6341c75e951&teamId=a16afc9b-5205-4fa5-8c42-6276ce1e3281&distanceCovered=12.5&areaCovered=25' \
--header 'Authorization: Bearer <API_KEY>'

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

API Response

The API response confirms the termination of the flight session, indicating the ended flight's status in message form. Below is an example JSON response illustrating these details:

{
    "message": "Flight Ended."
}

API Response Parameter Details

The API response parameters convey details about the status of the flight session termination. The response may include the following parameters:

  • Message: A textual message indicating the status of the ended flight session.

Last updated