Skip to content

API key

The API key is for automations: a script watching the state of the bases, an external dashboard, an alarm of your own. It reads the same data you see, without your account password going around.

Generating it

Settings → API key → Generate key.

The key is shown once only, when it is created: LiveRTK keeps just its fingerprint, so there is no way to see it again. Lose it and you generate another one — the old one stops working.

The API key section The API key section

Command What it does
Generate / Regenerate Creates a new key; any previous one stops working at once
Revoke Deletes the key: automations using it stop working

Using it

It travels in the X-API-Key header:

curl -H "X-API-Key: lrtk_your_key" \
     https://livertk.solutop.eu/api/mount-points
import requests

KEY = "lrtk_your_key"
BASE = "https://livertk.solutop.eu/api"

r = requests.get(f"{BASE}/base-stations", headers={"X-API-Key": KEY}, timeout=10)
data = r.json()

for base in data["stations"]:
    print(base["name"], base["status"])

for rover in data["clients"]:
    print(rover["username"], "->", rover["mountPoint"], "fix", rover["fixQuality"])

What you can read

With the key, every GET route of the panel answers, with the permissions of the account that generated it. A client receives only their own data: their mount points and those shared with them, the connections that concern them, their recordings.

Endpoint Content
/api/mount-points The visible mount points, with status, connected rovers, stream and number of recordings. The password never comes out: there is only hasPassword
/api/mount-points/:id One mount point in detail: RTCM messages received, constellations, rovers connected now and the last 20 connections
/api/base-stations Bases and rovers with position, baseline and fix status
/api/stats The real-time summary: how long the caster has been up, connected sources and rovers, active mount points, bytes received and sent. For a client the counts stop at their own connections
/api/stats/connections The connections open now, one per row: type (source or client), mount point, user, IP address, bytes, stream in bytes per second and, for rovers, position, fix and satellites
/api/stats/mount-points For each mount point with an open connection: whether the source is there, how many rovers, bytes, stream, last data and the program that is streaming
/api/stats/admin-summary Totals: users, mount points, today's connections, overall traffic
/api/stats/history?days=30 Connections and traffic day by day (at most 365 days)
/api/stats/detailed The totals, plus the ten mount points and the ten users with the most connections
/api/export/connections?from=YYYY-MM-DD&to=YYYY-MM-DD The connection history, in CSV
/api/recordings The recordings and their status (?mountPointId= for a single mount point)
/api/recordings/quota The space taken by your recordings and the limit
/api/recordings/:id/download/:type The file of a recording: rtcm3, obs, nav, obs.gz or nav.gz
/api/auth/me Your profile and your preferences
/api/auth/sessioni Your sign-ins (?dal= and ?al=, by default the last seven days)
/api/auth/api-key Whether you have an active key and when it was created (not the key itself)
/api/health Whether the service answers — this one needs no key at all

These instead answer only an administrator's key; a client's key gets 403:

Endpoint Content
/api/users All users, with role, email, status, last sign-in and assigned mount points
/api/users/:id One user, with the same data
/api/logs The saved system events (?limit=, at most 1000, and ?source=)
/api/export/logs?from=YYYY-MM-DD&to=YYYY-MM-DD The system events, in CSV
/api/settings The caster settings
/api/system/info Machine and process: memory, load, Node version, ports

Rules and limits

Read only

Only GET requests pass with the key. Any attempt to create, change or delete something gets 403: a key that ends up in the wrong hands cannot do damage.

  • The key carries the permissions of the user who generated it: a client sees their own mounts, an administrator sees everything.
  • It works as long as the account is active and verified.
  • Responses are JSON, except the exports (CSV) and the recording files.
Code Meaning
200 All good
401 Key missing, wrong or revoked
403 Method other than GET, resource not yours, or administrator endpoint with a client key
404 Endpoint that does not exist

Treat it like a password

Whoever holds the key reads your data. Keep it out of public repositories, and revoke it the moment you suspect it has leaked.