Created on
09-23-2025
10:16 PM
Edited on
09-23-2025
10:16 PM
By
Anthony_E
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 |
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.