REST API (v3)

The FsHub REST API (V3) is performance optimised and adds new functionality over the older V2 API, the REST API enables you to access profile, airport, airline, landing and flight data in a simple, programmatic way using conventional HTTP requests.

All of the functionality that you are familiar with on the FsHub website is also available through the API, allowing you to script and retrieve data for applications, IoT projects, mobile apps or websites.

The API documentation will start with a general overview about the design and technology that has been implemented, followed by reference information about specific endpoints.

Requests

Any tool that is fluent in HTTP can communicate with the API simply by requesting the correct URI. Requests should be made using the HTTPS protocol so that traffic is encrypted.

For simple retrieval of information about your account, flights, aerodrome data and METAR reports, you should use the HTTP GET method. The information you request will be returned to you as a JSON object.

The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the objects you are querying.

HTTP Statuses

Along with the HTTP methods that the API responds to, it will also return standard HTTP statuses, including error codes.

In the event of a problem, the status will contain the error code, while the body of the response will usually contain additional information about the problem that was encountered.

In general, if the status returned is in the 200 range, it indicates that the request was fulfilled successfully and that no error was encountered.

Return codes in the 400 range typically indicate that there was an issue with the request that was sent. Among other things, this could mean that you did not authenticate correctly, that you are requesting an action that you do not have authorization for, that the object you are requesting does not exist, or that your request is malformed.

If you receive a status in the 500 range, this generally indicates a server-side problem. This means that we are having an issue on our end and cannot fulfill your request currently.

Responses

When a request is successful, a response body will typically be sent back in the form of a JSON object.

The value of these keys will generally be a JSON object for a request on a single object and an array of objects for a request on a collection of objects.

Meta

In addition to the main resource root, the response may also contain a meta object. This object contains information about the response itself.

The meta object contains a total key that is set to the total number of objects returned by the request. This has implications on the links object and pagination.

The meta object will only be displayed when it has a value. Currently, the meta object will have a value when a request is made on a collection (like droplets or domains).

Authorisation

To access the V3 API, you must specifiy an personal access token of which is a randomly generated API token, you can create or view your existing ones from the integrations page.

When making API requests, you should specify the token as a HTTP header, the HTTP header name should be X-Pilot-Token, the value should be the token string.

When attempting to access the API without a valid token, the following response object will be received:

{
	"error": {
		"status_code": 401,
		"message": "Valid token was not provided."
	}
}

Need to use a Token URL parameter instead of a HTTP Header?

Our latest (v3) API enables users, to instead having to specify the X-Pilot-Token as a HTTP request header, this can also now be set as a URL parameter like so: ?X-Pilot-Token={TOKEN_HERE}. The preferred option however is to set it as a HTTP Header.

Error responses

When an error is returned from the API, instead of having a "data" root, an "error" root will instead be returned with details of the error, the following response object, an example of the format will be received:

{
	"error": true,
	"message": "Airport not found.",
	"details": {
		"icao": "AAAA"
	}
}

Navigating and controlling collection items

Endpoints that respond with collections of data utilise some additional URL parameters for limiting results and moving through data-sets.

The limit parameter enables you to reduce or increase the number of collection items returned, the cursor parameter enables to you offset your results returned.

If no limit or cursor parameters are present in the request, the number of collection items are automatically set to 10 and the cursor at the beginning of the data set.

Endpoints

The following API endpoints and examples can be used to query data from the API...

Flights

The following endpoints relate to flight specific information.

All flights

GET /api/v3/flight

This endpoint enables developers to query and retrieve a collection of all flights.

REQUEST

https://fshub.io/api/v3/flight

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/flight"

RESPONSE

