firmware: update relevant docs to 21.1.3 state

pull/321/head
Franco Fichtner 3 years ago
parent ae58540f44
commit 70166cc650

@ -15,6 +15,7 @@ OPNsense has several API calls to get and set the firmware configuration:
"``GET``","Core","Firmware","info",""
"``GET``","Core","Firmware","status",""
"``POST``","Core","Firmware","audit",""
"``POST``","Core","Firmware","update",""
"``POST``","Core","Firmware","upgrade",""
"``GET``","Core","Firmware","upgradestatus",""
"``POST``","Core","Firmware","changelog","$version"

@ -82,14 +82,12 @@ response.
if r.status_code == 200:
response = json.loads(r.text)
if response['status'] == 'ok' and response['status_upgrade_action'] == 'all':
if response['status'] == 'ok':
print ('OPNsense can be upgraded')
print ('download size : %s' % response['download_size'])
print ('number of packages : %s' % response['updates'])
if response['upgrade_needs_reboot'] == '1':
print ('REBOOT REQUIRED')
elif response['status'] == 'ok' and response['status_upgrade_action'] == 'pkg':
print ('OPNsense can be upgraded, but needs a pkg upgrade first')
elif 'status_msg' in response:
print (response['status_msg'])
else:
@ -110,11 +108,11 @@ testing.
curl -k -u "w86XNZob/8Oq8aC5hxh2he+vLN00r0kbNarNtdpoQU781fyoeaOBQsBwkXUt":"puOyw0Ega3xZXeD26XVrJ5WYFepOseySWLM53pJASeTA3" https://192.168.1.1/api/core/firmware/status
And schedule the actual upgrade of all packages using:
And schedule the actual update of all packages using:
.. code-block:: sh
curl -XPOST -d '{"upgrade":"all"}' -H "Content-Type: application/json" -k -u "w86XNZob/8Oq8aC5hxh2he+vLN00r0kbNarNtdpoQU781fyoeaOBQsBwkXUt":"puOyw0Ega3xZXeD26XVrJ5WYFepOseySWLM53pJASeTA3" https://10.211.55.100/api/core/firmware/upgrade
curl -XPOST -k -u "w86XNZob/8Oq8aC5hxh2he+vLN00r0kbNarNtdpoQU781fyoeaOBQsBwkXUt":"puOyw0Ega3xZXeD26XVrJ5WYFepOseySWLM53pJASeTA3" https://10.211.55.100/api/core/firmware/update
.. |Usermanager add api key.png| image:: images/Usermanager_add_api_key.png

Loading…
Cancel
Save