FortiManager icon

FortiManager

Interact with FortiManager API

Firewall → Get All Policies

AI-generated

Summary

Retrieve firewall policies from the selected ADOM and policy package

Inputs

  • domain (required) — Domain of FortiManager API to operate on (e.g., pm, device_manager, etc.)
  • accessMethod — Method used to access policies, either 'package' (ADOM policy) or 'device' (direct device policies)
  • adom (required) — Administrative Domain (ADOM) name; default is 'root'
  • package (required) — Name of the policy package to query; default is 'default'
  • device (required) — Name of the target device; required when accessMethod is 'device'
  • additionalFields — Optional fields such as filter, limit, format, or vdom to customize the request

Output shape

an array of firewall policy objects

Each entry describes a policy; the response may be empty, and errors are handled outside this output

Examples

Example 1: List all policies in the default ADOM using the default package

domain=pm, accessMethod=package, adom=root, package=default

Example 2: Get policies for a specific device

domain=pm, accessMethod=device, device=switch01, adom=root, package=default

Example 3: Retrieve policies with a filter and limited results

domain=pm, accessMethod=package, adom=root, package=default, additionalFields={"filter":"name:web*","limit":10,"format":"expanded"}

Discussion