FortiSwitch using FortiManager API
Hi all -
I have been fighting with the FortiManager API for a while now. With a Python script, I've been able to:
- Authenticate to Fortimanager
- Query all Fortigates in FortiManage
- Loop through the devices to find a specific Fortigate
- Collect details from any individual or all Fortigates including
- Interface Status, IP address, subnet, vlan and description
- Grab the Switch Hostname, Serial Number and number of ports
I am struggling with figuring out how to pull the switch details for:
- Mgmt IP address
- Model Number (It appears to part of the start of the serial number)
I'm pretty sure I can get it pretty easy from the FortiOS directly, but I'm really hoping to pull the details from FortiManager with the same "connection". I can see the details in FortiManager under FortiSwitches.
Any ideas anyone?
Thanks,
-Todd
