Skip to main content

Usage

Connection#

The following curl command connects to the history endpoint, retrieves data from 8 hours ago(UTC) until 7 hours ago(UTC), for the specified ICAO address, and prints the received data to the console.

curl -H "Authorization: Bearer <your_token>" "https://api.airsafe.spire.com/v2/targets/history?icao_address=4072EA&start=2021-09-27T03:54:03.408Z&end=2021-09-27T04:54:03.408Z"

Query Parameters#

The following parameters can be specified to retrieve historical data with more accuracy. Since these are query parameters the total number of filters that can be specified is limited by the maximum URL length.

info

The query parameters start and end are mandatory in order to retrieve data.

You will then also need to add at least one additional filtering parameter such as a list of icao_address or latitude_between and longitude_between to specify your query.

Query ParametersTypeDescription
startdatetimeRequired - History data extraction starting date, format is in ISO 8601
enddatetimeRequired - History data extraction ending date, format is in ISO 8601
icao_addressstringComma separated list of ICAO addresses (6 hex characters)
latitude_betweenfloat,floatTwo numbers, separated by a comma. First value must be smaller than the second; specifies south-to-north range. First value is inclusive, last value is exclusive
longitude_betweenfloat,floatTwo numbers, separated by a comma. Specifies west-to-east range. E.g. range [170, -170) is a 20° range crossing anti-meridian, and [-170, 170) is a 340° range covering most of the globe. First value is inclusive, last value is exclusive