Skip to main content
quark020
New Member
December 26, 2020
Question

Hardware interfaces not listed in api/v2/monitor/system/interface

  • December 26, 2020
  • 1 reply
  • 9486 views

I'm trying to get hardware interface metrics for FortiWiFi 60E using the REST API endpoints. Querying the following endpoints only returns the WAN, VLAN,  DMZ, MODEM & WiFi interfaces, but none of the hardware interfaces are listed there.


https://ip:port/api/v2/monitor/system/interface/select?vdom=*&include_vlan=true
https://ip:port/api/v2/monitor/system/interface/

The admin profile used to fetch the above information has read-only permission on all the resources. What am I missing here ?

 

Any help would be much appreciated.

    1 reply

    emnoc
    New Member
    December 27, 2020

    I don't know if that is possible but my query provides the same details that matches the  " show sys interface"  output for physical of if you trying to gather details that are similar to " diag hardware deviceinfo nic portX " that needs to be done via SNMP.

     

     

    e.g

     

    curl -k  -H -- "Authorization:1kcnp4sksmrdjmkb1sm6d88NQbc9kb" https://1.1.1.111/api/v2/monitor/system/interface?access_token=1kcnp4sksmrdjmkb1sm6d88NQbc9kb

     

     

    So if your goal is to get let's say to get specific  for "port1" that is not possible with that call.

     

    Did you open a ticket with TAC to have them confirm?

     

    tip :

     

    1: if you query the top level path you can find out what calls are available and the http_request_method GET or POST .

     

    e.g /* see my examples and the path strrings */

     

    curl -k  -H -- "Authorization:1kcnp4sksmrdjmkb1sm6d88NQbc9kb" [link=https://209.174.200.2/api/v2/monitor/system?access_token=1kcnp4sksmrdjmkb1sm6d88NQbc9kb]https://1.1.1.111/api/v2/monitor/system?access_token=1kcnp4sksmrdjmkb1sm6d88NQbc9kb[/link]

     

     

    or

     

    curl -k  -H -- "Authorization:1kcnp4sksmrdjmkb1sm6d88NQbc9kb" https://1.1.1.111/api/v2/monitor?access_token=1kcnp4sksmrdjmkb1sm6d88NQbc9kb

     

    Ken Felix

    quark020
    quark020Author
    New Member
    December 28, 2020

    Thank you Ken.

     

    For me "show sys interface" lists all the available interfaces including the hardware ones. Querying via "api/v2/monitor/system/interface" excludes these. That's the perplexing part.

     

    I'm going to raise a ticket with TAC and get them to confirm this one way or the other. Will update here once I get a response.

    quark020
    quark020Author
    New Member
    December 28, 2020

    Here's what I got from TAC.

     

    "As per the TAC policies we can't support API related information as it is out of TAC scope. I would request you to submit your request via Fortinet Developer Network using the below link, as we have separate team who work on API related queries."