Skip to main content
WinterSnowYap
Staff
Staff
July 17, 2025

Technical Tip: FortiManager creates a Device Group via API

  • July 17, 2025
  • 0 replies
  • 295 views
Description This article describes how FortiManager creates a Device Group via API.
Scope FortiManager.
Solution

Scenario:

  1. Go to System Settings -> Administrators, create an administrator account with Read and Write JSON API Access enabled:

 

202507_FMG_API_DeviceGroup_001.png

 

  1. At Postman, create an API script to get the session ID:

 

202507_FMG_API_DeviceGroup_002.png

 

  1. Use the session ID and create a Device Group and assign the FortiGate to the new Device Group:

 

202507_FMG_API_DeviceGroup_003.png

 

202507_FMG_API_DeviceGroup_004.png

Refer to 'API device group.zip' attached.