All freshly written plugins come with an UI and API. We make it a point to build the UI on top of that API, so you can actually automate the operation of any such plugin in any way that you deem appropriate using:https://docs.opnsense.org/development/how-tos/api.html
url = 'https://192.168.99.100/api/core/firmware/status'# request datar = requests.get(url,verify=False,auth=(api_key, api_secret))
Before you can start, make sure your OPNsense has a valid SSL certificate (or choose to ignore it for testing purposes by setting verify=False), don’t forget to verify that the selected user may access the firmware page.
For testing verify=false is fine. Did you allow your user that has the API key to access the firmware page?
Use the network debug with your browser to see whats happening within the API, it's really easy:curl -k -u "key":"secret" https://<yourip>/api/freeradius/user/searchUserSend a POST via setUser and you should be able to add new users ...
* Trying 192.168.99.100...* connect to 192.168.99.100 port 443 failed: Connection timed out
Did you change the Port for webadmin?Check your Firewall rules please
CSRF check failed. Your form session may have expired, or you may not have cookies enabled.