-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API - TrafficShaping: flushreload #7014
Comments
The trick to find the correct endpoint usually is to check the browser network inspector, hitting apply calls : |
Ah! The data-endpoint attribute on the Apply button! I had looked for forms and the JS event, but I didn't notice that. ... how didn't I notice that? *cleans glasses furiously* I will test. |
Ok, Good News Everybody (.jpg), that has achieved my goal. So it wasn't a bug, it was a lack of understanding (documentation?) of the ServiceController commands. Was there a section in the documentation I missed detailing what we've found here? Will update the Forum post to reflect the solution. |
We don't detail endpoints as this means a lot of "double documenting" with the risk of getting out of sync, since usage is easy to find, that's usually the fastest anyway. The number of unused endpoints on our end is very low. |
That's totally understandable. Given the nature of the project and the number of people involved. Is there anywhere in the preamble to the API that notes how to find endpoints as you noted above for this case? (if not, then that'd probably be helpful.) |
I've checked the docs, but I don't think the simple trick is explained somewhere at the moment, we might consider adding it to https://docs.opnsense.org/development/api.html as that's likely the first place people will look for it. |
Good idea. Hopefully people will actually read that section in full ;) |
… and expected responses. opnsense/core#7014
well, at least we can point them to there 🙃 this opnsense/docs@ea8d486 should help. |
G'day,
As detailed here: https://forum.opnsense.org/index.php?topic=36472.msg178089 I'm trying to use the OPNSense API to enable/disable Traffic Shaping rules. Before I make a bug about this not working, I thought I'd bring the question here to ensure I haven't got the wrong end of the functionality stick on
flushreload
(/api/trafficshaper/service/flushreload) as the forum post has gone a month with no response.Both the reading & toggling of the rule's active state is successful via the API, but
flushreload
doesn't apply them to the functioning rules. (What I really need amounts to the "Apply" button in the GUI.)So, questions!
flushreload
intended to give me the functionality I'm hoping for.As far as testing goes, I haven't rebooted the system to see if that also applies the change, but as noted in the forum post, pressing Apply on the GUI page does.
Thanks in advance for your help/clarification.
The text was updated successfully, but these errors were encountered: