REST API Reference¶
The RTK Base provides a comprehensive REST API for configuration, monitoring, and control.
Base URL¶
Authentication¶
No authentication required for local network access.
Get System Information¶
GET /get-info¶
Returns full system state as JSON.
Query Parameters (optional bitmask):
| Parameter | Value | Description |
|---|---|---|
0x01 |
INF_STATIC |
Static information (version, serial, hardware) |
0x02 |
INF_RUNTIME |
Runtime information (state, uptime, stats) |
0x04 |
INF_CONFIG |
Configuration settings |
0x100 |
INF_ALL |
Include all sub-fields |
Default: All information returned (0xFFFFFFFF)
Examples:
Response Structure:
{
"esp": {
"version": "4.0.2-12-g9b9367e",
"sha256": "26bbceb7a1663d7c51f21205e629dcd84235c38ed667cdd1b228aa432803fbde",
"idf": "v5.3.1",
"built": "Mar 27 2025",
"serial": "BRRB000021",
"hardware": "RTKWifi_jla",
"partition": "hub_firmware_0",
"productionflag": 2,
"bootcnt": 231,
"state": {
"uptime": 102349957
},
"mem": {
"internal": {
"free": 94456,
"used": 254840,
"freeblocks": 16,
"usedblocks": 961
},
"spiram": {
"free": 3556492,
"used": 623104,
"freeblocks": 4,
"usedblocks": 96
}
}
},
"gnss": {
"zed": {
"module": "ZED-F9P",
"vfirmware": "HPG 1.13",
"vhardware": "00190000",
"vsoftware": "EXT CORE 1.00 (f10c36)",
"serial": "5f4c624d5d"
},
"state": {
"time": 1678971540,
"tm": "2023-03-16_12:59:00",
"status": "ZED_GET_STARTUP_POSITION",
"gps_fix": "fix-3d",
"corrected": true,
"uptime": 78620,
"time_first_fix": 49620,
"satvis": 14,
"satuse": 7,
"antenna": {
"power": 1,
"status": "connected",
"failcnt": 33,
"failtime": 15189,
"oktime": 1678967848
},
"want_corr": 0,
"recvrtcm": {
"elapsed": 3600,
"age": 2,
"count": 1234,
"packets": 567,
"remote": "base/ubxpp/eu/B00001/drtk",
"dist": 150.5
}
},
"config": {
"startup": {
"accuracy": 3.0000,
"delta_max": 7.0000,
"delta_max_corr": 5.0000
},
"recvrtcm": {
"max_age": 30
}
},
"pos": {
"lat": 50.784601124,
"lon": 4.592242596,
"alt": 129.9735,
"x": 4027734.8896,
"y": 323515.0065,
"z": 4918530.3819,
"acc": 0.8676,
"t": 1678971540,
"tm": "2023-03-16_12:59:00",
"delta": 1.2461,
"geoidal-seperation": -46.2167
},
"ref": {
"manual": {
"type": "ecef",
"x": 0.0000,
"y": 0.0000,
"z": 0.0000,
"acc": 0.0000,
"t": 0,
"tm": "1970-01-01_00:00:00",
"hp": true,
"corr": false
},
"survey": {
"type": "ecef",
"x": 0.0000,
"y": 0.0000,
"z": 0.0000,
"acc": 0.0000,
"t": 0,
"tm": "1970-01-01_00:00:00",
"hp": false,
"corr": false,
"state": "forced",
"allow_use": 1,
"accuracy_corr_dyn": 0.5000,
"elapsed": 256,
"count": 257,
"rtcm": {
"age": 0,
"count": 63,
"remote": "base/ubxpp/eu/N5068E00457/drtk",
"dist": 0
},
"config": {
"mintime": 90,
"maxtime": 540,
"accuracy": 1,
"accuracy_corr": 0.5
}
},
"chosen": "survey"
},
"rtcm": {
"msgs": [
{"id": 1005},
{"id": 1077, "interval": 1.0, "since": 0.2},
{"id": 1087, "interval": 1.0, "since": 0.2},
{"id": 1097, "interval": 1.0, "since": 0.1},
{"id": 1127, "interval": 1.0, "since": 0.1},
{"id": 1029, "interval": 1.1, "since": 0.4},
{"id": 1230, "interval": 1.0, "since": 0.1}
],
"stat": {
"recvd": 18457,
"corrupt": 0
},
"subscribers": [
{
"via": "event",
"name": "mqtt-connect",
"seen": -21.7,
"ip": "192.168.1.100"
}
]
}
},
"base": {
"log": {
"save_period": 60
},
"update": {
"state": "Ready to update",
"failed": false,
"progress": 75
},
"state": {
"base": "Getting startup position",
"errors": []
},
"leds": {
"red": {
"pattern": [{"v": 16711680, "t": 0.5}, {"v": 0, "t": 0.5}]
},
"green": {
"pattern": [{"v": 65280, "t": 0.5}, {"v": 0, "t": 0.5}]
},
"rgb": {
"pattern": [{"v": 65280, "t": 1.8}, {"v": 0, "t": 0.2}]
}
}
},
"eth": {
"mac": "c4:dd:57:70:79:83",
"enabled": true,
"cable": true,
"ip": "192.168.1.142",
"mask": "255.255.255.0",
"gw": "192.168.1.1",
"arp": ["aa:bb:cc:dd:ee:01", "aa:bb:cc:dd:ee:02"]
},
"wap": {
"bssid": "c4:dd:57:70:79:81",
"enabled": true,
"ssid": "RTKWifi",
"pwd": "rziGTvnr",
"tx_power": 14,
"max_sta": 5,
"beacon": 100,
"bandwidth": 20,
"channel": 1,
"inactive_time": 100,
"reg": {
"cc": "01",
"max_chan": 11,
"max_txpwr": 13
},
"revgw": {
"mac": "18:1d:ea:02:d3:39",
"ip": "192.168.4.5",
"dns": "1.1.1.1"
},
"sta": [
{
"mac": "40:a5:ef:05:97:7e",
"ip": "192.168.4.2",
"rssi": -34
}
]
},
"sta": {
"mac": "24:4c:ab:13:8b:ac",
"ssid": "BelRobotics",
"inactive_time": 6,
"bssid": "c8:b5:ad:9f:e4:a1",
"channel": 5,
"channel2": 9,
"bandwidth": 40,
"rssi": -84,
"auth": "wpa2+psk",
"ip6": ["fe80::264c:abff:fe13:8bac"],
"ip4": "10.42.0.53"
},
"udp": {
"enabled": true,
"port": 5003
},
"mqtt": {
"via": "STA",
"host": "mqtt.yamabikorobots.net",
"port": 8883,
"state": {
"link": "ok",
"cert": {
"from": 1677836474,
"until": 1709372474,
"serial": "00A0B01000000025FF"
}
},
"rtcm": {
"enabled": true,
"active": false,
"topic": "base/BRRB000021/drtk",
"rate": 10,
"sign": false
}
},
"router": {
"serial": "1116204877",
"macaddr": "00:1e:42:37:03:a2",
"hw": "RUT24007XXXX",
"hwver": "0010",
"hwbatch": "0101",
"swver": "RUT2_R_00.07.04",
"state": {
"uptime": 5156,
"time": 1678971529
},
"wap": {
"bssid": "00:1e:42:37:03:a3",
"ssid": "RUT240_0000",
"pswd": "routerpass"
},
"default": {
"user": "admin",
"pswd": "admin01"
}
},
"modem": {
"imei": "860195053324049",
"model": "EG25-G",
"manuf": "Quectel",
"rev": "EG25GGBR07A08M2G_01.002.01.002",
"support": {
"operator": true
},
"state": {
"network": "Roaming",
"operator": "BASE, Tele2 IoT",
"carrier": "Tele2",
"data": "connected",
"connection_type": "LTE",
"rssi": -73,
"plmn": 20620,
"temp": 0,
"cell_id": "1076040",
"pending": ["scan", "operator"]
},
"cfg": {
"plmn": 0,
"ping_reboot": "1.1.1.1",
"apn": "internet",
"user": "",
"pswd": ""
},
"sim": {
"imsi": "240075815065037",
"iccid": "89462038066000220767",
"state": "OK"
},
"stats": {
"sent": 0,
"recvd": 0
},
"scan": [
{"plmn": 20601, "name": "Proximus", "act": 4},
{"plmn": 20620, "name": "BASE", "act": 4}
]
}
}
Change Configuration¶
POST /change¶
Updates configuration parameters. Accepts JSON with one or more fields.
Survey-in Parameters:
| Parameter | Type | Description |
|---|---|---|
gnss-survey-mintime |
int | Minimum survey-in time (seconds) |
gnss-survey-maxtime |
int | Maximum survey-in time (seconds) |
gnss-survey-accuracy |
float | Minimum accuracy required (meters) |
gnss-survey-accuracy-corr |
float | Accuracy correction threshold (meters) |
trigger-gnss-survey |
bool | Start a survey-in |
GNSS Initial Position:
| Parameter | Type | Description |
|---|---|---|
gnss-initial-accuracy |
float | Minimum initial accuracy (meters) |
gnss-initial-max-delta |
float | Maximum position delta (meters) |
gnss-initial-max-delta-corr |
float | Maximum delta with corrections (meters) |
RTCM Input:
| Parameter | Type | Description |
|---|---|---|
gnss-recvrtcm-max-age |
int | Maximum age of incoming RTCM data (seconds) |
Manual Reference Position:
| Parameter | Type | Description |
|---|---|---|
gnss-ref-manual-acc |
float | Manual reference accuracy (meters) |
gnss-ref-manual-corr |
bool | Use corrections flag |
gnss-ref-manual-hp |
bool | High precision flag |
gnss-ref-manual-lat |
float | Latitude (degrees) |
gnss-ref-manual-lon |
float | Longitude (degrees) |
gnss-ref-manual-alt |
float | Altitude (meters) |
gnss-ref-manual-x |
float | X coordinate (ECEF, meters) |
gnss-ref-manual-y |
float | Y coordinate (ECEF, meters) |
gnss-ref-manual-z |
float | Z coordinate (ECEF, meters) |
gnss-ref-chosen |
string | Reference source: "manual" or "survey" |
MQTT Configuration:
| Parameter | Type | Description |
|---|---|---|
mqtt-en |
int | Enable/disable MQTT (0 or 1) |
mqtt-host |
string | Broker hostname |
mqtt-port |
int | Broker port |
mqtt-rtcm-sign |
int | Enable RTCM signing (0 or 1) |
mqtt-rtcm-rate |
int | RTCM publication rate (seconds) |
UDP Configuration:
| Parameter | Type | Description |
|---|---|---|
udp-en |
int | Enable/disable UDP (0 or 1) |
udp-port |
int | UDP port number |
Ethernet:
| Parameter | Type | Description |
|---|---|---|
eth-en |
int | Enable/disable ethernet (0 or 1) |
WiFi Access Point (WAP):
| Parameter | Type | Description |
|---|---|---|
wap-en |
int | Enable/disable AP mode (0 or 1) |
wap-ssid |
string | SSID name |
wap-pswd |
string | Password |
wap-chan |
int | WiFi channel (1-13) |
wap-txpwr |
int | Transmit power (2-20 dBm) |
wap-inactive-time |
int | Station inactivity timeout (seconds) |
wap-max-sta |
int | Maximum connected stations |
WiFi Station (STA):
| Parameter | Type | Description |
|---|---|---|
sta-ssid |
string | WiFi network SSID |
sta-pswd |
string | WiFi password |
WAP Reverse Gateway:
| Parameter | Type | Description |
|---|---|---|
wap-revgw-dns |
string | DNS server for reverse gateway |
wap-revgw-mac |
string | MAC address for WAP client gateway |
General WiFi:
| Parameter | Type | Description |
|---|---|---|
wifi-reg-cc |
string | Country code (e.g., "US", "EU", "JP") |
Mobile/4G Configuration:
| Parameter | Type | Description |
|---|---|---|
mobile-operator |
int | PLMN code for operator selection |
mob-ping-host |
string | Ping host for connectivity check |
mob-apn |
string | APN for mobile data |
mob-user |
string | APN username |
mob-pswd |
string | APN password |
Router Configuration:
| Parameter | Type | Description |
|---|---|---|
rtr-user |
string | Router admin username |
rtr-pswd |
string | Router admin password |
Logging:
| Parameter | Type | Description |
|---|---|---|
log-save-period |
int | Period for saving logs to NVS (seconds) |
Example:
Response:
result: "ok" or "failed"leftover: Fields that were not consumed (not an error)
System Commands¶
POST /system¶
Execute system-level commands.
Available Commands:
| Command | Description |
|---|---|
reboot |
Reboot the device |
factory |
Factory reset |
reboot-zed |
Reboot ZED GNSS module |
reset-zed |
Reset ZED configuration |
reboot-router |
Reboot Teltonika router |
factory-router |
Factory reset router |
reboot-modem |
Reboot 4G modem |
pull-teltonika-data |
Pull router data |
start-survey-in |
Start survey-in procedure |
use-incomplete-survey-in |
Use incomplete survey results |
rtcm-mqtt-force |
Force RTCM MQTT publish |
mqtt-renew |
Renew MQTT certificates |
pair-tplink-repeater |
Pair TP-Link repeater |
restart-wap |
Restart WiFi AP |
restart-wap-fast |
Fast AP restart |
restart-wap-dhcps |
Restart DHCP server |
wifi-sta-scan |
Scan for WiFi networks |
mobile-scan |
Scan for mobile operators |
get-router-qr |
Get router QR code |
Logging Commands:
| Command | Description |
|---|---|
log=n / log=0 |
No logging |
log=e |
Error logging |
log=w |
Warning logging |
log=i / log=1 |
Info logging |
log=d |
Debug logging |
log=v |
Verbose logging |
logsavenvs |
Flush logs to NVS |
logclearnvs |
Clear NVS logs |
reset-debug |
Clear debug counters |
Firmware Update:
| Command | Description |
|---|---|
firmware=URL |
Download and install firmware from URL |
ota-upgrade=URL |
OTA upgrade from URL |
Production:
| Command | Description |
|---|---|
start-production-test |
Start production test mode |
start-hardware-test |
Start hardware test |
prodflag=X |
Set production flag to X |
RTCM Control:
| Command | Description |
|---|---|
rtcmin=N |
Force RTCM-IN to value N (0 or 1) |
Example:
curl -X POST "192.168.4.1/system?mqtt-renew"
curl -X POST "192.168.4.1/system?reboot"
curl -X POST "192.168.4.1/system?log=i"
Response: Text output
NVS Storage¶
GET /nvs¶
Read Non-Volatile Storage key-value pairs.
Query Parameters:
namespace: NVS namespace to read from
Example:
POST /nvs¶
Write NVS key-value pairs.
Request Body: JSON object with key-value pairs
Example:
Router RPC¶
POST /rut¶
Send RPC commands directly to the Teltonika RUT router.
Request Body: JSON RPC request
Firmware Update¶
POST /update-firmware or /firmware¶
Upload and install firmware updates.
Query Parameters:
- esp or esp32: Update ESP32 firmware
- rut: Update Teltonika router firmware
Examples:
# Update ESP32
curl -X POST "192.168.4.1/update-firmware?esp" --data-binary @firmware.bin
# Update Router
curl -X POST "192.168.4.1/update-firmware?rut" --data-binary "https://example.com/router-fw.bin"
Compatibility Endpoints¶
GET /heart-beat or /get-base-info¶
Alias endpoints for /get-info. Return the same JSON structure for backward compatibility.
GET /get-log-saved¶
Retrieve logs stored in flash memory.
Example: