1
Development and Code Review / API Error 400 - Controller not found
« on: April 18, 2024, 04:59:54 pm »
Hi,
we are planning to automate a few different tasks on our OPNsense and use the API for the first time.
When trying to execute API Calls, for some controllers I get "{"message":"controller OPNsense\\Interfaces\\Api\\LaggSettingsController not found","status":400}"
But some other ones work and send a result.. no problems for routes/gateway, proxy/service or firewall/alias_util.
Some that don't work: VlanSettingsController, LaggSettingsController or BackupController
An example of the Request with LaggSettingsController: curl -k -u KEY:SECRET https://IP/api/interfaces/lagg_settings/get which results in the error above.
Am I missing something obvious? It's pretty confusing as for some it works and for some it doesnt. I have just updated the system to the newest version, it didnt work before or after the updates.
Thanks for your help in advance.
Regards,
Kevin
we are planning to automate a few different tasks on our OPNsense and use the API for the first time.
When trying to execute API Calls, for some controllers I get "{"message":"controller OPNsense\\Interfaces\\Api\\LaggSettingsController not found","status":400}"
But some other ones work and send a result.. no problems for routes/gateway, proxy/service or firewall/alias_util.
Some that don't work: VlanSettingsController, LaggSettingsController or BackupController
An example of the Request with LaggSettingsController: curl -k -u KEY:SECRET https://IP/api/interfaces/lagg_settings/get which results in the error above.
Am I missing something obvious? It's pretty confusing as for some it works and for some it doesnt. I have just updated the system to the newest version, it didnt work before or after the updates.
Thanks for your help in advance.
Regards,
Kevin