Technical Tip: How to fetch details of DHCP clients of managed FortiGates using FortiManager JSON API
- September 24, 2025
- 0 replies
- 700 views
| Description | This article describes how to get details of all DHCP clients connected to all managed FortiGates using ForiManager JSON API and Postman. |
| Scope | FortiManager, FortiGate, JSON API. |
| Solution | The FortiManager proxy API can be used to query DHCP client information from multiple managed FortiGates.
To fetch the list of all managed FortiGates, follow Step 1 in this KB article: Technical Tip: How to fetch Interface IP address of managed FortiGates using FortiManager JSON API.
Then use the following API query to fetch the DHCP clients' details:
{ "id": "2", "method": "exec", "params": [ { "url": "sys/proxy/json", "data": { "target": {{device_targets}}, "action": "get", "resource": "/api/v2/monitor/system/dhcp" } } ], "session": "{{session}}" }
The API response includes interface details for each specified device. To generate a clean and readable summary, using Postman, JavaScript can be used in the Scripts -> Post-res section to extract and display the following fields in the Visualization tab:
Final output in the visualization tab of Postman:
Related documents: Technical Tip: Using FortiManager API Fortinet Development Network (FNDN) - FortiGate Fortinet Development Network (FNDN) - FortiManager Technical Tip: How to run a proxy API call from FortiManager to a managed FortiGate |


