OPNsense Forum

English Forums => 26.1, 26,4 Series => Topic started by: pickone on May 13, 2026, 12:58:59 PM

Title: Api calls fail reload_interface with 26.1
Post by: pickone on May 13, 2026, 12:58:59 PM
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
Title: Re: Api calls fail reload_interface with 26.1
Post by: franco on May 13, 2026, 01:51:29 PM
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
Title: Re: Api calls fail reload_interface with 26.1
Post by: pickone on May 13, 2026, 02:32:05 PM
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!
Title: Re: Api calls fail reload_interface with 26.1
Post by: sopex on May 13, 2026, 02:46:52 PM
Try:

curl -k --cacert /ssl/opnsense.pem \
  -u "key:secret" \
  -X POST \
  "https://192.168.0.1/api/interfaces/overview/reload_interface/wan"
Title: Re: Api calls fail reload_interface with 26.1
Post by: pickone on May 13, 2026, 02:54:14 PM
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 !!!
Title: Re: Api calls fail reload_interface with 26.1
Post by: franco on May 13, 2026, 03:23:02 PM
Ah ok that was https://github.com/opnsense/core/commit/ac7a8024c280 from 26.1.4 then...


Cheers,
Franco