Api calls fail reload_interface with 26.1

Started by pickone, May 13, 2026, 12:58:59 PM

Previous topic - Next topic
Hi!

In the past, I was using this to reload my WAN interface:

curl --cacert /ssl/opnsense.pem -k -u \
    "key:key" \
    "https://192.168.0.1/api/interfaces/overview/reloadinterface/wan"

Now, in the most recend Opnsense version, I see that `reloadinterface` has been changed to `reload_interface`, but it doesn't work. I have tried this:

curl --cacert /ssl/opnsense.pem -k -u \
    "key:key" \
    "https://192.168.0.1/api/interfaces/overview/reload_interface/wan"

I only get message: "failed".

Does anyone know a solution for this?

This API used to help me change my external IP very VERY quickly using PPPoE as wan. Other API calls also change the external IP, but they are much slower.

That said, I would prefer to keep using the same API call if possible, but working correctly. Does anyone know how to achieve this?

Thanks

It was reloadInterface actually, which is reload_interface in snake_case which is enforced since 25.7:

https://github.com/opnsense/changelog/blob/811689f157e8eadc005427c15aa5a41e4e106897/community/25.7/25.7#L110


Cheers,
Franco
"AI has absolutely reduced the cost of creating technical debt." -- ChatGPT

My mistake, I wrote it incorrectly. It was indeed with a capital "I", as "reloadInterface", but I still got this problem using this:

curl --cacert /ssl/opnsense.pem -k -u \
    "key:key" \
    "https://192.168.0.1/api/interfaces/overview/reload_interface/wan"

Gives me {"message":"failed"}

Any idea or how can I debug it to find out the issue?

Thanks!


Quote from: sopex on May 13, 2026, 02:46:52 PMTry:

curl -k --cacert /ssl/opnsense.pem \
  -u "key:secret" \
  -X POST \
  "https://192.168.0.1/api/interfaces/overview/reload_interface/wan"

You are the man! Thank you so much !!!

Ah ok that was https://github.com/opnsense/core/commit/ac7a8024c280 from 26.1.4 then...


Cheers,
Franco
"AI has absolutely reduced the cost of creating technical debt." -- ChatGPT