FortiManager

Interact with FortiManager API

Overview

This node integrates with the FortiManager API to retrieve firewall policies. Specifically, the "Get All Policies" operation under the "Firewall" resource allows users to fetch a list of firewall policies managed by FortiManager. This is useful for network administrators who want to automate policy audits, synchronize configurations, or monitor firewall rules programmatically.

Typical use cases include:

  • Extracting all firewall policies from a specific device or policy package for compliance checks.
  • Automating backup or migration of firewall policies.
  • Integrating firewall policy data into dashboards or reporting tools.

Properties

Name Meaning
Domain The domain of the FortiManager API to operate on. Options: CLI (CLI Configuration operations), Device Manager (Device management), Policy Manager (Policy and device configuration management), System (System commands), Task (Task management). Default is Policy Manager.
Access Method Method used to access firewall policies. Options: Policy Package (access policies from an ADOM policy package), Device (access policies directly from a device). Default is Policy Package.
ADOM Administrative Domain name within FortiManager. Defaults to "root". Required when Access Method is Policy Package.
Policy Package Name of the policy package to access. Defaults to "default". Required when Access Method is Policy Package.
Device Name Name of the device to retrieve policies from. Required when Access Method is Device.
Additional Fields Collection of optional fields:
- VDOM: Virtual domain name; if omitted, global policies are retrieved (only for Device access method).
- Filter: Filter string for request (per FortiManager filter syntax).
- Limit: Maximum number of results to return (default 50).
- Format: Response format, either Default or Expanded (expanded shows symbolic values).

Output

The node outputs an array of JSON objects representing firewall policies retrieved from FortiManager. Each item corresponds to a single firewall policy with its attributes as returned by the FortiManager API.

If binary data were involved (not indicated here), it would typically represent files or attachments related to policies, but this node focuses on JSON data output.

Dependencies

  • Requires a valid API authentication token or API key credential configured in n8n to connect to FortiManager.
  • Depends on FortiManager API availability and correct permissions for the specified domain and resources.
  • No additional external dependencies beyond the FortiManager API and the included helper modules.

Troubleshooting

  • Common issues:

    • Incorrect domain or resource selection may cause the API call to fail or return no data.
    • Providing invalid ADOM, policy package, or device names will result in errors or empty responses.
    • Filters with incorrect syntax can cause the API to reject the request.
    • Exceeding API rate limits or lacking sufficient permissions can lead to authorization errors.
  • Error messages:

    • Errors from the FortiManager API will be surfaced with their message. If "Continue On Fail" is enabled, the node returns an error object instead of stopping execution.
    • Network or authentication errors should be checked by verifying credentials and connectivity.
  • Resolution tips:

    • Double-check input parameters for correctness.
    • Consult FortiManager API documentation for valid filter syntax and parameter values.
    • Ensure the API user has appropriate permissions for the requested domain and operations.
    • Enable detailed logging to diagnose issues.

Links and References

  • FortiManager API Documentation (official API reference)
  • FortiManager product documentation for understanding ADOMs, policy packages, and device management concepts.

Discussion