how to get interface status on API?

Hello ,
can someone help me find out the command for know if the interface is enable\disable running?
so I can show it ?
for example want to know if my ppp-out1 is running (true \ false)
and also if ppp-out1 is enable \ disable ?

Thanks , ,

“/interface/print”
and check the “disabled” property. It is the string “true” if the interface is disabled, or the string “false” if it is enabled.

There is also a separate property called “running”, which is also either the strings “true” or “false”, depending on whether the interface is running or not, since it’s possible for an interface to be enabled but not running (e.g. cable unplugged, or an AP client Wi-Fi that is not connected).

this is what I get when I do “Interface/print”

.id=*1;actual-mtu=1500;comment=;l2mtu=1526;mac-address=22:09:42:6F:46:EC;name=ethe
r1;type=ether;.id=*7;comment=;name=SIM1;type=ppp-out;.id=*8;comment=;name=SIM2;typ
e=ppp-out;.id=*a;comment=;name=SIM3;type=ppp-out;.id=*b;comment=;name=SIM4;type=pp
p-out;.id=*3;actual-mtu=1500;comment=;name=ppp-out1;type=ppp-out

doesn’t see any running\disable option…

Hmm… I guess those are only available from the type specific menus, or in your case, I’m guessing that would be “/interface/ppp-client/print”.

I have try it also
nothing

.id=*7;add-default-route=true;allow=pap;apn=fddfssa;comment=;data-channel=2;default-route-distance=1;dial-command=ATDT;dial-on-dem
and=false;info-channel=2;keepalive-timeout=30;max-mru=1500;max-mtu=1500;modem-init=;mrru=0;name=SIM1;null-modem=false;password=fds
fdsa;phone=*99#;pin=;port=usb2;profile=default;use-peer-dns=true;user=re

how could it be?

Have the “=detail=” argument also?

I’m sure the type specific menu has “running”, as doing “print where [tab]” on the command line shows that property as one you can filter by.

sorry?
I don’t understand waht you are saying …
can you write the command so I will understand?

Thanks ,

On CLI, it would be

/interface ppp-client print detail

or in API flow:

/interface/ppp-client/print
=detail=

sorry , still no (I have make space to be sure )

/interface ppp-client print as-value detail
.id=*7;
add-default-route=true;
allow=pap;
apn=fddfssa;
comment=;
data-channel=2;
default-route-distance=1;
dial-command=ATDT;
dial-on-demand=false;
info-channel=2;
keepalive-timeout=30;
max-mru=1500;
max-mtu=1500;
modem-init=;
mrru=0;
name=SIM1;
null-modem=false;
password=fdsfdsa;
phone=*99#;
pin=;
port=usb2;
profile=default;
use-peer-dns=true;
user=user1