On the air API

Assets

/api/assets

Request
field description
asset_type filter the report by asset_type. For valid values see 'name' in 'assettypes'
updated_since filter the report to include only records updated since a specific date. Valid values are a timestamp or date in 'yyyy-mm-dd' format.
is_active Set to any value to include expired or deleted records in the results
minor Set to any value to exclude minor reserves (marginal strins and special purpise reserves
Response
field description
id Internal ID
code Unique code
name Name
minor true: Indicates a marginal strip or special-purpose reserve. Minor reserves are included in the site's search results by default.
is_active true: current active record
false: expired or deleted record
location WKT format location (EPSG:4326).
For polygons this it the centroid (if that lies within the polygon) or an arbitrary point within the polygon

AssetTypes

/api/assettypes

Request
field description
none
Response
field description
id Internal ID
name Name
display_name Display name for this asset type on forms
pnp_class Equivalent class on ParksNPeaks
keep_score true: asset types for which scores are tracked in 'ontheair.nz'

AssetLinks

/api/assetlinks

Request
field description
contained_by_assets True: Show child assets associated with this parent (assets contained by the listed asset).
False (or undefined): Show parent assets (asset containing the listed asset)
id string: specify an asset code to return only details for the specified asset. Otherwise return all assets
asset_type string: return only results for the asset type specified. Can be combined with contained_by_assets if required
Response
field description
id Internal ID
contained_code Asset code of parent asset
containing_code Asset code of child asset

logs

/api/logs (POST)

Request
field description
userID string: callsign of the user (as used to register/login to ontheair.nz)
APIKey string: PIN for the user (see user profile to view/set) or ParksNPeaks key for users with a ParksNPeaks account. Note pin and key are not same as password
file file: multi-part post part containing adif log to be uploaded
(Example) curl -F "userID=zl4test" -F "APIKey=XXXX" -F file=@zl4test.adi https://ontheair.nz/api/logs
Response
field description
success true (log created) or false (log creation failed)
message Error or Warning messages resulting from log or contact creation

spots

/api/spots (GET)

Request
field description
start_time optional: Retrieve only spots > this time (format: 'YYYY-MM-DD HH:MM:SS' UTC). Default is 2 hours ago
zlota_only optional: Include this parameter with any value to retrieve only spots for assets in the ZLOTA scheme (default is all locally created spots from ontheair)
Response
field description
activator string: callsign of the activator
spotter string: callsign of the spotter
name string: name of the place being activated
reference string: reference of the place being activated (or name if free activation)
frequency string: frequency in kHz (note the unit)
mode string: transmission mode (e.g. SSB, CW, ...)
referenced_time time: time of spot
comments string: comments

spots

/api/spots (POST)

Request
field description
userID string: callsign of the user (as used to register/login to ontheair.nz or ParksNPeaks)
APIKey string: PIN for the user (see user profile to view/set) or ParksNPeaks key for users with a ParksNPeaks account. Note pin and key are not same as password
activator string: callsign of the activator
spotter string: callsign of the spotter
reference string: reference of the place being activated (or name if free activation)
frequency string: frequency in kHz (note the unit)
mode string: transmission mode (e.g. SSB, CW, ...)
comments string: comments. Note incuding the word 'DEBUG' will post in the test spots topic (found in the Info menu) and will not appear it the main spots list, and will not be sent out to other users.
do_not_lookup optional: including this parameter with any value will disable lookup of containing assets (e.g. if you post a spot for a summit only the summit will appear in the spot, rather than the summit and any park it lies within)
(Example) curl -F "userID=ZL4TEST" -F "APIKey=XXXX" -F "do_not_lookup=true" -F "activator=ZL2TEST" -F "spotter=ZL3TEST" -F "reference=ZLL/0002" -F "frequency=7090" -F "mode=SSB" -F "comments=DEBUG testing spotting API" https://ontheair.nz/api/spots
Response
field description
success true (spot created) or false (spot creation failed)
message Error or Warning messages resulting from spot creation