This article describes some easy API calls to add information in FortiNAC and its syntax.
All supported versions of FortiNAC.
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:
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"
}
{
"name": "OT-HVAC",
"elementClass": "8",
"daysValid":333,
"daysInactive":100,
"description": "HVAC Group of devices ..."
}
{
"name": "NDs-Building5",
"note" : "Container for building 5",
"defaultAPLocation" : "false"
}
More information related to API can be found in Fortinet Developer Network
Related articles:
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.