Usage
#
ConnectionThe following curl command connects to the Flights History endpoint, retrieves historic data for the specified ICAO address and prints the received data to the console.
The server will only send the flights between the desired dates and then stop the connection.
info
Query parameters start
and end
are mandatory in order to retrieve data.
#
Query ParametersThe following parameters can be specified to retrieve real-time data with more accuracy.
Query Parameters | Type | Description |
---|---|---|
start | datetime | Required - History data extraction start timestamp (ISO 8601 format) |
end | datetime | Required - History data extraction end timestamp (ISO 8601 format) |
flight_id | ID | Spire internal unique flight ID |
icao_address | string | Hexadecimal representation of ICAO 24 – bit address |
callsign | string | Call sign |
flight_number | string | Flight number (IATA format) |
tail_number | string | Aircraft registration |
aircraft_type | string | IATA/ICAO aircraft type code |
aircraft_role | string | Aircraft role e.g. PAX |
airline | string | IATA/ICAO airline code |
departure_airport | string | IATA/ICAO departure airport code |
arrival_airport | string | IATA/ICAO arrival airport code |
operating_airport | string | IATA/ICAO airport code for all inbound and outbound flights |
flight_state | string | Flight state as one of "ON_GROUND","AIRBORNE","LANDED","POST_FLIGHT" |
page_cursor | string | Page cursor to retrieve data from following pages |
#
PaginationPagination is enforced in this endpoint. Whenever a next page is available, you will receive a cursor in the pagination object.
Subsequent request should include a page_cursor=<previous_cursor_value>
as a query parameter.
#
Pagination output sampleAn example pagination response with next page(s) available:
An example request to retrieve data from next page: