76343/4/5 | English, Revision 05 | Date: 23.02.2022
88
Chapter 11 – REST-API
With the
Cfg/Set
function you can also transfer config files containing single param
-
eters. If, for example, a file with the content:
[Wireless]
Enabled=false
is transmitted, the radio modem switches off the WLAN interface.
A file with the contents:
[Wireless]
Enabled=true
switches the WLAN interface on again.
Further information about the
curl
tool can be found at:
Table 61
REST-API: curl command lines
Function
Command
Cfg/GetRunning
curl -N -u user:password -k --output <destination file > "https://
<radio_modem_IP>/API/Cfg/GetRunning"
Cfg/GetDefault
curl -N -u user:password -k --output <destination file> "https://
<radio_modem_IP>/API/Cfg/GetDefault"
Cfg/Set
curl -N -u user:password -k -X POST -F "image=@<config file>"
"https://<radio_modem_IP>/API/Cfg/Set"
Firmware/Upgrade
curl -N -u user:password -k -X POST -F "image=@<firmware file>"
"https://<radio_modem_IP>/API/Firmware/Upgrade"
Status
curl -N -u user:password -k --output <destination file> "https://
<radio_modem_IP>/API/Status"
Cfg/ImportCertifi
-
cate
curl -N -u -u user:password -k -X POST -H "Content-Type: multipart/form-data" -F
"CertData=@<CertFile>" -F
"Type=WEB" -F "Command=Import" -F "Password=<Password>" "https://
<MC_IP>/API/Cfg/ImportCertificate"
Debug/CaptureFiles curl -N -u user:password -k --output <destination file> "https://<MC_IP>/API/
Debug/CaptureFiles"
Debug/CaptureFile curl -N -u user:password -k --output <destination file> "https://<MC_IP>/API/
Debug/CaptureFile/<FileName>"
Debug/Get/
SystemLog
curl -N -u user:password -k --output <destination file> "https://<MC_IP>/API/
Debug/Get/SystemLog"