counter of link-downs ether

Helloy, help please

in C# connect to Mikrotik via API command:

mikrotik.Send(“/interface/ethernet/monitor”);
mikrotik.Send(“=numbers=ether1”);
mikrotik.Send(“=once”);
mikrotik.Send(“.tag=interface”, true);

a got next:

“!re.tag=interface=name=ether1=status=link-ok=auto-negotiation=done=rate=100Mbps=full-duplex=true=tx-flow-control=false=rx-flow-control=false=advertising=10M-half,10M-full,100M-half,100M-full=link-partner-advertising=10M-half,10M-full,100M-half,100M-full”

i want get counter of link-downs,
in terminal :
:put [/interface get [find name=ether1] value-name=link-downs]

:put [/interface get ether1 link-downs];

hello. ı can’t connect mikrotik device. (visual studio c# form application) can you help me ?

how to send this command via api?

contact with me KsaFad@mail.ru

Hello. I know that this post is old, yet i’ve searched everywhere to find an answer to this question with no luck. So, i’ll post it here, in case it saves someone time.

$ curl  -u api:pass https://mikrotik.lan/rest/interface?type=lte -X GET -H "content-type: application/json"

\[
  {
    ".id": "*8",
    "actual-mtu": "1500",
    "default-name": "lte1",
    "disabled": "false",
    "fp-rx-byte": "1002863553",
    "fp-rx-packet": "731589",
    "fp-tx-byte": "0",
    "fp-tx-packet": "0",
    "last-link-down-time": "sep/27/2022 10:25:55",
    "last-link-up-time": "sep/27/2022 10:25:58",
    "link-downs": "16",
    "mac-address": "XX:XX:...",
    "mtu": "1500",
    "name": "lte1",
    "running": "true",
    "rx-byte": "1002863553",
    "rx-drop": "0",
    "rx-error": "0",
    "rx-packet": "731589",
    "tx-byte": "91478165",
    "tx-drop": "0",
    "tx-error": "0",
    "tx-packet": "380954",
    "tx-queue-drop": "2",
    "type": "lte"
  }
\]

Am I missing something here but when I try this command I get 'input does not match any value of value-name'

When I swap 'link-downs' with 'mtu' or 'speed' I get the expected result. I note that link-downs is not listed in the value-name list.

Can anyone confirm you can report on the link-downs value via the terminal? It appears only to be accessible via the Status tab on the interface window in Winbox.

Ok, found the answer to this. It appears you can only access link-downs from the /interface directory. If you go lower than this, such as /interface/ethernet you can't see it.