Firmware
OPNsense has several API calls to get and set the firmware configuration:
Method |
Module |
Controller |
Command |
Parameters |
---|---|---|---|---|
|
core |
firmware |
audit |
|
|
core |
firmware |
changelog |
$version |
|
core |
firmware |
check |
|
|
core |
firmware |
connection |
|
|
core |
firmware |
get |
|
|
core |
firmware |
getOptions |
|
|
core |
firmware |
health |
|
|
core |
firmware |
info |
|
|
core |
firmware |
log |
$clear |
|
core |
firmware |
poweroff |
|
|
core |
firmware |
reboot |
|
|
core |
firmware |
resyncPlugins |
|
|
core |
firmware |
running |
|
|
core |
firmware |
set |
|
|
core |
firmware |
status |
|
|
core |
firmware |
syncPlugins |
|
|
core |
firmware |
update |
|
|
core |
firmware |
upgrade |
|
|
core |
firmware |
upgradestatus |
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 |
details |
$pkg_name |
|
core |
firmware |
install |
$pkg_name |
|
core |
firmware |
license |
$pkg_name |
|
core |
firmware |
lock |
$pkg_name |
|
core |
firmware |
remove |
$pkg_name |
|
core |
firmware |
reinstall |
$pkg_name |
|
core |
firmware |
unlock |
$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