FortiNAC
NOTE: FortiNAC is now named FortiNAC-F. For post-9.4 articles, see FortiNAC-F. FortiNAC is a zero-trust network access solution that provides users with enhanced visibility into the Internet of Things (IoT) devices on their enterprise networks.
Hawada1
Staff
Staff
Article Id 225389
Description This article describes how to use cURL Script to retrieve FortiNAC details using RESTAPI.
Scope FortiNAC
Solution

FortiNAC's REST API is a standardized method for other systems to interact with FortiNAC to perform configuration and monitoring operations.


curl --location --request GET 'https://<ha-ip/standalone-ip>:8443/api/v2/device/count/all' --header 'Content-Type: application/json' --header 'Authorization: Bearer <apikey>'


Curl command retrieves the total number of devices managed by FortiNAC in the 'Inventory':


{
"status": "success", <-----
"errorMessage": null,
"results": [],
"filtered": null,
"total": 4 <----- the equals to 4 devices.
}

 


The following Curl query is just another example of retrieving device identities for hosts available in the 'Hosts' view.


curl --location --request GET 'https://<ha-ip/standalone-ip>:8443/api/v2/host/device-identity' --header 'Content-Type: application/json' --header 'Authorization: Bearer <apikey>'


Related article:
Users can also import the above curl queries to Postman to preview data (pages 7 and 8):
https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/ea5c5de5-ebd6-11ea-96b9-005056...

Contributors