Community discussions

MikroTik App
 
gazzer82
just joined
Topic Author
Posts: 2
Joined: Mon Apr 04, 2022 2:47 pm

v7.1.5 - Rest API - SFP TX/RX Power

Mon Apr 04, 2022 2:55 pm

I am trying to retrieve the current sfp-tx-power and sfp-rx-power from the rest api, and struggling to get the correct syntax.

From the console I can get it data at /interface ethernet monitor sfp-sfpplus1

I thought it would be something like this, but I get am "unknown parameter interface" error back.

POST "https://10.11.12.114/rest/interface/ethernet/monitor" with a body of {"interface":"sfp-sfpplus1","duration":"1s"}

Would welcome any pointers!

Thanks!
 
gazzer82
just joined
Topic Author
Posts: 2
Joined: Mon Apr 04, 2022 2:47 pm

Re: v7.1.5 - Rest API - SFP TX/RX Power

Thu Jun 02, 2022 12:05 am

Just asking again if anyone could point me in the right direction?

Thanks!
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: v7.1.5 - Rest API - SFP TX/RX Power

Thu Jun 02, 2022 1:27 am

Look at the equivalent command in the CLI, API and CLI parameter names are identical, so there is no "interface" parameter just as the error says.

Most likely you need to get the ID of the interface first and then use the "numbers" parameter

Who is online

Users browsing this forum: apitsos, Google [Bot], GoogleOther [Bot], moorezilla, orionren and 76 guests