API - AusCovid19/covid19-aus-flights GitHub Wiki
This page describes the API calls you can perform on the application.
Please credit the original author (Eric Jiang, https://github.com/ericjiang97 ) when using this API.
ROOT URI: https://covid19-flights.ericjiang.dev
This API call gets all the flights.
The results are ordered from the most recent to the most oldest.
GET {{ROOT_URI}}/api/
[
{
"airline": "Virgin Australia",
"flight_number": "VA640",
"origin": "Sydney",
"destination": "Canberra",
"arrival_date": "Wed 18 March 2020",
"symptoms_onset_date": "Wed 1 April 2020",
"close_contact_rows": "3,4,5,6,7",
"reporting_state": "ACT"
},
{
"airline": "Emirates",
"flight_number": "EY450",
"origin": "Abu Dhabi",
"destination": "Sydney",
"arrival_date": "Wed 18 March 2020",
"symptoms_onset_date": "Wed 1 April 2020",
"close_contact_rows": "42,43,44,45,46",
"reporting_state": "ACT"
},
{
"airline": "Qantas",
"flight_number": "QF2",
"origin": "Singapore",
"destination": "Sydney",
"arrival_date": "Tue 17 March 2020",
"close_contact_rows": "74, 75, 76, 77",
"reporting_state": "NSW",
"symptoms_onset_date": "Tue 31 March 2020"
}
]
GET {{ROOT_URI}}/api?before_arrival_date={date}&after_arrival_date={date}
This API call gets all the flights between a date range, it requires the before_arrival_date and after_arrival_date query params.
The results are ordered from the most recent to the most oldest.
| Query Param | Description | Type |
|---|---|---|
after_arrival_date |
Arrival dates of flights after this date | String - date format, ISO preferred |
before_arrival_date |
Arrival dates of flights before this date | String - date format, ISO preferred |
GET {{ROOT_URI}}/api?before_arrival_date=2020-03-21&after_arrival_date=2020-03-10
[
{
"airline": "Virgin Australia",
"flight_number": "VA640",
"origin": "Sydney",
"destination": "Canberra",
"arrival_date": "Wed 18 March 2020",
"symptoms_onset_date": "Wed 1 April 2020",
"close_contact_rows": "3,4,5,6,7",
"reporting_state": "ACT"
},
{
"airline": "Emirates",
"flight_number": "EY450",
"origin": "Abu Dhabi",
"destination": "Sydney",
"arrival_date": "Wed 18 March 2020",
"symptoms_onset_date": "Wed 1 April 2020",
"close_contact_rows": "42,43,44,45,46",
"reporting_state": "ACT"
},
]
GET {{ROOT_URI}}/api/search?query={searchString}
This API call returns a list of flights which match the target search string using the Fuzzy Search algorithm (powered by Fuse.js) and returns it in the order of closest to search param
| Query Param | Description | Type |
|---|---|---|
query |
The string you want to search for | string |
The search weightings are as follows:
| Attribute | Weighting |
|---|---|
| destination | 0.9 |
| origin | 0.7 |
| airline | 0.6 |
| flight_number | 0.6 |
| reporting_state | 0.4 |
GET {{ROOT_URI}}/api/search?query=Qantas
[{ "airline": "Qantas", "flight_number": "QF8", "origin": "Dallas", "destination": "Sydney", "arrival_date": "Mon 09 March 2020", "close_contact_rows": "58, 59, 60, 61, 62", "reporting_state": "NSW", "symptoms_onset_date": "Mon 23 March 2020" }, { "airline": "Qantas", "flight_number": "QF8", "origin": "Dallas", "destination": "Sydney", "arrival_date": "Mon 16 March 2020", "close_contact_rows": "2, 3, 4, 5, 48", "reporting_state": "NSW", "symptoms_onset_date": "Mon 30 March 2020" }, ]