{
	"data": [
		{
			"id": 1,
			"user": {
				"id": 1,
				"name": "Anonymous"
			},
			"airline": null,
			"aircraft": {
				"icao": "A36",
				"icao_name": null,
				"name": "Carenado A36 Bonanza 60t",
				"type": "Beechcraft",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 0,
			"landing_rate": -331,
			"distance": {
				"nm": 0,
				"km": 0
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 0,
			"departure": null,
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2015-03-31T21:50:35.000000Z",
				"geo": {
					"lat": 51.891648,
					"lng": 0.244799
				},
				"hdg": {
					"mag": 225,
					"true": 223
				},
				"spd": {
					"tas": 0
				},
				"fuel": 0,
				"pitch": 0,
				"bank": 0,
				"wind": {
					"spd": 0,
					"dir": 0
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/1"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1\/screenshot"
				}
			]
		},
        ...
		{
			"id": 10,
			"user": {
				"id": 1,
				"name": "Anonymous"
			},
			"airline": null,
			"aircraft": {
				"icao": "EH10",
				"icao_name": null,
				"name": "AgustaWestland EH101 11",
				"type": "AGUSTA",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 0,
			"landing_rate": -145,
			"distance": {
				"nm": 0,
				"km": 0
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 0,
			"departure": null,
			"arrival": {
				"icao": "LOWI",
				"iata": "INN",
				"name": "Innsbruck",
				"time": "2015-04-01T00:21:28.000000Z",
				"geo": {
					"lat": 47.275854,
					"lng": 11.397171
				},
				"hdg": {
					"mag": 9,
					"true": 11
				},
				"spd": {
					"tas": 0
				},
				"fuel": 0,
				"pitch": 0,
				"bank": 0,
				"wind": {
					"spd": 0,
					"dir": 0
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/10"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/1"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/LOWI"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/10\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 10,
			"count": 10
		}
	}
}

Flight report

GET /api/v3/flight/{id}

This endpoint enables developers to query and retrieve a specific flight report.

REQUEST

https://fshub.io/api/v3/flight/{id}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v2/flight/1796933"

RESPONSE

{
	"data": {
		"id": 1796933,
		"user": {
			"id": 2,
			"name": "Bobby Allen"
		},
		"airline": {
			"id": 1778,
			"name": "British Airways",
			"abbr": "BAW",
			"owner": {
				"id": 2,
				"name": "Bobby Allen",
				"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
				"handles": {
					"facebook": null,
					"twitter": "@allebb87",
					"website": null,
					"vatsim": "1167426",
					"ivao": "458562"
				},
				"base": "EGSS",
				"locale": "LKPR",
				"gps": {
					"lat": 46.873045,
					"lng": -5.681537
				},
				"timezone": "Europe\/London",
				"country": "GB",
				"is_online": true,
				"online_at": "2022-02-24T14:52:53.316326Z",
				"created_at": "2016-10-09T13:41:46.000000Z",
				"links": [
					{
						"rel": "self",
						"uri": "\/pilot\/2"
					},
					{
						"rel": "flights",
						"uri": "\/pilot\/2\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/pilot\/2\/screenshot"
					}
				]
			},
			"handles": {
				"facebook": null,
				"twitter": null,
				"website": null
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/airline\/1778"
				},
				{
					"rel": "pilots",
					"uri": "\/airline\/1778\/pilot"
				},
				{
					"rel": "flights",
					"uri": "\/airline\/1778\/flight"
				},
				{
					"rel": "screenshots",
					"uri": "\/airline\/1778\/screenshot"
				}
			]
		},
		"aircraft": {
			"icao": "A20N",
			"icao_name": "Airbus A320 neo",
			"name": "British Airways Dirty Op",
			"type": "TT:ATCCOM.ATC_NAME AIRB",
			"user_conf": {
				"tail": "G-TTNB",
				"icao": "A20N"
			}
		},
		"plan": {
			"callsign": "BA776",
			"cruise_lvl": 240,
			"route": "LKPR BALT4A BALTU DCT DONAD DCT SOPGA DCT RAPET Z93 KODUK DCT MASEK DCT PODIP DCT BREDA DCT GALSO Q63 ARREK Y4 TEBRA TEBR1G EGKK"
		},
		"fuel_used": 3690,
		"landing_rate": -155,
		"distance": {
			"nm": 594,
			"km": 1100
		},
		"max": {
			"alt": 23606,
			"spd": 411
		},
		"time": 6611,
		"departure": {
			"icao": "LKPR",
			"iata": "PRG",
			"name": "Ruzyne",
			"time": "2022-02-23T16:43:16.000000Z",
			"geo": {
				"lat": 50.111476,
				"lng": 14.258424
			},
			"hdg": {
				"mag": 0,
				"true": 242
			},
			"spd": {
				"tas": 148
			},
			"fuel": 6929,
			"pitch": -8,
			"bank": 2,
			"wind": {
				"spd": 10,
				"dir": 270
			}
		},
		"arrival": {
			"icao": "EGKK",
			"iata": "LGW",
			"name": "Gatwick",
			"time": "2022-02-23T18:33:58.000000Z",
			"geo": {
				"lat": 51.149467,
				"lng": -0.18116699999999997
			},
			"hdg": {
				"mag": 255,
				"true": 255
			},
			"spd": {
				"tas": 108
			},
			"fuel": 3239,
			"pitch": -4,
			"bank": 0,
			"wind": {
				"spd": 12,
				"dir": 220
			}
		},
		"links": [
			{
				"rel": "self",
				"uri": "\/flight\/1796933"
			},
			{
				"rel": "pilot",
				"uri": "\/pilot\/2"
			},
			{
				"rel": "departure-airport",
				"uri": "\/airport\/LKPR"
			},
			{
				"rel": "arrival-airport",
				"uri": "\/airport\/EGKK"
			},
			{
				"rel": "screenshots",
				"uri": "\/flight\/1796933\/screenshot"
			}
		]
	}
}

Flight screenshots

GET /api/v3/flight/{id}/screenshot

This endpoint enables developers to query and retrieve a collection of screenshot metadata for a specific flight report.

REQUEST

https://fshub.io/api/v3/flight/{id}/screenshot

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/flight/1796933/screenshot"

RESPONSE

{
	"data": [
		{
			"id": 67462,
			"name": "4509ed51f259a7b4e2d9646b20600095.png",
			"desc": null,
			"urls": {
				"fullsize": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/4509ed51f259a7b4e2d9646b20600095.png",
				"thumbnail": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/tn_200_4509ed51f259a7b4e2d9646b20600095.png"
			},
			"created_at": "2022-02-23T18:48:36.000000Z",
			"links": [
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				}
			]
		},
        ...
		{
			"id": 67470,
			"name": "cfb60d0388c8fce86a089dfef2a92d8d.png",
			"desc": null,
			"urls": {
				"fullsize": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/cfb60d0388c8fce86a089dfef2a92d8d.png",
				"thumbnail": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/tn_200_cfb60d0388c8fce86a089dfef2a92d8d.png"
			},
			"created_at": "2022-02-23T18:48:50.000000Z",
			"links": [
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 67470,
			"count": 9
		}
	}
}

Pilots

The following endpoints relate to pilot specific information.

Current pilot (user) context

GET /api/v3/user

This endpoint enables developers to get the current pilot/user context object, this can be helpful to retrieve the user's pilot "id" and then make additional requests to return a full pilot object.

REQUEST

https://fshub.io/api/v3/user

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/user"

RESPONSE

{
    "data": {
        "id": 2,
        "name": "Bobby Allen",
        "base": "EGSS",
        "locale": "LFBO",
        "gps": {
            "lat": 43.630999,
            "lng": 1.353453
        },
        "is_online": true,
        "online_at": "2022-02-17T11:40:24.584413Z"
    }
}

All pilots

GET /api/v3/pilot

This endpoint enables developers to query and retrieve a collection of pilots.

REQUEST

https://fshub.io/api/v3/pilot

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/pilot"

RESPONSE

{
	"data": [
		{
			"id": 2,
			"name": "Bobby Allen",
			"bio": "Developer of LRMLive and the LRM Client. Airbus A320 and GA virtual pilot!",
			"handles": {
				"facebook": "",
				"twitter": "@allebb87",
				"website": null,
				"vatsim": "1167426",
				"ivao": "458562"
			},
			"base": "EGSS",
			"locale": "LERS",
			"gps": {
				"lat": 41.149123,
				"lng": 1.173329
			},
			"timezone": "Europe\/London",
			"country": "GB",
			"is_online": true,
			"online_at": {
				"date": "2017-12-19 11:09:42.693129",
				"timezone_type": 3,
				"timezone": "UTC"
			},
			"created_at": {
				"date": "2016-10-09 15:41:46.000000",
				"timezone_type": 3,
				"timezone": "UTC"
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "flights",
					"uri": "\/pilot\/2\/flight"
				},
				{
					"rel": "screenshots",
					"uri": "\/pilot\/2\/screenshot"
				}
			]
		},
		{
			"id": 3,
			"name": "Greg Zytka",
			"bio": "",
			"handles": {
				"facebook": "",
				"twitter": "",
				"website": null,
				"vatsim": "",
				"ivao": ""
			},
			"base": "KCLT",
			"locale": "KCLT",
			"gps": {
				"lat": 0,
				"lng": 0
			},
			"timezone": "America\/New_York",
			"country": "US",
			"is_online": false,
			"online_at": {
				"date": "2016-10-10 00:26:09.000000",
				"timezone_type": 3,
				"timezone": "UTC"
			},
			"created_at": {
				"date": "2016-10-10 00:26:09.000000",
				"timezone_type": 3,
				"timezone": "UTC"
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/pilot\/3"
				},
				{
					"rel": "flights",
					"uri": "\/pilot\/3\/flight"
				},
				{
					"rel": "screenshots",
					"uri": "\/pilot\/3\/screenshot"
				}
			]
		},
        ...
		{
			"id": 10,
			"name": "Salim Altintabak",
			"bio": null,
			"handles": {
				"facebook": null,
				"twitter": null,
				"website": null,
				"vatsim": null,
				"ivao": null
			},
			"base": "EHLW",
			"locale": "EHLW",
			"gps": {
				"lat": 0,
				"lng": 0
			},
			"timezone": "Europe\/Amsterdam",
			"country": "NL",
			"is_online": false,
			"online_at": {
				"date": "2016-10-12 02:07:01.000000",
				"timezone_type": 3,
				"timezone": "UTC"
			},
			"created_at": {
				"date": "2016-10-12 02:07:01.000000",
				"timezone_type": 3,
				"timezone": "UTC"
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/pilot\/10"
				},
				{
					"rel": "flights",
					"uri": "\/pilot\/10\/flight"
				},
				{
					"rel": "screenshots",
					"uri": "\/pilot\/10\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 10,
			"count": 10
		}
	}
}

Pilot

GET /api/v3/pilot/{id}

This endpoint enables developers to query and retrieve a specific pilot.

REQUEST

https://fshub.io/api/v3/pilot/{id}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/pilot/2"

RESPONSE

{
	"data": {
		"id": 2,
		"name": "Bobby Allen",
		"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
		"handles": {
			"facebook": null,
			"twitter": "@allebb87",
			"website": null,
			"vatsim": "1167426",
			"ivao": "458562"
		},
		"base": "EGSS",
		"locale": "LKPR",
		"gps": {
			"lat": 47.151646,
			"lng": -5.400568
		},
		"timezone": "Europe\/London",
		"country": "GB",
		"is_online": true,
		"online_at": "2022-02-24T14:50:00.762054Z",
		"created_at": "2016-10-09T13:41:46.000000Z",
		"links": [
			{
				"rel": "self",
				"uri": "\/pilot\/2"
			},
			{
				"rel": "flights",
				"uri": "\/pilot\/2\/flight"
			},
			{
				"rel": "screenshots",
				"uri": "\/pilot\/2\/screenshot"
			}
		]
	}
}

Pilot Flights

GET /api/v3/pilot/{id}/flight

This endpoint enables developers to query and retrieve a collection of flights for a specific pilot.

REQUEST

https://fshub.io/api/v3/pilot/{id}/flight

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/pilot/2/flight"

RESPONSE

{
	"data": [
		{
			"id": 169324,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": null,
			"aircraft": {
				"icao": "A320",
				"icao_name": "Airbus A320",
				"name": "Airbus A320 IAE British ",
				"type": "AIRBUS",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 3717,
			"landing_rate": -151,
			"distance": {
				"nm": 910,
				"km": 491
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 5718,
			"departure": {
				"icao": "LSGG",
				"iata": "GVA",
				"name": "Geneva",
				"time": "2016-10-09T21:14:20.000000Z",
				"geo": {
					"lat": 46.237592,
					"lng": 6.108025
				},
				"hdg": {
					"mag": 43,
					"true": 44
				},
				"spd": {
					"tas": 154
				},
				"fuel": 6336,
				"pitch": -9,
				"bank": 0,
				"wind": {
					"spd": 6,
					"dir": 9
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2016-10-09T22:49:39.000000Z",
				"geo": {
					"lat": 51.884976,
					"lng": 0.23501
				},
				"hdg": {
					"mag": 44,
					"true": 42
				},
				"spd": {
					"tas": 103
				},
				"fuel": 2619,
				"pitch": -7,
				"bank": 0,
				"wind": {
					"spd": 5,
					"dir": 20
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/169324"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/LSGG"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/169324\/screenshot"
				}
			]
		},
        ...
		{
			"id": 171177,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": null,
			"aircraft": {
				"icao": "A320",
				"icao_name": "Airbus A320",
				"name": "Airbus A320 IAE British ",
				"type": "AIRBUS",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 2499,
			"landing_rate": -170,
			"distance": {
				"nm": 626,
				"km": 338
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 3619,
			"departure": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2016-10-14T11:33:25.000000Z",
				"geo": {
					"lat": 51.887266,
					"lng": 0.238408
				},
				"hdg": {
					"mag": 46,
					"true": 44
				},
				"spd": {
					"tas": 141
				},
				"fuel": 5363,
				"pitch": -8,
				"bank": 0,
				"wind": {
					"spd": 6,
					"dir": 60
				}
			},
			"arrival": {
				"icao": "EGPF",
				"iata": "GLA",
				"name": "Glasgow",
				"time": "2016-10-14T12:33:45.000000Z",
				"geo": {
					"lat": 55.871836,
					"lng": -4.433397
				},
				"hdg": {
					"mag": 53,
					"true": 49
				},
				"spd": {
					"tas": 109
				},
				"fuel": 2864,
				"pitch": -5,
				"bank": 0,
				"wind": {
					"spd": 10,
					"dir": 80
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/171177"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGPF"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/171177\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 171177,
			"count": 10
		}
	}
}

If the specified pilot does not have any flights, the API will respond with a HTTP status of 204 (No content).

Pilot Airlines

GET /api/v3/pilot/{id}/airline

This endpoint enables developers to query and retrieve a collection of airlines for a specific pilot (the list of airlines that this pilot is an active member of).

REQUEST

https://fshub.io/api/v3/pilot/{id}/airline

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/pilot/2/airline"

RESPONSE

{
	"data": [
		{
			"id": 3,
			"name": "JetSetGo!",
			"abbr": "JSG",
			"owner": {
				"id": 2,
				"name": "Bobby Allen",
				"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
				"handles": {
					"facebook": null,
					"twitter": "@allebb87",
					"website": null,
					"vatsim": "1167426",
					"ivao": "458562"
				},
				"base": "EGSS",
				"locale": "LKPR",
				"gps": {
					"lat": 47.522006,
					"lng": -5.021367
				},
				"timezone": "Europe\/London",
				"country": "GB",
				"is_online": true,
				"online_at": "2022-02-24T14:45:57.733130Z",
				"created_at": "2016-10-09T13:41:46.000000Z",
				"links": [
					{
						"rel": "self",
						"uri": "\/pilot\/2"
					},
					{
						"rel": "flights",
						"uri": "\/pilot\/2\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/pilot\/2\/screenshot"
					}
				]
			},
			"handles": {
				"facebook": null,
				"twitter": null,
				"website": "http:\/\/fshub.io"
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/airline\/3"
				},
				{
					"rel": "pilots",
					"uri": "\/airline\/3\/pilot"
				},
				{
					"rel": "flights",
					"uri": "\/airline\/3\/flight"
				},
				{
					"rel": "screenshots",
					"uri": "\/airline\/3\/screenshot"
				}
			]
		},
        ...
		{
			"id": 1778,
			"name": "British Airways",
			"abbr": "BAW",
			"owner": {
				"id": 2,
				"name": "Bobby Allen",
				"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
				"handles": {
					"facebook": null,
					"twitter": "@allebb87",
					"website": null,
					"vatsim": "1167426",
					"ivao": "458562"
				},
				"base": "EGSS",
				"locale": "LKPR",
				"gps": {
					"lat": 47.522006,
					"lng": -5.021367
				},
				"timezone": "Europe\/London",
				"country": "GB",
				"is_online": true,
				"online_at": "2022-02-24T14:45:57.733130Z",
				"created_at": "2016-10-09T13:41:46.000000Z",
				"links": [
					{
						"rel": "self",
						"uri": "\/pilot\/2"
					},
					{
						"rel": "flights",
						"uri": "\/pilot\/2\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/pilot\/2\/screenshot"
					}
				]
			},
			"handles": {
				"facebook": null,
				"twitter": null,
				"website": null
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/airline\/1778"
				},
				{
					"rel": "pilots",
					"uri": "\/airline\/1778\/pilot"
				},
				{
					"rel": "flights",
					"uri": "\/airline\/1778\/flight"
				},
				{
					"rel": "screenshots",
					"uri": "\/airline\/1778\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 1778,
			"count": 6
		}
	}
}

If the specified pilot is not an active member of any airlines, the API will respond with a HTTP status of 204 (No content).

Pilot flights from

GET /api/v3/pilot/{id}/flight/departure/{from-icao}

This endpoint enables developers to query and retrieve a collection of the pilot flights from a specific airport.

REQUEST

https://fshub.io/api/v3/pilot/{id}/flight/departure/{from-icao}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "/api/v3/pilot/2/flight/departure/EGSS"

RESPONSE

{
	"data": [
		{
			"id": 170092,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": null,
			"aircraft": {
				"icao": "BE36",
				"icao_name": "Beechcraft Bonanza (36)",
				"name": "Carenado A36 Bonanza Str",
				"type": "Beechcraft",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 4,
			"landing_rate": -123,
			"distance": {
				"nm": 16,
				"km": 8
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 364,
			"departure": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2016-10-11T20:24:47.000000Z",
				"geo": {
					"lat": 51.878057,
					"lng": 0.224594
				},
				"hdg": {
					"mag": 220,
					"true": 218
				},
				"spd": {
					"tas": 65
				},
				"fuel": 217,
				"pitch": -9,
				"bank": 0,
				"wind": {
					"spd": 7,
					"dir": 60
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2016-10-11T20:30:52.000000Z",
				"geo": {
					"lat": 51.891385,
					"lng": 0.244337
				},
				"hdg": {
					"mag": 224,
					"true": 222
				},
				"spd": {
					"tas": 58
				},
				"fuel": 213,
				"pitch": -4,
				"bank": 0,
				"wind": {
					"spd": 7,
					"dir": 60
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/170092"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/170092\/screenshot"
				}
			]
		},
        ...
		{
			"id": 176547,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": null,
			"aircraft": {
				"icao": "A320",
				"icao_name": "Airbus A320",
				"name": "Airbus A320 SL easyJet G",
				"type": "AIRBUS",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 3091,
			"landing_rate": -199,
			"distance": {
				"nm": 647,
				"km": 349
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 3920,
			"departure": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2016-10-24T20:11:34.000000Z",
				"geo": {
					"lat": 51.885734,
					"lng": 0.235901
				},
				"hdg": {
					"mag": 45,
					"true": 43
				},
				"spd": {
					"tas": 152
				},
				"fuel": 7591,
				"pitch": -9,
				"bank": 0,
				"wind": {
					"spd": 6,
					"dir": 40
				}
			},
			"arrival": {
				"icao": "EGPF",
				"iata": "GLA",
				"name": "Glasgow",
				"time": "2016-10-24T21:16:55.000000Z",
				"geo": {
					"lat": 55.86744,
					"lng": -4.441455
				},
				"hdg": {
					"mag": 52,
					"true": 48
				},
				"spd": {
					"tas": 121
				},
				"fuel": 4500,
				"pitch": -6,
				"bank": 0,
				"wind": {
					"spd": 6,
					"dir": 70
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/176547"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGPF"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/176547\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 176547,
			"count": 10
		}
	}
}

Pilot flights to

GET /api/v3/pilot/{id}/flight/arrival/{to-icao}

This endpoint enables developers to query and retrieve a collection of the pilot flights to a specific airport.

REQUEST

https://fshub.io/api/v3/pilot/{id}/flight/arrival/{to-icao}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/pilot/2/flight/arrival/EGSS"

RESPONSE

{
	"data": [
		{
			"id": 169324,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": null,
			"aircraft": {
				"icao": "A320",
				"icao_name": "Airbus A320",
				"name": "Airbus A320 IAE British ",
				"type": "AIRBUS",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 3717,
			"landing_rate": -151,
			"distance": {
				"nm": 910,
				"km": 491
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 5718,
			"departure": {
				"icao": "LSGG",
				"iata": "GVA",
				"name": "Geneva",
				"time": "2016-10-09T21:14:20.000000Z",
				"geo": {
					"lat": 46.237592,
					"lng": 6.108025
				},
				"hdg": {
					"mag": 43,
					"true": 44
				},
				"spd": {
					"tas": 154
				},
				"fuel": 6336,
				"pitch": -9,
				"bank": 0,
				"wind": {
					"spd": 6,
					"dir": 9
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2016-10-09T22:49:39.000000Z",
				"geo": {
					"lat": 51.884976,
					"lng": 0.23501
				},
				"hdg": {
					"mag": 44,
					"true": 42
				},
				"spd": {
					"tas": 103
				},
				"fuel": 2619,
				"pitch": -7,
				"bank": 0,
				"wind": {
					"spd": 5,
					"dir": 20
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/169324"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/LSGG"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/169324\/screenshot"
				}
			]
		},
        ...
		{
			"id": 172255,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": null,
			"aircraft": {
				"icao": "A36",
				"icao_name": null,
				"name": "Carenado A36 Bonanza 60t",
				"type": "Beechcraft",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 4,
			"landing_rate": -190,
			"distance": {
				"nm": 19,
				"km": 10
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 395,
			"departure": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2016-10-16T17:16:28.000000Z",
				"geo": {
					"lat": 51.889802,
					"lng": 0.242187
				},
				"hdg": {
					"mag": 225,
					"true": 223
				},
				"spd": {
					"tas": 80
				},
				"fuel": 217,
				"pitch": -2,
				"bank": -1,
				"wind": {
					"spd": 12,
					"dir": 190
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2016-10-16T17:23:04.000000Z",
				"geo": {
					"lat": 51.879305,
					"lng": 0.226345
				},
				"hdg": {
					"mag": 222,
					"true": 220
				},
				"spd": {
					"tas": 51
				},
				"fuel": 213,
				"pitch": -7,
				"bank": 1,
				"wind": {
					"spd": 12,
					"dir": 190
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/172255"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/172255\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 172255,
			"count": 10
		}
	}
}

Pilot flight route

GET /api/v3/pilot/{id}/flight/departure/{from-icao}/arrival/{to-icao}

This endpoint enables developers to query and retrieve a collection of pilot flights to and from a specific airport (a route).

REQUEST

https://fshub.io/api/v3/pilot/{id}/flight/departure/{from-icao}/arrival/{to-icao}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/pilot/2/flight/departure/EGSS/arrival/LOWI"

RESPONSE

{
	"data": [
		{
			"id": 170150,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": null,
			"aircraft": {
				"icao": "A319",
				"icao_name": "Airbus A319",
				"name": "Airbus A319 Thomson Airw",
				"type": "AIRBUS",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 3985,
			"landing_rate": -158,
			"distance": {
				"nm": 1080,
				"km": 583
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 6086,
			"departure": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2016-10-11T20:52:41.000000Z",
				"geo": {
					"lat": 51.885364,
					"lng": 0.235379
				},
				"hdg": {
					"mag": 46,
					"true": 44
				},
				"spd": {
					"tas": 150
				},
				"fuel": 7364,
				"pitch": -7,
				"bank": 0,
				"wind": {
					"spd": 6,
					"dir": 60
				}
			},
			"arrival": {
				"icao": "LOWI",
				"iata": "INN",
				"name": "Innsbruck",
				"time": "2016-10-11T22:34:08.000000Z",
				"geo": {
					"lat": 47.26077,
					"lng": 11.34844
				},
				"hdg": {
					"mag": 261,
					"true": 263
				},
				"spd": {
					"tas": 104
				},
				"fuel": 3379,
				"pitch": -6,
				"bank": 0,
				"wind": {
					"spd": 3,
					"dir": 29
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/170150"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/LOWI"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/170150\/screenshot"
				}
			]
		},
        ...
		{
			"id": 358280,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": null,
			"aircraft": {
				"icao": "B738",
				"icao_name": "Boeing 737-800",
				"name": "PMDG 737-800NGX THOMSON ",
				"type": "BOEING",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 4588,
			"landing_rate": -415,
			"distance": {
				"nm": 597,
				"km": 1105
			},
			"max": {
				"alt": 28000,
				"spd": 418
			},
			"time": 5573,
			"departure": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2017-11-25T18:06:10.000000Z",
				"geo": {
					"lat": 51.882174,
					"lng": 0.230576
				},
				"hdg": {
					"mag": 225,
					"true": 223
				},
				"spd": {
					"tas": 181
				},
				"fuel": 20609,
				"pitch": -8,
				"bank": 0,
				"wind": {
					"spd": 6,
					"dir": 240
				}
			},
			"arrival": {
				"icao": "LOWI",
				"iata": "INN",
				"name": "Innsbruck",
				"time": "2017-11-25T19:39:04.000000Z",
				"geo": {
					"lat": 47.260139,
					"lng": 11.342855
				},
				"hdg": {
					"mag": 79,
					"true": 81
				},
				"spd": {
					"tas": 129
				},
				"fuel": 16021,
				"pitch": -8,
				"bank": -1,
				"wind": {
					"spd": 3,
					"dir": 266
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/358280"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/LOWI"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/358280\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 358280,
			"count": 3
		}
	}
}

Pilot screenshots

GET /api/v3/pilot/{id}/screenshot

This endpoint enables developers to query and retrieve all pilot uploaded screenshots.

REQUEST

https://fshub.io/api/v3/pilot/{id}/screenshot

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/pilot/2/screenshot"

RESPONSE

{
	"data": [
		{
			"id": 159,
			"name": "b92fc7c7a58a2c220f83.jpg",
			"desc": null,
			"urls": {
				"fullsize": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/b92fc7c7a58a2c220f83.jpg",
				"thumbnail": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/tn_200_b92fc7c7a58a2c220f83.jpg"
			},
			"created_at": "2016-10-13T12:55:18.000000Z",
			"links": [
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				}
			]
		},
        ...
		{
			"id": 168,
			"name": "07ec55f96fa02ad7cc62.jpg",
			"desc": null,
			"urls": {
				"fullsize": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/07ec55f96fa02ad7cc62.jpg",
				"thumbnail": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/tn_200_07ec55f96fa02ad7cc62.jpg"
			},
			"created_at": "2016-10-13T13:16:00.000000Z",
			"links": [
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 168,
			"count": 10
		}
	}
}

Pilot statistics

GET /api/v3/pilot/{id}/stats

This endpoint enables developers to query and retrieve general pilot statistics. You can get the pilot ID from querying the other airline API endpoints or can be found on the user's FsHub profile "Setting" page.

REQUEST

https://fshub.io/api/v3/pilot/{id}/stats

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/pilot/2/stats"

RESPONSE

{
	"data": {
		"id": 2,
		"all_time": {
			"total_flights": 466,
			"total_hours": 441.68,
			"total_distance": 166381,
			"average_landing": -141
		},
		"month": {
			"total_flights": 24,
			"total_hours": 47.17,
			"total_distance": 18836,
			"average_landing": -124
		},
		"links": [
			{
				"rel": "self",
				"uri": "\/pilot\/2\/stats"
			},
			{
				"rel": "pilot",
				"uri": "\/pilot\/2"
			},
			{
				"rel": "flights",
				"uri": "\/pilot\/2\/flight"
			},
			{
				"rel": "screenshots",
				"uri": "\/pilot\/2\/screenshot"
			}
		]
	}
}

Airlines

The following endpoints relate to virtual airline specific information.

All airlines

GET /api/v3/airline

This endpoint enables developers to query and retrieve all registered virtual airlines on the FSHub platform.

REQUEST

https://fshub.io/api/v3/airline

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airline"

RESPONSE

{
	"data": [
		{
			"id": 2,
			"name": "American Airlines",
			"abbr": "27",
			"owner": {
				"id": 285,
				"name": "Michael Mokrzycki",
				"bio": null,
				"handles": {
					"facebook": null,
					"twitter": null,
					"website": null,
					"vatsim": null,
					"ivao": null
				},
				"base": "LL09",
				"locale": "KCHS",
				"gps": {
					"lat": 38.075522,
					"lng": -79.1264
				},
				"timezone": "America\/Chicago",
				"country": "US",
				"is_online": false,
				"online_at": "2022-02-24T03:30:13.006063Z",
				"created_at": "2017-01-04T20:56:28.000000Z",
				"links": [
					{
						"rel": "self",
						"uri": "\/pilot\/285"
					},
					{
						"rel": "flights",
						"uri": "\/pilot\/285\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/pilot\/285\/screenshot"
					}
				]
			},
			"handles": {
				"facebook": null,
				"twitter": null,
				"website": null
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/airline\/2"
				},
				{
					"rel": "pilots",
					"uri": "\/airline\/2\/pilot"
				},
				{
					"rel": "flights",
					"uri": "\/airline\/2\/flight"
				},
				{
					"rel": "screenshots",
					"uri": "\/airline\/2\/screenshot"
				}
			]
		},
        ...
		{
			"id": 20,
			"name": "Rayne Air",
			"abbr": "RAY",
			"owner": {
				"id": 693,
				"name": "Ryan R. van der Wal",
				"bio": null,
				"handles": {
					"facebook": null,
					"twitter": null,
					"website": null,
					"vatsim": null,
					"ivao": null
				},
				"base": "EHLE",
				"locale": "FEFF",
				"gps": {
					"lat": 4.398948,
					"lng": 18.523084
				},
				"timezone": "Europe\/Amsterdam",
				"country": "NL",
				"is_online": false,
				"online_at": "2022-02-23T22:50:15.570940Z",
				"created_at": "2017-10-07T19:43:46.000000Z",
				"links": [
					{
						"rel": "self",
						"uri": "\/pilot\/693"
					},
					{
						"rel": "flights",
						"uri": "\/pilot\/693\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/pilot\/693\/screenshot"
					}
				]
			},
			"handles": {
				"facebook": null,
				"twitter": null,
				"website": null
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/airline\/20"
				},
				{
					"rel": "pilots",
					"uri": "\/airline\/20\/pilot"
				},
				{
					"rel": "flights",
					"uri": "\/airline\/20\/flight"
				},
				{
					"rel": "screenshots",
					"uri": "\/airline\/20\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 20,
			"count": 10
		}
	}
}

Airline

GET /api/v3/airline/{id}

This endpoint enables developers to query and retrieve a specific airline.

REQUEST

https://fshub.io/api/v3/airline/{id}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airline/3"

RESPONSE

{
	"data": {
		"id": 3,
		"name": "JetSetGo!",
		"abbr": "JSG",
		"owner": {
			"id": 2,
			"name": "Bobby Allen",
			"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
			"handles": {
				"facebook": null,
				"twitter": "@allebb87",
				"website": null,
				"vatsim": "1167426",
				"ivao": "458562"
			},
			"base": "EGSS",
			"locale": "LKPR",
			"gps": {
				"lat": 46.546501,
				"lng": -6.006312
			},
			"timezone": "Europe\/London",
			"country": "GB",
			"is_online": true,
			"online_at": "2022-02-24T14:56:37.834421Z",
			"created_at": "2016-10-09T13:41:46.000000Z",
			"links": [
				{
					"rel": "self",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "flights",
					"uri": "\/pilot\/2\/flight"
				},
				{
					"rel": "screenshots",
					"uri": "\/pilot\/2\/screenshot"
				}
			]
		},
		"handles": {
			"facebook": null,
			"twitter": null,
			"website": "http:\/\/fshub.io"
		},
		"links": [
			{
				"rel": "self",
				"uri": "\/airline\/3"
			},
			{
				"rel": "pilots",
				"uri": "\/airline\/3\/pilot"
			},
			{
				"rel": "flights",
				"uri": "\/airline\/3\/flight"
			},
			{
				"rel": "screenshots",
				"uri": "\/airline\/3\/screenshot"
			}
		]
	}
}

Airline Pilots

GET /api/v3/airline/{id}/pilot

This endpoint enables developers to query and retrieve a collection of pilots for a given airline.

REQUEST

https://fshub.io/api/v3/airline/{id}/pilot

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airline/1778/pilot"

RESPONSE

{
	"data": [
		{
			"id": 2,
			"name": "Bobby Allen",
			"base": "EGSS",
			"locale": "LKPR",
			"gps": {
				"lat": 46.405618,
				"lng": -6.144948
			},
			"is_online": true,
			"online_at": "2022-02-24T14:58:04.503000Z"
		},
        ...
		{
			"id": 6541,
			"name": "Euan Andrew \/ Caspy1Uk",
			"base": "LEIB",
			"locale": "EGLL",
			"gps": {
				"lat": 0.000408,
				"lng": 0.013975
			},
			"is_online": false,
			"online_at": "2022-02-24T14:03:56.113610Z"
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 6541,
			"count": 4
		}
	}
}

Airline flights

GET /api/v3/airline/{id}/flight

This endpoint enables developers to query and retrieve a collection of flights for a specific airline.

REQUEST

https://fshub.io/api/v3/airline/{id}/flight

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airline/1778/flight"

RESPONSE

{
	"data": [
		{
			"id": 1708276,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": {
				"id": 1778,
				"name": "British Airways",
				"abbr": "BAW",
				"owner": {
					"id": 2,
					"name": "Bobby Allen",
					"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
					"handles": {
						"facebook": null,
						"twitter": "@allebb87",
						"website": null,
						"vatsim": "1167426",
						"ivao": "458562"
					},
					"base": "EGSS",
					"locale": "LKPR",
					"gps": {
						"lat": 46.311357,
						"lng": -6.237213
					},
					"timezone": "Europe\/London",
					"country": "GB",
					"is_online": true,
					"online_at": "2022-02-24T14:59:09.905109Z",
					"created_at": "2016-10-09T13:41:46.000000Z",
					"links": [
						{
							"rel": "self",
							"uri": "\/pilot\/2"
						},
						{
							"rel": "flights",
							"uri": "\/pilot\/2\/flight"
						},
						{
							"rel": "screenshots",
							"uri": "\/pilot\/2\/screenshot"
						}
					]
				},
				"handles": {
					"facebook": null,
					"twitter": null,
					"website": null
				},
				"links": [
					{
						"rel": "self",
						"uri": "\/airline\/1778"
					},
					{
						"rel": "pilots",
						"uri": "\/airline\/1778\/pilot"
					},
					{
						"rel": "flights",
						"uri": "\/airline\/1778\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/airline\/1778\/screenshot"
					}
				]
			},
			"aircraft": {
				"icao": "A20N",
				"icao_name": "Airbus A320 neo",
				"name": "British Airways Operator",
				"type": "TT:ATCCOM.ATC_NAME AIRB",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": {
				"callsign": "BA739",
				"cruise_lvl": 320,
				"route": "EDDB KUBOG TADUV NOTGO NAMUB RELKO WEMAR TAMEB ROBEL KEMAD HMM GOMIS GORLO REFSO ULKOK XAMAN EGSS"
			},
			"fuel_used": 4131,
			"landing_rate": -102,
			"distance": {
				"nm": 590,
				"km": 1093
			},
			"max": {
				"alt": 31745,
				"spd": 458
			},
			"time": 6838,
			"departure": {
				"icao": "EDDB",
				"iata": "BER",
				"name": "Berlin Brandenburg",
				"time": "2021-10-01T15:06:07.000000Z",
				"geo": {
					"lat": 52.373957,
					"lng": 13.511503
				},
				"hdg": {
					"mag": 0,
					"true": 246
				},
				"spd": {
					"tas": 140
				},
				"fuel": 7898,
				"pitch": -7,
				"bank": 0,
				"wind": {
					"spd": 12,
					"dir": 148
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2021-10-01T17:00:36.000000Z",
				"geo": {
					"lat": 51.889532,
					"lng": 0.241696
				},
				"hdg": {
					"mag": 228,
					"true": 226
				},
				"spd": {
					"tas": 113
				},
				"fuel": 3767,
				"pitch": -4,
				"bank": 0,
				"wind": {
					"spd": 8,
					"dir": 280
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1708276"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EDDB"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1708276\/screenshot"
				}
			]
		},
        ...
		{
			"id": 1724334,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": {
				"id": 1778,
				"name": "British Airways",
				"abbr": "BAW",
				"owner": {
					"id": 2,
					"name": "Bobby Allen",
					"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
					"handles": {
						"facebook": null,
						"twitter": "@allebb87",
						"website": null,
						"vatsim": "1167426",
						"ivao": "458562"
					},
					"base": "EGSS",
					"locale": "LKPR",
					"gps": {
						"lat": 46.311357,
						"lng": -6.237213
					},
					"timezone": "Europe\/London",
					"country": "GB",
					"is_online": true,
					"online_at": "2022-02-24T14:59:09.905109Z",
					"created_at": "2016-10-09T13:41:46.000000Z",
					"links": [
						{
							"rel": "self",
							"uri": "\/pilot\/2"
						},
						{
							"rel": "flights",
							"uri": "\/pilot\/2\/flight"
						},
						{
							"rel": "screenshots",
							"uri": "\/pilot\/2\/screenshot"
						}
					]
				},
				"handles": {
					"facebook": null,
					"twitter": null,
					"website": null
				},
				"links": [
					{
						"rel": "self",
						"uri": "\/airline\/1778"
					},
					{
						"rel": "pilots",
						"uri": "\/airline\/1778\/pilot"
					},
					{
						"rel": "flights",
						"uri": "\/airline\/1778\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/airline\/1778\/screenshot"
					}
				]
			},
			"aircraft": {
				"icao": "A20N",
				"icao_name": "Airbus A320 neo",
				"name": "FWB British Airways (Wat",
				"type": "TT:ATCCOM.ATC_NAME AIRB",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": {
				"callsign": "BA072",
				"cruise_lvl": 350,
				"route": "EGLL MODMI MID SFD WAFFU ELDAX SUBIP SOSUN PIREG SOMIL IRBAL DIDOR CTL RLP RESPO IXILU LUL NATLI HOC DITON LSZH"
			},
			"fuel_used": 2974,
			"landing_rate": -92,
			"distance": {
				"nm": 567,
				"km": 1051
			},
			"max": {
				"alt": 36339,
				"spd": 458
			},
			"time": 5431,
			"departure": {
				"icao": "EGLL",
				"iata": "LHR",
				"name": "Heathrow",
				"time": "2021-11-01T13:39:43.000000Z",
				"geo": {
					"lat": 51.46489,
					"lng": -0.454133
				},
				"hdg": {
					"mag": 0,
					"true": 270
				},
				"spd": {
					"tas": 143
				},
				"fuel": 6891,
				"pitch": -6,
				"bank": 0,
				"wind": {
					"spd": 12,
					"dir": 279
				}
			},
			"arrival": {
				"icao": "LSZH",
				"iata": "ZRH",
				"name": "Zurich",
				"time": "2021-11-01T15:10:45.000000Z",
				"geo": {
					"lat": 47.452402,
					"lng": 8.552048
				},
				"hdg": {
					"mag": 333,
					"true": 336
				},
				"spd": {
					"tas": 110
				},
				"fuel": 3917,
				"pitch": -5,
				"bank": -1,
				"wind": {
					"spd": 5,
					"dir": 198
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1724334"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGLL"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/LSZH"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1724334\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 1724334,
			"count": 10
		}
	}
}

Airline arrivals

GET /api/v3/airline/{id}/arrival/{icao}

This endpoint enables developers to query and retrieve a collection of airline arrivals to a specific airport

REQUEST

https://fshub.io/api/v3/airline/{id}/arrival/{icao}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airline/1778/arrival/EGSS"

RESPONSE

{
	"data": [
		{
			"id": 1708276,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": {
				"id": 1778,
				"name": "British Airways",
				"abbr": "BAW",
				"owner": {
					"id": 2,
					"name": "Bobby Allen",
					"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
					"handles": {
						"facebook": null,
						"twitter": "@allebb87",
						"website": null,
						"vatsim": "1167426",
						"ivao": "458562"
					},
					"base": "EGSS",
					"locale": "LKPR",
					"gps": {
						"lat": 45.933137,
						"lng": -6.603549
					},
					"timezone": "Europe\/London",
					"country": "GB",
					"is_online": true,
					"online_at": "2022-02-24T15:03:06.879073Z",
					"created_at": "2016-10-09T13:41:46.000000Z",
					"links": [
						{
							"rel": "self",
							"uri": "\/pilot\/2"
						},
						{
							"rel": "flights",
							"uri": "\/pilot\/2\/flight"
						},
						{
							"rel": "screenshots",
							"uri": "\/pilot\/2\/screenshot"
						}
					]
				},
				"handles": {
					"facebook": null,
					"twitter": null,
					"website": null
				},
				"links": [
					{
						"rel": "self",
						"uri": "\/airline\/1778"
					},
					{
						"rel": "pilots",
						"uri": "\/airline\/1778\/pilot"
					},
					{
						"rel": "flights",
						"uri": "\/airline\/1778\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/airline\/1778\/screenshot"
					}
				]
			},
			"aircraft": {
				"icao": "A20N",
				"icao_name": "Airbus A320 neo",
				"name": "British Airways Operator",
				"type": "TT:ATCCOM.ATC_NAME AIRB",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": {
				"callsign": "BA739",
				"cruise_lvl": 320,
				"route": "EDDB KUBOG TADUV NOTGO NAMUB RELKO WEMAR TAMEB ROBEL KEMAD HMM GOMIS GORLO REFSO ULKOK XAMAN EGSS"
			},
			"fuel_used": 4131,
			"landing_rate": -102,
			"distance": {
				"nm": 590,
				"km": 1093
			},
			"max": {
				"alt": 31745,
				"spd": 458
			},
			"time": 6838,
			"departure": {
				"icao": "EDDB",
				"iata": "BER",
				"name": "Berlin Brandenburg",
				"time": "2021-10-01T15:06:07.000000Z",
				"geo": {
					"lat": 52.373957,
					"lng": 13.511503
				},
				"hdg": {
					"mag": 0,
					"true": 246
				},
				"spd": {
					"tas": 140
				},
				"fuel": 7898,
				"pitch": -7,
				"bank": 0,
				"wind": {
					"spd": 12,
					"dir": 148
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2021-10-01T17:00:36.000000Z",
				"geo": {
					"lat": 51.889532,
					"lng": 0.241696
				},
				"hdg": {
					"mag": 228,
					"true": 226
				},
				"spd": {
					"tas": 113
				},
				"fuel": 3767,
				"pitch": -4,
				"bank": 0,
				"wind": {
					"spd": 8,
					"dir": 280
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1708276"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EDDB"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1708276\/screenshot"
				}
			]
		},
        ...
		{
			"id": 1758526,
			"user": {
				"id": 6541,
				"name": "Euan Andrew \/ Caspy1Uk"
			},
			"airline": {
				"id": 1778,
				"name": "British Airways",
				"abbr": "BAW",
				"owner": {
					"id": 2,
					"name": "Bobby Allen",
					"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
					"handles": {
						"facebook": null,
						"twitter": "@allebb87",
						"website": null,
						"vatsim": "1167426",
						"ivao": "458562"
					},
					"base": "EGSS",
					"locale": "LKPR",
					"gps": {
						"lat": 45.933137,
						"lng": -6.603549
					},
					"timezone": "Europe\/London",
					"country": "GB",
					"is_online": true,
					"online_at": "2022-02-24T15:03:06.879073Z",
					"created_at": "2016-10-09T13:41:46.000000Z",
					"links": [
						{
							"rel": "self",
							"uri": "\/pilot\/2"
						},
						{
							"rel": "flights",
							"uri": "\/pilot\/2\/flight"
						},
						{
							"rel": "screenshots",
							"uri": "\/pilot\/2\/screenshot"
						}
					]
				},
				"handles": {
					"facebook": null,
					"twitter": null,
					"website": null
				},
				"links": [
					{
						"rel": "self",
						"uri": "\/airline\/1778"
					},
					{
						"rel": "pilots",
						"uri": "\/airline\/1778\/pilot"
					},
					{
						"rel": "flights",
						"uri": "\/airline\/1778\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/airline\/1778\/screenshot"
					}
				]
			},
			"aircraft": {
				"icao": "A333",
				"icao_name": "Airbus A330-300",
				"name": "Airbus A330-300 British",
				"type": "TT:ATCCOM.ATC_NAME AIRB",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": {
				"callsign": "BA252",
				"cruise_lvl": 220,
				"route": "EGPF NORB1H NORBO T256 ROVLA UT256 DCS UL612 LISTO LIST1L EGSS"
			},
			"fuel_used": 0,
			"landing_rate": -152,
			"distance": {
				"nm": 344,
				"km": 636
			},
			"max": {
				"alt": 22035,
				"spd": 441
			},
			"time": 3567,
			"departure": {
				"icao": "EGPF",
				"iata": "GLA",
				"name": "Glasgow",
				"time": "2022-01-01T01:56:44.000000Z",
				"geo": {
					"lat": 55.869526,
					"lng": -4.438005
				},
				"hdg": {
					"mag": 0,
					"true": 229
				},
				"spd": {
					"tas": 153
				},
				"fuel": 0,
				"pitch": -3,
				"bank": 0,
				"wind": {
					"spd": 1,
					"dir": 269
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2022-01-01T02:56:42.000000Z",
				"geo": {
					"lat": 51.886666,
					"lng": 0.237316
				},
				"hdg": {
					"mag": 223,
					"true": 223
				},
				"spd": {
					"tas": 142
				},
				"fuel": 0,
				"pitch": 1,
				"bank": 0,
				"wind": {
					"spd": 1,
					"dir": 266
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1758526"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/6541"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGPF"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1758526\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 1758526,
			"count": 6
		}
	}
}

Airline departures

GET /api/v3/airline/{id}/departure/{icao}

This endpoint enables developers to query and retrieve a collection of airline departures from a specific airport

REQUEST

https://fshub.io/api/v3/airline/{id}/departure/{icao}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airline/3/departure/LKPR"

RESPONSE

{
	"data": [
		{
			"id": 1796933,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": {
				"id": 1778,
				"name": "British Airways",
				"abbr": "BAW",
				"owner": {
					"id": 2,
					"name": "Bobby Allen",
					"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
					"handles": {
						"facebook": null,
						"twitter": "@allebb87",
						"website": null,
						"vatsim": "1167426",
						"ivao": "458562"
					},
					"base": "EGSS",
					"locale": "LKPR",
					"gps": {
						"lat": 45.551577,
						"lng": -6.966981
					},
					"timezone": "Europe\/London",
					"country": "GB",
					"is_online": true,
					"online_at": "2022-02-24T15:06:52.588778Z",
					"created_at": "2016-10-09T13:41:46.000000Z",
					"links": [
						{
							"rel": "self",
							"uri": "\/pilot\/2"
						},
						{
							"rel": "flights",
							"uri": "\/pilot\/2\/flight"
						},
						{
							"rel": "screenshots",
							"uri": "\/pilot\/2\/screenshot"
						}
					]
				},
				"handles": {
					"facebook": null,
					"twitter": null,
					"website": null
				},
				"links": [
					{
						"rel": "self",
						"uri": "\/airline\/1778"
					},
					{
						"rel": "pilots",
						"uri": "\/airline\/1778\/pilot"
					},
					{
						"rel": "flights",
						"uri": "\/airline\/1778\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/airline\/1778\/screenshot"
					}
				]
			},
			"aircraft": {
				"icao": "A20N",
				"icao_name": "Airbus A320 neo",
				"name": "British Airways Dirty Op",
				"type": "TT:ATCCOM.ATC_NAME AIRB",
				"user_conf": {
					"tail": "G-TTNB",
					"icao": "A20N"
				}
			},
			"plan": {
				"callsign": "BA776",
				"cruise_lvl": 240,
				"route": "LKPR BALT4A BALTU DCT DONAD DCT SOPGA DCT RAPET Z93 KODUK DCT MASEK DCT PODIP DCT BREDA DCT GALSO Q63 ARREK Y4 TEBRA TEBR1G EGKK"
			},
			"fuel_used": 3690,
			"landing_rate": -155,
			"distance": {
				"nm": 594,
				"km": 1100
			},
			"max": {
				"alt": 23606,
				"spd": 411
			},
			"time": 6611,
			"departure": {
				"icao": "LKPR",
				"iata": "PRG",
				"name": "Ruzyne",
				"time": "2022-02-23T16:43:16.000000Z",
				"geo": {
					"lat": 50.111476,
					"lng": 14.258424
				},
				"hdg": {
					"mag": 0,
					"true": 242
				},
				"spd": {
					"tas": 148
				},
				"fuel": 6929,
				"pitch": -8,
				"bank": 2,
				"wind": {
					"spd": 10,
					"dir": 270
				}
			},
			"arrival": {
				"icao": "EGKK",
				"iata": "LGW",
				"name": "Gatwick",
				"time": "2022-02-23T18:33:58.000000Z",
				"geo": {
					"lat": 51.149467,
					"lng": -0.18116699999999997
				},
				"hdg": {
					"mag": 255,
					"true": 255
				},
				"spd": {
					"tas": 108
				},
				"fuel": 3239,
				"pitch": -4,
				"bank": 0,
				"wind": {
					"spd": 12,
					"dir": 220
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1796933"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/LKPR"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGKK"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1796933\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 1796933,
			"count": 1
		}
	}
}

Airline flight (routes) to and from specific airports

GET /api/v3/airline/{id}/departure/{from-icao}/arrival/{to-icao}

This endpoint enables developers to query and retrieve a collection of flights for a given airline to and from specific airports.

REQUEST

https://fshub.io/api/v3/airline/{id}/departure/{from-icao}/arrival/{to-icao}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airline/3/departure/EGPF/arrival/EGSS"

RESPONSE

{
	"data": [
		{
			"id": 1743738,
			"user": {
				"id": 6541,
				"name": "Euan Andrew \/ Caspy1Uk"
			},
			"airline": {
				"id": 1778,
				"name": "British Airways",
				"abbr": "BAW",
				"owner": {
					"id": 2,
					"name": "Bobby Allen",
					"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
					"handles": {
						"facebook": null,
						"twitter": "@allebb87",
						"website": null,
						"vatsim": "1167426",
						"ivao": "458562"
					},
					"base": "EGSS",
					"locale": "LKPR",
					"gps": {
						"lat": 45.455676,
						"lng": -7.057379
					},
					"timezone": "Europe\/London",
					"country": "GB",
					"is_online": true,
					"online_at": "2022-02-24T15:07:49.482376Z",
					"created_at": "2016-10-09T13:41:46.000000Z",
					"links": [
						{
							"rel": "self",
							"uri": "\/pilot\/2"
						},
						{
							"rel": "flights",
							"uri": "\/pilot\/2\/flight"
						},
						{
							"rel": "screenshots",
							"uri": "\/pilot\/2\/screenshot"
						}
					]
				},
				"handles": {
					"facebook": null,
					"twitter": null,
					"website": null
				},
				"links": [
					{
						"rel": "self",
						"uri": "\/airline\/1778"
					},
					{
						"rel": "pilots",
						"uri": "\/airline\/1778\/pilot"
					},
					{
						"rel": "flights",
						"uri": "\/airline\/1778\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/airline\/1778\/screenshot"
					}
				]
			},
			"aircraft": {
				"icao": "A20N",
				"icao_name": "Airbus A320 neo",
				"name": "Airbus A320 Neo British",
				"type": "TT:ATCCOM.ATC_NAME AIRB",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": {
				"callsign": "BAW119",
				"cruise_lvl": 210,
				"route": "EGPF NORB1H NORBO T256 ROVLA UT256 DCS UL612 LISTO LIST1L EGSS"
			},
			"fuel_used": 1396,
			"landing_rate": -105,
			"distance": {
				"nm": 330,
				"km": 611
			},
			"max": {
				"alt": 21053,
				"spd": 435
			},
			"time": 3430,
			"departure": {
				"icao": "EGPF",
				"iata": "GLA",
				"name": "Glasgow",
				"time": "2021-12-06T02:11:53.000000Z",
				"geo": {
					"lat": 55.867587,
					"lng": -4.441627
				},
				"hdg": {
					"mag": 0,
					"true": 229
				},
				"spd": {
					"tas": 165
				},
				"fuel": 10504,
				"pitch": -7,
				"bank": 0,
				"wind": {
					"spd": 1,
					"dir": 268
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2021-12-06T03:09:34.000000Z",
				"geo": {
					"lat": 51.886335,
					"lng": 0.236853
				},
				"hdg": {
					"mag": 223,
					"true": 223
				},
				"spd": {
					"tas": 119
				},
				"fuel": 9108,
				"pitch": -7,
				"bank": 0,
				"wind": {
					"spd": 1,
					"dir": 266
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1743738"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/6541"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGPF"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1743738\/screenshot"
				}
			]
		},
		{
			"id": 1758526,
			"user": {
				"id": 6541,
				"name": "Euan Andrew \/ Caspy1Uk"
			},
			"airline": {
				"id": 1778,
				"name": "British Airways",
				"abbr": "BAW",
				"owner": {
					"id": 2,
					"name": "Bobby Allen",
					"bio": "Developer of FsHub and the LRM Client. Airbus and GA virtual pilot!",
					"handles": {
						"facebook": null,
						"twitter": "@allebb87",
						"website": null,
						"vatsim": "1167426",
						"ivao": "458562"
					},
					"base": "EGSS",
					"locale": "LKPR",
					"gps": {
						"lat": 45.455676,
						"lng": -7.057379
					},
					"timezone": "Europe\/London",
					"country": "GB",
					"is_online": true,
					"online_at": "2022-02-24T15:07:49.482376Z",
					"created_at": "2016-10-09T13:41:46.000000Z",
					"links": [
						{
							"rel": "self",
							"uri": "\/pilot\/2"
						},
						{
							"rel": "flights",
							"uri": "\/pilot\/2\/flight"
						},
						{
							"rel": "screenshots",
							"uri": "\/pilot\/2\/screenshot"
						}
					]
				},
				"handles": {
					"facebook": null,
					"twitter": null,
					"website": null
				},
				"links": [
					{
						"rel": "self",
						"uri": "\/airline\/1778"
					},
					{
						"rel": "pilots",
						"uri": "\/airline\/1778\/pilot"
					},
					{
						"rel": "flights",
						"uri": "\/airline\/1778\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/airline\/1778\/screenshot"
					}
				]
			},
			"aircraft": {
				"icao": "A333",
				"icao_name": "Airbus A330-300",
				"name": "Airbus A330-300 British",
				"type": "TT:ATCCOM.ATC_NAME AIRB",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": {
				"callsign": "BA252",
				"cruise_lvl": 220,
				"route": "EGPF NORB1H NORBO T256 ROVLA UT256 DCS UL612 LISTO LIST1L EGSS"
			},
			"fuel_used": 0,
			"landing_rate": -152,
			"distance": {
				"nm": 344,
				"km": 636
			},
			"max": {
				"alt": 22035,
				"spd": 441
			},
			"time": 3567,
			"departure": {
				"icao": "EGPF",
				"iata": "GLA",
				"name": "Glasgow",
				"time": "2022-01-01T01:56:44.000000Z",
				"geo": {
					"lat": 55.869526,
					"lng": -4.438005
				},
				"hdg": {
					"mag": 0,
					"true": 229
				},
				"spd": {
					"tas": 153
				},
				"fuel": 0,
				"pitch": -3,
				"bank": 0,
				"wind": {
					"spd": 1,
					"dir": 269
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2022-01-01T02:56:42.000000Z",
				"geo": {
					"lat": 51.886666,
					"lng": 0.237316
				},
				"hdg": {
					"mag": 223,
					"true": 223
				},
				"spd": {
					"tas": 142
				},
				"fuel": 0,
				"pitch": 1,
				"bank": 0,
				"wind": {
					"spd": 1,
					"dir": 266
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1758526"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/6541"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGPF"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1758526\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 1758526,
			"count": 2
		}
	}
}

Airline screenshots

GET /api/v3/airline/{id}/screenshot

This endpoint enables developers to query and retrieve a collection of screenshots for a given airline.

REQUEST

https://fshub.io/api/v3/airline/{id}/screenshot

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airline/3/screenshot"

RESPONSE

{
	"data": [
		{
			"id": 54785,
			"name": "27996e3cc0cc63b708a2f60682e7987c.png",
			"desc": null,
			"urls": {
				"fullsize": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/27996e3cc0cc63b708a2f60682e7987c.png",
				"thumbnail": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/tn_200_27996e3cc0cc63b708a2f60682e7987c.png"
			},
			"created_at": "2021-10-20T15:48:12.000000Z",
			"links": [
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				}
			]
		},
        ...
		{
			"id": 55395,
			"name": "fec80f19e83c740c6f2a563116c4a191.png",
			"desc": null,
			"urls": {
				"fullsize": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/fec80f19e83c740c6f2a563116c4a191.png",
				"thumbnail": "https:\/\/fshub.ams3.digitaloceanspaces.com\/uploads\/tn_200_fec80f19e83c740c6f2a563116c4a191.png"
			},
			"created_at": "2021-10-31T16:26:43.000000Z",
			"links": [
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 55395,
			"count": 10
		}
	}
}

Airline statistics

GET /api/v3/airline/{id}/stats

This endpoint enables developers to query and retrieve general airline statistics. You can get the airline ID from querying the other airline API endpoints or can be found on the "Airline > Manage" page.

REQUEST

https://fshub.io/api/v3/airline/{id}/stats

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airline/3/stats"

RESPONSE

{
	"data": {
		"id": 3,
		"all_time": {
			"total_flights": 12,
			"total_hours": 1.52,
			"total_distance": 2834,
			"average_landing": -286
		},
		"month": {
			"total_flights": 2,
			"total_hours": 0.31,
			"total_distance": 37,
			"average_landing": -104
		},
		"links": [
			{
				"rel": "self",
				"uri": "\/airline\/3\/stats"
			},
			{
				"rel": "airline",
				"uri": "\/airline\/3"
			},
			{
				"rel": "pilots",
				"uri": "\/airline\/3\/pilot"
			},
			{
				"rel": "flights",
				"uri": "\/airline\/3\/flight"
			},
			{
				"rel": "screenshots",
				"uri": "\/airline\/3\/screenshot"
			}
		]
	}
}

Airports

The following endpoints relate to airport specific information.

Airport lookup

GET /api/v3/airport/{icao}

This endpoint enables developers to query and retrieve airport specific information including the location, frequencies and runway information.

REQUEST

https://fshub.io/api/v3/airport/{icao}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airport/EGSS"

RESPONSE

{
	"data": {
		"icao": "EGSS",
		"iata": "STN",
		"name": "Stansted",
		"locale": {
			"city": "London",
			"state": null,
			"county": "United Kingdom"
		},
		"geo": {
			"lat": 51.884998,
			"lng": 0.235
		},
		"alt": 348,
		"mag_var": -3,
		"frequencies": {
			"atis": "127.170",
			"cd": null,
			"gnd": "121.720",
			"tower": "123.800",
			"unicom": null,
			"multicom": null,
			"app": "120.620",
			"dep": "126.950"
		},
		"runways": [
			{
				"name": "05",
				"tpye": "Asphalt",
				"length": 9984,
				"hdg": 46,
				"geo": {
					"lat": 51.875076,
					"lng": 0.219898
				},
				"ils": {
					"id": "ISED",
					"frequency": "110.500",
					"hdg": 46,
					"slope": 3
				}
			},
			{
				"name": "23",
				"tpye": "Asphalt",
				"length": 9984,
				"hdg": 226,
				"geo": {
					"lat": 51.895157,
					"lng": 0.250072
				},
				"ils": {
					"id": "ISX",
					"frequency": "110.500",
					"hdg": 226,
					"slope": 3
				}
			}
		],
		"links": [
			{
				"rel": "self",
				"uri": "\/airport\/EGSS"
			},
			{
				"rel": "arrivals",
				"uri": "\/airport\/EGSS\/arrivals"
			},
			{
				"rel": "departures",
				"uri": "\/airport\/EGSS\/departures"
			},
			{
				"rel": "screenshots",
				"uri": "\/airport\/EGSS\/screenshots"
			}
		]
	}
}

Airport METAR report

GET /api/v3/airport/{icao}/metar

This endpoint enables developers to query and retrieve specific airport METAR information (if it exists for the requested airport).

The airport METAR report data is cached for up to a maximum of five minutes to reduce outbound queries from our platform to the public weather service. Please keep this in mind when using this endpoint.

REQUEST

https://fshub.io/api/v3/airport/{icao}/metar

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airport/EGSS/metar"

RESPONSE

{
  "data": {
    "icao": "EGSS",
    "iata": "STN",
    "name": "Stansted",
    "metar": {
      "error": false,
      "report": "EGSS 121150Z AUTO 32005KT 260V040 9999 FEW044 07\/M02 Q1028"
    },
    "links": [
      {
        "rel": "self",
        "uri": "\/airport\/EGSS\/metar"
      },
      {
        "rel": "airport",
        "uri": "\/airport\/EGSS"
      },
      {
        "rel": "arrivals",
        "uri": "\/airport\/EGSS\/arrivals"
      },
      {
        "rel": "departures",
        "uri": "\/airport\/EGSS\/departures"
      },
      {
        "rel": "screenshots",
        "uri": "\/airport\/EGSS\/screenshots"
      }
    ]
  }
}

Airport arrivals

GET /api/v3/airport/{icao}/arrival

This endpoint enables developers to query and retrieve arrivals to the specific airport.

REQUEST

https://fshub.io/api/v3/airport/{icao}/arrival

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airport/EGSS/arrival"

RESPONSE

{
	"data": [
		{
			"id": 311255,
			"user": {
				"id": 2,
				"name": "Bobby Allen"
			},
			"airline": null,
			"aircraft": {
				"icao": "PC12",
				"icao_name": "Pilatus PC-12",
				"name": "CARENADO PC12 5",
				"type": "Pilatus",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 25,
			"landing_rate": -179,
			"distance": {
				"nm": 39,
				"km": 21
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 649,
			"departure": {
				"icao": "EGSX",
				"iata": "",
				"name": "North Weald",
				"time": "2017-09-28T12:04:23.000000Z",
				"geo": {
					"lat": 51.719092,
					"lng": 0.151399
				},
				"hdg": {
					"mag": 21,
					"true": 19
				},
				"spd": {
					"tas": 87
				},
				"fuel": 1232,
				"pitch": -3,
				"bank": 1,
				"wind": {
					"spd": 0,
					"dir": 0
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2017-09-28T12:15:19.000000Z",
				"geo": {
					"lat": 51.890969,
					"lng": 0.243634
				},
				"hdg": {
					"mag": 226,
					"true": 224
				},
				"spd": {
					"tas": 73
				},
				"fuel": 1207,
				"pitch": -1,
				"bank": 1,
				"wind": {
					"spd": 0,
					"dir": 0
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/311255"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/2"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGSX"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/311255\/screenshot"
				}
			]
		},
		{
			"id": 313402,
			"user": {
				"id": 1,
				"name": "Anonymous"
			},
			"airline": null,
			"aircraft": {
				"icao": "B738",
				"icao_name": "Boeing 737-800",
				"name": "Boeing 737-8ASNGX Ryanai",
				"type": "BOEING",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 0,
			"landing_rate": -221,
			"distance": {
				"nm": 634,
				"km": 342
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 236,
			"departure": null,
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2017-10-01T18:59:50.000000Z",
				"geo": {
					"lat": 51.880041,
					"lng": 0.22734
				},
				"hdg": {
					"mag": 44,
					"true": 42
				},
				"spd": {
					"tas": 144
				},
				"fuel": 19862,
				"pitch": -3,
				"bank": 0,
				"wind": {
					"spd": 0,
					"dir": 0
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/313402"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/1"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/313402\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 311254,
			"prev": 0,
			"next": 313402,
			"count": 10
		}
	}
}

Airport departures

GET /api/v3/airport/{icao}/departure

This endpoint enables developers to query and retrieve departures from the specific airport.

REQUEST

https://fshub.io/api/v3/airport/{icao}/departure

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airport/EGSS/departure"

RESPONSE

{
	"data": [
		{
			"id": 1796019,
			"user": {
				"id": 7253,
				"name": "Kieron Johnson"
			},
			"airline": null,
			"aircraft": {
				"icao": "A20N",
				"icao_name": "Airbus A320 neo",
				"name": "Airbus A320 Neo (FBW) Ea",
				"type": "TT:ATCCOM.ATC_NAME AIRB",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 0,
			"landing_rate": -92,
			"distance": {
				"nm": 320,
				"km": 593
			},
			"max": {
				"alt": 35147,
				"spd": 458
			},
			"time": 3843,
			"departure": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2022-02-22T10:33:40.000000Z",
				"geo": {
					"lat": 51.88384,
					"lng": 0.233084
				},
				"hdg": {
					"mag": 0,
					"true": 222
				},
				"spd": {
					"tas": 159
				},
				"fuel": 5643,
				"pitch": -11,
				"bank": 0,
				"wind": {
					"spd": 16,
					"dir": 231
				}
			},
			"arrival": {
				"icao": "EGPF",
				"iata": "GLA",
				"name": "Glasgow",
				"time": "2022-02-22T11:38:19.000000Z",
				"geo": {
					"lat": 55.874265,
					"lng": -4.429038
				},
				"hdg": {
					"mag": 231,
					"true": 229
				},
				"spd": {
					"tas": 128
				},
				"fuel": 5643,
				"pitch": -1,
				"bank": 1,
				"wind": {
					"spd": 15,
					"dir": 252
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1796019"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/7253"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGPF"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1796019\/screenshot"
				}
			]
		},
        ...
		{
			"id": 1797029,
			"user": {
				"id": 87,
				"name": "Oliver Ma"
			},
			"airline": {
				"id": 520,
				"name": "euroSKIES",
				"abbr": "ESK",
				"owner": {
					"id": 87,
					"name": "Oliver Ma",
					"bio": "Live your life by a compass, not a clock.",
					"handles": {
						"facebook": null,
						"twitter": null,
						"website": null,
						"vatsim": "1546118",
						"ivao": "406438"
					},
					"base": "EDDC",
					"locale": "LEIB",
					"gps": {
						"lat": 38.876149,
						"lng": 1.370682
					},
					"timezone": "Europe\/Berlin",
					"country": "DE",
					"is_online": false,
					"online_at": "2022-02-23T20:46:42.303920Z",
					"created_at": "2016-10-24T23:53:53.000000Z",
					"links": [
						{
							"rel": "self",
							"uri": "\/pilot\/87"
						},
						{
							"rel": "flights",
							"uri": "\/pilot\/87\/flight"
						},
						{
							"rel": "screenshots",
							"uri": "\/pilot\/87\/screenshot"
						}
					]
				},
				"handles": {
					"facebook": "http:\/\/facebook.com\/euroSKIES\/",
					"twitter": null,
					"website": "http:\/\/euroskies.net"
				},
				"links": [
					{
						"rel": "self",
						"uri": "\/airline\/520"
					},
					{
						"rel": "pilots",
						"uri": "\/airline\/520\/pilot"
					},
					{
						"rel": "flights",
						"uri": "\/airline\/520\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/airline\/520\/screenshot"
					}
				]
			},
			"aircraft": {
				"icao": "B738",
				"icao_name": "Boeing 737-800",
				"name": "B737-800 D-AESB euroSKIE",
				"type": "BOEING",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 0,
			"landing_rate": -118,
			"distance": {
				"nm": 858,
				"km": 1590
			},
			"max": {
				"alt": 36344,
				"spd": 477
			},
			"time": 7853,
			"departure": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2022-02-23T18:25:28.000000Z",
				"geo": {
					"lat": 51.885439,
					"lng": 0.235606
				},
				"hdg": {
					"mag": 0,
					"true": 223
				},
				"spd": {
					"tas": 158
				},
				"fuel": 20891,
				"pitch": -9,
				"bank": 0,
				"wind": {
					"spd": 15,
					"dir": 220
				}
			},
			"arrival": {
				"icao": "LEIB",
				"iata": "IBZ",
				"name": "Ibiza",
				"time": "2022-02-23T20:36:52.000000Z",
				"geo": {
					"lat": 38.869595,
					"lng": 1.36507
				},
				"hdg": {
					"mag": 63,
					"true": 64
				},
				"spd": {
					"tas": 135
				},
				"fuel": 20891,
				"pitch": -6,
				"bank": 0,
				"wind": {
					"spd": 5,
					"dir": 135
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1797029"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/87"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/LEIB"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1797029\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 1795980,
			"prev": 0,
			"next": 1797029,
			"count": 6
		}
	}
}

Airport arrivals from

GET /api/v3/airport/{icao}/arrival/{from-icao}

This endpoint enables developers to query and retrieve arrivals to a specific airport, from a specific airport.

REQUEST

https://fshub.io/api/v3/airport/{icao}/arrival/{from-icao}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airport/EGSS/arrival/KJFK"

RESPONSE

{
	"data": [
		{
			"id": 307262,
			"user": {
				"id": 1,
				"name": "Anonymous"
			},
			"airline": null,
			"aircraft": {
				"icao": "B744",
				"icao_name": "Boeing 747-400",
				"name": "PMDG 747-4R7F Cargolux (",
				"type": "BOEING",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 68628,
			"landing_rate": -159,
			"distance": {
				"nm": 5720,
				"km": 3089
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 22019,
			"departure": {
				"icao": "KJFK",
				"iata": "JFK",
				"name": "Kennedy Intl",
				"time": "2017-05-26T09:54:31.000000Z",
				"geo": {
					"lat": 40.640729,
					"lng": -73.799851
				},
				"hdg": {
					"mag": 314,
					"true": 301
				},
				"spd": {
					"tas": 175
				},
				"fuel": 90438,
				"pitch": -8,
				"bank": 0,
				"wind": {
					"spd": 7,
					"dir": 350
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2017-05-26T16:01:32.000000Z",
				"geo": {
					"lat": 51.87776,
					"lng": 0.223963
				},
				"hdg": {
					"mag": 43,
					"true": 43
				},
				"spd": {
					"tas": 155
				},
				"fuel": 21810,
				"pitch": -3,
				"bank": 0,
				"wind": {
					"spd": 14,
					"dir": 120
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/307262"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/1"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/KJFK"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/307262\/screenshot"
				}
			]
		},
        ...
		{
			"id": 1670807,
			"user": {
				"id": 1,
				"name": "Anonymous"
			},
			"airline": null,
			"aircraft": {
				"icao": "B744",
				"icao_name": "Boeing 747-400",
				"name": "PMDG 747-400BCF Fly UK C",
				"type": "BOEING",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 58402,
			"landing_rate": -630,
			"distance": {
				"nm": 3080,
				"km": 5704
			},
			"max": {
				"alt": 38143,
				"spd": 497
			},
			"time": 24011,
			"departure": {
				"icao": "KJFK",
				"iata": "JFK",
				"name": "Kennedy Intl",
				"time": "2021-07-28T00:46:16.000000Z",
				"geo": {
					"lat": 40.636179,
					"lng": -73.774496
				},
				"hdg": {
					"mag": 44,
					"true": 31
				},
				"spd": {
					"tas": 166
				},
				"fuel": 79229,
				"pitch": -10,
				"bank": 0,
				"wind": {
					"spd": 0,
					"dir": 0
				}
			},
			"arrival": {
				"icao": "EGSS",
				"iata": "STN",
				"name": "Stansted",
				"time": "2021-07-28T07:26:37.000000Z",
				"geo": {
					"lat": 51.881677,
					"lng": 0.22974
				},
				"hdg": {
					"mag": 42,
					"true": 42
				},
				"spd": {
					"tas": 149
				},
				"fuel": 20827,
				"pitch": -3,
				"bank": -1,
				"wind": {
					"spd": 0,
					"dir": 0
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1670807"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/1"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/KJFK"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGSS"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1670807\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 1670807,
			"count": 3
		}
	}
}

Airport departures to specific airport

GET /api/v3/airport/{icao}/departure/{to-icao}

This endpoint enables developers to query and retrieve departures from the specific airport, to a specific airport.

REQUEST

https://fshub.io/api/v3/airport/{icao}/departure/{to-icao}

HEADERS

Content-Type: application/json
X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT

CURL EXAMPLE

curl -X GET -H "Content-Type: application/json" -H "X-Pilot-Token: HbS0fI8bJ0rdZxJYIYGqQrqAOMmY1iU0IwyvAczM0kMmlSDWqVVQDB1tzOPYYYlT" "https://fshub.io/api/v3/airport/EGPF/departure/EGPG"

RESPONSE

{
	"data": [
		{
			"id": 274998,
			"user": {
				"id": 412,
				"name": "Jim Hamilton"
			},
			"airline": null,
			"aircraft": {
				"icao": "B190",
				"icao_name": "Beechcraft 1900",
				"name": "Carenado B1900D United E",
				"type": "Beechcraft",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 40,
			"landing_rate": -80,
			"distance": {
				"nm": 35,
				"km": 19
			},
			"max": {
				"alt": null,
				"spd": null
			},
			"time": 507,
			"departure": {
				"icao": "EGPF",
				"iata": "GLA",
				"name": "Glasgow",
				"time": "2017-04-11T20:26:35.000000Z",
				"geo": {
					"lat": 55.869771,
					"lng": -4.437362
				},
				"hdg": {
					"mag": 50,
					"true": 46
				},
				"spd": {
					"tas": 138
				},
				"fuel": 2046,
				"pitch": -4,
				"bank": 0,
				"wind": {
					"spd": 0,
					"dir": 360
				}
			},
			"arrival": {
				"icao": "EGPG",
				"iata": null,
				"name": "Cumbernauld",
				"time": "2017-04-11T20:35:03.000000Z",
				"geo": {
					"lat": 55.974631,
					"lng": -3.975411
				},
				"hdg": {
					"mag": 76,
					"true": 72
				},
				"spd": {
					"tas": 80
				},
				"fuel": 2006,
				"pitch": -9,
				"bank": 0,
				"wind": {
					"spd": 1,
					"dir": 355
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/274998"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/412"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGPF"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGPG"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/274998\/screenshot"
				}
			]
		},
        ...
		{
			"id": 1663488,
			"user": {
				"id": 4947,
				"name": "Bryan NAPPER"
			},
			"airline": {
				"id": 1341,
				"name": "Coastal International",
				"abbr": "CIV",
				"owner": {
					"id": 4032,
					"name": "Alex 002",
					"bio": "Chief of Operations\r\nPrimary responsibility for the operation of the VA",
					"handles": {
						"facebook": "https:\/\/www.facebook.com\/groups\/240689586609942",
						"twitter": null,
						"website": null,
						"vatsim": null,
						"ivao": null
					},
					"base": "MMTO",
					"locale": "TUPW",
					"gps": {
						"lat": 54.336447,
						"lng": 12.713499
					},
					"timezone": "America\/Monterrey",
					"country": "MX",
					"is_online": true,
					"online_at": "2022-02-24T15:21:12.867218Z",
					"created_at": "2020-11-07T01:30:28.000000Z",
					"links": [
						{
							"rel": "self",
							"uri": "\/pilot\/4032"
						},
						{
							"rel": "flights",
							"uri": "\/pilot\/4032\/flight"
						},
						{
							"rel": "screenshots",
							"uri": "\/pilot\/4032\/screenshot"
						}
					]
				},
				"handles": {
					"facebook": "https:\/\/www.facebook.com\/groups\/240689586609942",
					"twitter": null,
					"website": "https:\/\/flyciva.boards.net"
				},
				"links": [
					{
						"rel": "self",
						"uri": "\/airline\/1341"
					},
					{
						"rel": "pilots",
						"uri": "\/airline\/1341\/pilot"
					},
					{
						"rel": "flights",
						"uri": "\/airline\/1341\/flight"
					},
					{
						"rel": "screenshots",
						"uri": "\/airline\/1341\/screenshot"
					}
				]
			},
			"aircraft": {
				"icao": "BE58",
				"icao_name": "Beechcraft Baron (58)",
				"name": "Asobo Baron G58",
				"type": "TT:ATCCOM.ATC_NAME_BEEC",
				"user_conf": {
					"tail": "",
					"icao": ""
				}
			},
			"plan": null,
			"fuel_used": 0,
			"landing_rate": -201,
			"distance": {
				"nm": 17,
				"km": 31
			},
			"max": {
				"alt": 2006,
				"spd": 186
			},
			"time": 468,
			"departure": {
				"icao": "EGPF",
				"iata": "GLA",
				"name": "Glasgow",
				"time": "2021-07-16T00:51:53.000000Z",
				"geo": {
					"lat": 55.866518,
					"lng": -4.443392
				},
				"hdg": {
					"mag": 47,
					"true": 43
				},
				"spd": {
					"tas": 100
				},
				"fuel": 169,
				"pitch": -3,
				"bank": 1,
				"wind": {
					"spd": 1,
					"dir": 266
				}
			},
			"arrival": {
				"icao": "EGPG",
				"iata": null,
				"name": "Cumbernauld",
				"time": "2021-07-16T00:59:42.000000Z",
				"geo": {
					"lat": 55.973937,
					"lng": -3.979485
				},
				"hdg": {
					"mag": 77,
					"true": 73
				},
				"spd": {
					"tas": 65
				},
				"fuel": 169,
				"pitch": -7,
				"bank": 0,
				"wind": {
					"spd": 1,
					"dir": 263
				}
			},
			"links": [
				{
					"rel": "self",
					"uri": "\/flight\/1663488"
				},
				{
					"rel": "pilot",
					"uri": "\/pilot\/4947"
				},
				{
					"rel": "departure-airport",
					"uri": "\/airport\/EGPF"
				},
				{
					"rel": "arrival-airport",
					"uri": "\/airport\/EGPG"
				},
				{
					"rel": "screenshots",
					"uri": "\/flight\/1663488\/screenshot"
				}
			]
		}
	],
	"meta": {
		"cursor": {
			"current": 0,
			"prev": 0,
			"next": 1663488,
			"count": 7
		}
	}
}