Skip to main content
Contributor III
November 16, 2022

Technical Tip: Common REST API calls to use with FortiNAC

  • November 16, 2022
  • 0 replies
  • 1408 views
Description This article describes three common API calls to leverage from FortiNAC and its syntax.
Scope FortiNAC 8.x, 9.x.
Solution

 

  1. Getting the host record by the hostname parameter:

 

https://<FNAC_FQDN/IP>:8443/api/v2/host?filter=hostName==<hostname> 

 

 

  1. Getting the host record by the logged-on user ID:

 

https://<FNAC_FQDN/IP>:8443/api/v2/host?filter=UserLoggedOn==<username>

 

 

  1. Getting the host(s) associated with a user:

 


https://<FNAC_FQDN/IP>:8443/api/v2/host/for-user?userID=<username>

 

 

  1. To GET the Hosts view via Postman (visualized view)

 

https://<FNAC_FQDN/IP>:8443/api/v2/host 


postman hostview01.png

 

  1. To GET the first host in Host view, the 'start' should be '0'. '1' will preview the second host entry.


The 'count' will display the user records after the 'start' based on the value entered. For example:

 

https://<FNAC_FQDN/IP>:8443/api/v2/host?count=1&start=0 
https://<FNAC_FQDN/IP>:8443/api/v2/host?count=2&start=3

 


postman hostview02.png

 

Related document:

FortiNAC REST API v2 configuration

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!