Skip to main content
quark020
New Member
Dec 26, 2020 4:05 PM UTC
Question

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

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.

    6 replies

    emnoc
    New Member
    Dec 27, 2020 11:38 AM UTC

    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

    Translate
    quark020
    quark020Author
    New Member
    Dec 28, 2020 7:12 AM UTC

    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.

    Translate
    quark020
    quark020Author
    New Member
    Dec 28, 2020 8:08 AM UTC

    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."

    Translate
    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024