FortiManager icon

FortiManager

Interact with FortiManager API

Firewall → Get Policy

AI-generated

Summary

Retrieve a firewall policy from FortiManager using the specified domain, access method, and parameters.

Inputs

  • domain (required) — Domain of FortiManager API to operate on
  • accessMethod — Method used to access firewall policy
  • adom (required) — Administrative Domain (ADOM) name
  • package (required) — Name of the policy package
  • device (required) — Name of the device to retrieve policy from
  • policyId (required) — ID of the policy to retrieve
  • additionalFields — Additional fields to include in the request, such as VDOM and response format

Output shape

a single firewall policy record

The response contains the requested policy; additionalFields may add fields like vdom and format, and the shape may vary based on those settings.

Examples

Example 1: Get policy from ADOM 'root' using policy package 'default'

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

Example 2: Retrieve a device-specific policy with extra fields

domain: pm, accessMethod: device, adom: root, device: "firewall1", policyId: "123", additionalFields: {"vdom": "vdom1", "format": "expanded"}

Discussion