| 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-00505692583a/REST_API_V2_Configuration.pdf |