The /system/* endpoints expose system-level operations on the gateway: firmware upgrades, supervision package upgrades, system backups, snapshot downloads, and reboot. They are typically called by the cloud during remote maintenance windows.
All endpoints require an authenticated session — see authentication.
Backup, snapshot, restore, upgrade and reboot each need the matching right in the role of the account. Without it the answer is 403.
POST /system/upgradeUpload a new supervision package (the gateway application itself). The file is stored on the gateway; the upgrade starts when you then call system.upgradeSupervisionRevision('file', callback), which is what the web interface does.
Request:
multipart/form-data with one field named file, containing the release package (the .wu file from the Weble repository). Any other file (a plain .zip or .bin) fails at installation: the package signature is checked.
Response:
200 on successful upload, with the temporary path of the file as body. 208 with SYSTEM_ALREADY_UPGRADING if an upgrade is running. 405 with ALREADY_UPLOADING if another upload is in progress. 500 on failure, with a plain-text error body.
Example:
Upload the release package in a form field named file:
curl -b cookies.txt -X POST -F 'file=@<release>.wu' 'https://gateway.example.com/system/upgrade'
Then check the version it contains, and start the installation through the dispatcher:
curl -b cookies.txt -X POST -H 'Content-Type: application/json' -d '{"args":[]}' \
'https://gateway.example.com/peers/supervision/system/getLocalSupervisionRevisionZip'
curl -b cookies.txt -X POST -H 'Content-Type: application/json' -d '{"args":["file"]}' \
'https://gateway.example.com/peers/supervision/system/upgradeSupervisionRevision'
The gateway stops all drivers and routes, checks the package signature, installs it and reboots (several minutes offline). Not available on Windows installations: install the Windows package of the release instead.
See also: the peers equivalent
system.upgradeSupervisionRevision, which fetches the new revision from the upgrade server instead of accepting an upload.
POST /system/firmware/upgradeSame as /system/upgrade but targets the firmware layer (kernel, OS, base services). The upgrade starts when you then call system.upgradeFirmwareRevision('file', callback).
Example:
curl -b cookies.txt -X POST -F 'file=@<release>.wu' 'https://gateway.example.com/system/firmware/upgrade'
Then check the version with getLocalFirmwareRevisionZip and start the installation with upgradeFirmwareRevision, as in section 1. Not available on Windows installations.
GET /system/actions/rebootTrigger an immediate reboot of the gateway machine.
Example:
curl -b cookies.txt 'https://gateway.example.com/system/actions/reboot'
The HTTP response may not arrive — the system starts rebooting before the response is flushed. Treat this as fire-and-forget.
See also: the peers equivalent
system.reboot.
GET /system/backupDownload a complete system backup as a ZIP archive — all configuration, addresses, gateways, routes, logics, and account data. This is the snapshot the cloud uses for off-site backups and remote restore. The same backup made from the interface, and what it contains, is described in Backup, restore and snapshots.
Response headers:
Content-Type: application/zip
Content-Disposition: attachment; filename="<SUPERVISION_NAME>-<YYYYMMDD_HHmm>.zip"
Body: the ZIP archive (streamed).
Example:
curl -b cookies.txt -OJ \
'https://gateway.example.com/system/backup'
# saves <name>-<date>.zip
If a restore is currently in progress, the endpoint returns 500 with the body System is restoring....
Store backup files as confidential data: they contain the account data and the credentials configured in the gateways.
GET /system/snapshot/:nameDownload a previously-saved snapshot by filename. Snapshots are taken automatically by the gateway on a schedule (or manually via the UI) and stored in the snapshot directory. Use :name exactly as listed by the snapshot manager.
Response headers:
Content-Disposition: attachment; filename="<SUPERVISION_NAME>-Snapshot-<formatted-date>.zip"
Snapshot files are named <YYYY-MM-DD HH:mm:ss>.<auto>.<index>.<state>.zip (auto is 1 for scheduled snapshots, state is 1 when the snapshot is complete), as listed in the Snapshots screen. URL-encode the name.
Example:
curl -b cookies.txt -OJ 'https://gateway.example.com/system/snapshot/2026-04-08%2003%3A00%3A00.1.12.1.zip'
A name containing /, \ or .. returns 400; an unknown name returns 404.
POST /system/restoreUpload a backup or snapshot ZIP and restore the device from it (user procedure: Backup, restore and snapshots). Once the upload is complete, the restore pipeline runs and the gateway reboots its PM2 supervisor to pick up the restored state.
Warning: the device erases its current configuration (the
data/folder, except the network settings) before it extracts the archive. If the file is not a valid backup, or if the extraction fails, the device restarts with an empty or incomplete configuration. Download a backup withGET /system/backupfirst, and only send archives made by/system/backupor by the snapshot manager.
Request:
multipart/form-data. Send the archive in a form field named file. Up to 12 files can be uploaded in the same call (only the first one is restored).
The role needs the restore right and the Send executable code right (a backup carries routes and functions).
Only config.sup and data/ are restored. The VPN identity of the device is never replaced. By default the network configuration of the device is kept. Add the form field applyNetwork=1 to restore the network configuration of the backup as well.
Response:
{} on success, or:
{ "err" : "<error message>" }
on failure. After a successful restore, and also after a failed extraction, all processes restart a few seconds later. A request refused before anything is erased (No file provided, system busy) does not restart the device.
Example:
curl -b cookies.txt -X POST \
-F 'file=@boiler-room-2026-04-01.zip' \
'https://gateway.example.com/system/restore'
Important: the gateway reboots its supervisor at the end of a successful restore — the connection is dropped while it comes back up. Wait at least ~30 seconds before re-authenticating.
GET /sessionReturns 200 with the account of the session (id, username, role, …), or 401 without a session. To read the rights of the role, call GET /peers/session/permissions. Useful as a cheap "is my cookie still valid" check.
curl -b cookies.txt -w '%{http_code}\n' 'https://gateway.example.com/session'
#!/bin/bash
# 1. authenticate
curl -c /tmp/cookies.txt -X POST 'https://gateway.example.com/auth/rest' \
-H 'Content-Type: application/json' \
-d "{\"username\":\"admin\",\"password\":\"$PASS\"}"
# 2. download backup
curl -b /tmp/cookies.txt -OJ 'https://gateway.example.com/system/backup'
# 3. logout
curl -b /tmp/cookies.txt 'https://gateway.example.com/logout'
HTTP_CODE=$(curl -b cookies.txt -s -o /dev/null -w '%{http_code}' 'https://gateway.example.com/session')
if [ "$HTTP_CODE" != "200" ]; then
echo "session expired, re-authenticating..."
# ... call /auth/rest again
fi