getting negotiated ethernet speed via API

Hi,
I need to get via api negotiated speed.
CLI:

/interface ethernet monitor ether2 once
status: link-ok
auto-negotiation: done
rate: 100Mbps
full-duplex: yes

I’ve tried with boen_robot php class but with no luck. Maybe there is other way without using monitor.

What was the code you tried?

The following should work:

$client->sendSync(new RouterOS\Request('/interface ethernet monitor numbers=ether2 once'))->getArgument('rate'); 

Did you maybe forget to explicitly set the “numbers” argument?

Thank you for using my API client.

Oh my bad. Stupid typo :wink:

btw. GREAT WORK with Your’s class.