API - wavelog/wavelog GitHub Wiki

image

The Wavelog API allows you to interact with Wavelog via third-party tools, this might be radios, external logging applications or programs, you can generate two types of keys read-only or read/write depending on your requirements.

At any time you can come to this section and delete keys to remove access.

api/qso/

The QSO function allows you to send ADIF QSO strings via JSON to be imported into Wavelog, dupe checking is handled on the fly and you can send more than one QSO at a time.

{
    "key":"YOUR_API_KEY",
    "station_profile_id":"Station Profile ID Number",
    "type":"adif",
    "string":"<call:5>N9EAT<band:4>70cm<mode:3>SSB<freq:10>432.166976<qso_date:8>20190616<time_on:6>170600<time_off:6>170600<rst_rcvd:2>59<rst_sent:2>55<qsl_rcvd:1>N<qsl_sent:1>N<country:24>United States Of America<gridsquare:4>EN42<sat_mode:3>U/V<sat_name:4>AO-7<prop_mode:3>SAT<name:5>Marty<eor>"
}

Example Linux shell command:

curl -X POST https://<WAVELOG_URL>/index.php/api/qso -H "Content-Type: application/json" -H "Accept: application/json" -d "{\"key\":\"<API_KEY>\",\"station_profile_id\":\"<STATION_PROFILE_ID>\",\"type\":\"adif\",\"string\":\"<call:5>N9EAT<band:4>70cm<mode:3>SSB<freq:10>432.166976<qso_date:8>20190616<time_on:6>170600<time_off:6>170600<rst_rcvd:2>59<rst_sent:2>55<qsl_rcvd:1>N<qsl_sent:1>N<country:24>United States Of America<gridsquare:4>EN42<sat_mode:3>U/V<sat_name:4>AO-7<prop_mode:3>SAT<name:5>Marty<eor>\"}"
  • station_profile_id - This can be found when editing a station profile its a number and displayed in the URL string.

api/get_contacts_adif

This function allows you to stream json-embedded ADIF Exports from Wavelog for integration with 3rd-party software.

Input format:

{
    "key":"YOUR_API_KEY",   // API-Key, read-only at least
    "station_id":"Station Profile ID Number",  //Station ID for the station that we want to pull QSOs from
    "fetchfromid":0  //Internal database primary inside Wavelog of the last pulled QSO. Start at 0 to get all QSOs.
}

Output format:

{
    "exported_qsos":5,   // The number of exported QSOs
    "lastfetchedid":4886,  // The internal primary key of the last exported QSO for you to use in your next input
    "message":"Export successful",  // A message containing success or reason for failure
    "adif": "ADIF STRING"  // ADIF file with all qsos since your last pull
}

api/radio

Standard Radio API Call

{
   "key":"YOUR_API_KEY", 
   "radio":"FT-950",
   "frequency":14075,
   "mode":"SSB",
   "power": '', // Optional field defined in watts
   "timestamp":"2012/04/07 16:47"
}

Satellite Data

{
   "key":"YOUR_API_KEY",
   "radio":"SATPC32",
   "uplink_freq": "2400210000",
   "downlink_freq": "10489710000", 
   "uplink_mode": "SSB", 
   "downlink_mode": "SSB", 
   "sat_mode": "S/X", // Not required
   "sat_name": "QO-100", 
   "power": '', // Optional field defined in watts
   "timestamp":"2012/04/07 16:47" 
}

Radio API Call

{
    "key": "YOUR_API_KEY",          // API-Key
    "radio": "QO-100 Station",      // Name of the radio (used for assigning received data)
    "frequency": "2400170000",      // Frequency in Hz
    "mode": "SSB",                  // Mode
    "frequency_rx": "10489670000",  // Optional Rx frequency in Hz
    "mode_rx": "SSB",               // Optional Rx mode (not logged)
    "prop_mode": "SAT",             // Optional propagation mode
    "sat_name": "QO-100",           // Optional satellite name
    "power": "5",                   // Optional transmit power in Watts
}

api/logbook_check_callsign

This allows you to check if a callsign is in the logbook

{
    "key":"", // Wavelog API Key
    "logbook_public_slug":"", // This is the Station Logbook Public Slug
    "band":"2m", // This is optional if you want to search satellite qsos only set the band as SAT
    "callsign":""
}

api/logbook_check_grid

This allows you to check if a grid is in the logbook

{
    "key":"", // Wavelog API Key
    "logbook_public_slug":"", // This is the Station Logbook Public Slug
    "band":"2m", // This is optional if you want to search satellite qsos only set the band as SAT
    "grid":""
}

api/statistics

Returns the active profile stats that would show on the dashboard

  • Todays QSOs
  • Months QSOs
  • Years QSOs
  • Total QSOs

For this to work via V2 of Wavelog and public access (i.e. not logged in) you need to provide a valid (e.g. read-only) API key in the URL. That simply needs to be set on the URL like:

