API call to get Interface IP

Started by FingerlessGloves, March 20, 2019, 09:49:50 PM

Previous topic - Next topic
Hi Guys,

I'm trying to get an IP address of an Interface, which is set by OpenVPN Client.

Is there an API call I can use to get list of interface's and their IP addresses or just the IP address of my ovpnc1 interface atleast.

Hopefully this is a quick answer for someone.

Jonny
Adventuring through internet pipes
My Blog

March 21, 2019, 09:50:17 PM #1 Last Edit: March 23, 2019, 12:40:11 AM by Jonny
I've been looking at the API's looks like there one, but I can't seem to call it.

https://github.com/opnsense/core/blob/afcae6226a565e86ab668416c91ebc9b6ef12f54/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/Api/ExportController.php


getInterfaces from this Controller might be want I'm after??

Jonny

EDIT: I've found another way to get my end result of what I needed the interface ip for but I presume the API I was after will come in time.
Adventuring through internet pipes
My Blog

I also did not find a way to get OpenVPN client IP address through API... would be nice to be able to retrieve this information :)
Clément - SimpleRezo
RMM for OPNsense: https://srbox.simplerezo.com/