cqGMA - Global Mountain Activity
cqGMA - Global Mountain Activity
Download .md

cqGMA Reference Activations API

Overview

The cqGMA Reference Activations API provides activation history for:

* GMA Summits
* MOTA (Mills)

The API returns:

* Activation date
* Activator callsign
* Number of QSOs
* Total activation count
* Total QSO count

---

API Key

An API key is required for access.

API keys can be requested via the cqGMA support team:

https://www.cqgma.org/support/contact.html

Example API key:

GMA-1234-XXXXXXXXXX

---

API URL

https://www.cqgma.org/api/ref_activations.php

---

Parameters

| Parameter | Description |
| --------- | ------------ |
| key | Your API key |
| ref | Reference |

---

Examples

Summit

https://www.cqgma.org/api/ref_activations.php?key=GMA-1234-XXXXXXXXXX&ref=SO/BI-001

MOTA (Mill)

https://www.cqgma.org/api/ref_activations.php?key=GMA-1234-XXXXXXXXXX&ref=X32835

---

Example Return JSON

{
  "ok": true,
  "ref": "SO/BI-001",
  "name": "Wielka Racza",
  "program": "GMA",
  "type": 0,
  "activation_count": 14,
  "qso_count": 309,
  "activations": [
    {
      "date": "20170923",
      "mycall": "SP9MA/P",
      "qsos": 7
    },
    {
      "date": "20170923",
      "mycall": "SP/HB9BIN/P",
      "qsos": 16
    }
  ]
}

---

Error Messages

Missing API Key

{
  "ok": false,
  "error": "missing_api_key"
}

Invalid API Key

{
  "ok": false,
  "error": "invalid_api_key"
}

Missing Reference

{
  "ok": false,
  "error": "missing_ref"
}

Unknown Reference

{
  "ok": false,
  "error": "unknown_ref"
}

---

Simple PHP Example

<?php

$key = 'GMA-1234-XXXXXXXXXX';
$ref = 'SO/BI-001';

$url = 'https://www.cqgma.org/api/ref_activations.php?key=' .
urlencode($key) .
'&ref=' .
urlencode($ref);

$json = file_get_contents($url);

$data = json_decode($json, true);

echo 'Activations: ' . $data['activation_count'] . PHP_EOL;
echo 'QSOs: ' . $data['qso_count'] . PHP_EOL;

?>

---

Notes

* References are case-insensitive
* JSON is UTF-8 encoded
* API access requires a valid API key
* One activator on one reference on one day is counted as one activation
* The number of QSOs is calculated from all matching log entries

---

Contact

CQGMA Website:

https://www.cqgma.org

Support:

https://www.cqgma.org/support/contact.html