https://your.wavelog.url/index.php/api/statistics/clPutYourApiKeyHere

api/station_info

Returns information about stations (logbook locations) belonging to the user who has the corresponding API key:

[
{
station_id: "1",
station_profile_name: "JO30oo / DJ7NT",
station_gridsquare: "JO30OO",
station_callsign: "DJ7NT",
station_active: "1"
},
{
station_id: "2",
station_profile_name: "JO30oo / DO7INT",
station_gridsquare: "JO30OO",
station_callsign: "DO7INT",
station_active: null
}
]

For this to work via V2 of Wavelog and public access (i.e. not logged in) you need to provide a valid (e.g. read-only) API key in the URL. That simply needs to be set on the URL like:

https://your.wavelog.url/index.php/api/station_info/clPutYourApiKeyHere

api/private_lookup (Since 1.8.6.)

This api checks the (API-)owners logbook for confirmations.

Details:

curl https://[URL]/api/private_lookup -X POST -d '{"key":"[key]","callsign":"VK4XY","band":"20m","mode":"SSB"}'

returns:

{
    "callsign": "VK4XY",
    "dxcc": "AUSTRALIA",
    "dxcc_id": "150",
    "dxcc_lat": "-22",
    "dxcc_long": "135",
    "dxcc_cqz": "30",
    "dxcc_flag": "\ud83c\udde6\ud83c\uddfa",
    "cont": "OC",
    "name": "",
    "gridsquare": "",
    "location": "",
    "iota_ref": "",
    "state": "",
    "us_county": "",
    "qsl_manager": "",
    "bearing": "",
    "call_worked": true,
    "call_worked_band": true,
    "call_worked_band_mode": true,
    "lotw_member": false,
    "dxcc_confirmed_on_band": true,
    "dxcc_confirmed_on_band_mode": true,
    "dxcc_confirmed": true,
    "call_confirmed": true,
    "call_confirmed_band": true,
    "call_confirmed_band_mode": true,
    "suffix_slash": ""
}

Mandatory Fields within payload:

  • key (your API-Key from AccountSettings --> API)
  • callsign (the Call you want to check)

Optional Fields:

band:

  • if given: api checks if the DXCC of the call was confirmed for this band
  • if not given: dxcc_confirmed_on_band and dxcc_confirmed_on_band_mode will be false as well as call_confirmed_band and call_confirmed_band_mode

mode:

  • if given: api checks if the DXCC of the call was confirmed for this band/mode combination
  • if not given: dxcc_confirmed_on_band_mode will be false as well as call_confirmed_band_mode

station_ids (array!):

  • if given: api checks QSOs within those station_profiles. If ommited: Every station_id of the key-owner will be checked.
  • if given but no given ID was granted: Every station_id of the key-owner will be checked.
  • if given but only a few IDs were granted: The granted IDs will be checked
  • if given as string and not array: Every station_id of the key-owner will be checked.

api/version (Since 2.0)

This Endpoint reports the current version of Wavelog running. A valid API-Key is required.

Input format:

{
    "key":"YOUR_API_KEY",
}

Example response:

{
  "status": "ok",
  "version": "2.0"
}

Example shell command:

curl -X "POST" "https://<WAVELOG_URL>/api/version" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d "{\"key\":\"<YOUR_API_KEY>\"}"

api/get_wp_stats (Since 2.0.1)

This Endpoint reports statistics about number of QSOs total, current year and per mode.

Input format:

{
    "key":"YOUR_API_KEY",
    "station_id":"YOUR_STATION_ID",
}

Example response:

{
  "status": "successful",
  "message": "Export successful",
  "statistics": {
    "totalalltime": [
      {
        "count": "28"
      }
    ],
    "totalthisyear": [
      {
        "count": "7"
      }
    ],
    "totalgroupedmodes": [
      {
        "count": "7",
        "col_mode": "CW",
        "col_submode": null
      },
      {
        "count": "6",
        "col_mode": "FM",
        "col_submode": null
      },
      {
        "count": "5",
        "col_mode": "FSK441",
        "col_submode": null
      },
      {
        "count": "4",
        "col_mode": "FT8",
        "col_submode": null
      },
      {
        "count": "3",
        "col_mode": "JT65",
        "col_submode": null
      },
      {
        "count": "2",
        "col_mode": "JT65",
        "col_submode": "JT65A"
      },
      {
        "count": "1",
        "col_mode": "SSB",
        "col_submode": null
      }
    ]
  }
}

Example shell command:

curl -X "POST" "https://<WAVELOG_URL>/api/get_wp_stats" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d "{\"key\":\"<YOUR_API_KEY>\", \"station_id\":\"<YOUR_STATION_ID>\"}"
⚠️ **GitHub.com Fallback** ⚠️