Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
API Error 400 - Controller not found
« previous
next »
Print
Pages: [
1
]
Author
Topic: API Error 400 - Controller not found (Read 1649 times)
kahrens
Newbie
Posts: 1
Karma: 0
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
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: API Error 400 - Controller not found
«
Reply #1 on:
July 10, 2024, 08:28:51 am »
Hi Kevin,
What version are you using? LAGG API is available since 23.7 so that's a bit ago but just checking.
Grepping reveals that the url should be correct, but the action is getItem:
% git grep lagg_settings/get
src/opnsense/mvc/app/views/OPNsense/Interface/lagg.volt: get:'/api/interfaces/lagg_settings/getItem/',
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
API Error 400 - Controller not found