Skip to content

Commit 70166cc

Browse files
committed
firmware: update relevant docs to 21.1.3 state
1 parent ae58540 commit 70166cc

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

source/development/api/core/firmware.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ OPNsense has several API calls to get and set the firmware configuration:
1515
"``GET``","Core","Firmware","info",""
1616
"``GET``","Core","Firmware","status",""
1717
"``POST``","Core","Firmware","audit",""
18+
"``POST``","Core","Firmware","update",""
1819
"``POST``","Core","Firmware","upgrade",""
1920
"``GET``","Core","Firmware","upgradestatus",""
2021
"``POST``","Core","Firmware","changelog","$version"

source/development/how-tos/api.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,12 @@ response.
8282
if r.status_code == 200:
8383
response = json.loads(r.text)
8484

85-
if response['status'] == 'ok' and response['status_upgrade_action'] == 'all':
85+
if response['status'] == 'ok':
8686
print ('OPNsense can be upgraded')
8787
print ('download size : %s' % response['download_size'])
8888
print ('number of packages : %s' % response['updates'])
8989
if response['upgrade_needs_reboot'] == '1':
9090
print ('REBOOT REQUIRED')
91-
elif response['status'] == 'ok' and response['status_upgrade_action'] == 'pkg':
92-
print ('OPNsense can be upgraded, but needs a pkg upgrade first')
9391
elif 'status_msg' in response:
9492
print (response['status_msg'])
9593
else:
@@ -110,11 +108,11 @@ testing.
110108
curl -k -u "w86XNZob/8Oq8aC5hxh2he+vLN00r0kbNarNtdpoQU781fyoeaOBQsBwkXUt":"puOyw0Ega3xZXeD26XVrJ5WYFepOseySWLM53pJASeTA3" https://192.168.1.1/api/core/firmware/status
111109
112110
113-
And schedule the actual upgrade of all packages using:
111+
And schedule the actual update of all packages using:
114112

115113
.. code-block:: sh
116114
117-
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
115+
curl -XPOST -k -u "w86XNZob/8Oq8aC5hxh2he+vLN00r0kbNarNtdpoQU781fyoeaOBQsBwkXUt":"puOyw0Ega3xZXeD26XVrJ5WYFepOseySWLM53pJASeTA3" https://10.211.55.100/api/core/firmware/update
118116
119117
120118
.. |Usermanager add api key.png| image:: images/Usermanager_add_api_key.png

0 commit comments

Comments
 (0)