Firmware¶
OPNsense has several API calls to get and set the firmware configuration:
Method |
Module |
Controller |
Command |
Parameters |
---|---|---|---|---|
|
Core |
Firmware |
poweroff |
|
|
Core |
Firmware |
reboot |
|
|
Core |
Firmware |
running |
|
|
Core |
Firmware |
getFirmwareConfig |
|
|
Core |
Firmware |
getFirmwareOptions |
|
|
Core |
Firmware |
setFirmwareConfig |
|
|
Core |
Firmware |
info |
|
|
Core |
Firmware |
status |
|
|
Core |
Firmware |
status |
|
|
Core |
Firmware |
audit |
|
|
Core |
Firmware |
update |
|
|
Core |
Firmware |
upgrade |
|
|
Core |
Firmware |
upgradestatus |
|
|
Core |
Firmware |
changelog |
$version |
Examples:
curl -k -u "$key":"$secret" https://opnsense.local/api/core/firmware/getfirmwareconfig -v
curl -k -u "$key":"$secret" https://opnsense.local/api/core/firmware/status -v
curl -d '' -k -u "$key":"$secret" https://opnsense.local/api/core/firmware/changelog/18.1 -v
Packages¶
You can manage the packages and plugins in OPNsense, using these API calls:
Method |
Module |
Controller |
Command |
Parameters |
---|---|---|---|---|
|
Core |
Firmware |
install |
$pkg_name |
|
Core |
Firmware |
reinstall |
$pkg_name |
|
Core |
Firmware |
remove |
$pkg_name |
|
Core |
Firmware |
lock |
$pkg_name |
|
Core |
Firmware |
unlock |
$pkg_name |
|
Core |
Firmware |
details |
$pkg_name |
|
Core |
Firmware |
license |
$pkg_name |
Examples:
curl -d '' -k -u "$key":"$secret" https://opnsense.local/api/core/firmware/lock/os-xen -v
curl -d '' -k -u "$key":"$secret" https://opnsense.local/api/core/firmware/license/acme.sh -v