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.
ebilcari
Staff
Staff
Article Id 273867
Description

 

This article describes some easy API calls to add information in FortiNAC and its syntax.

 

Scope

 

All supported versions of FortiNAC.

 

Solution

 

  1.  Adding hosts and adapters

This example shows how to put a single host with one or multiple adapters and also select the role. This can be used in cases when dummy devices need to be added in FortiNAC and is desired to have these hosts pre-defined/registered.

 

The example below will create a host with a single adapter:

 

POST https://fnac.eb.eu:8443/api/v2/host
Body
{
"hostName": "OT-Device001",
"adapters": [
"11:00:00:00:00:01"
],
"role": "OT-Group1"
}

 

From FortiNAC, the host is created with the adapter and the role:

 

host in gui.PNG

If the host has more than one adapter, it can be added separated by commas (additional information can also be added):

 

{
"hostName": "OT-Device002",
"adapters": [
"12:00:00:00:00:01", "12:00:00:00:00:02"
],
"role": "OT-Group1",
"hardwareType": "HAVAC",
"pcserialNumber": "AA0001",
"operatingSystem": "HavacOS",
"agentTag": "AAA10001"
}
 
  1. Creating a host Group:
 
{
"name": "OT-HVAC",
"elementClass": "8",
"daysValid":333,
"daysInactive":100,
"description": "HVAC Group of devices ..."
}
 
The type of the group is for registered hosts 'elementClass': '8'.
 
  1. Creating a network device container:
 
{
"name": "NDs-Building5",
"note" : "Container for building 5",
"defaultAPLocation" : "false"
}
 

More information related to API can be found in Fortinet Developer Network

 

Related articles:

Troubleshooting Tip: REST API calls to FortiNAC

Technical Tip: Common REST API calls to use with FortiNAC

Contributors