Skip to main content
SivaS
Staff
Staff
January 19, 2026

Technical Tip: FortiManager API payload enhancements and change in format from version 7.4.4 and above

Description This article describes the API enhancement to support install preview in the response for multiple devices and additionally shows the difference in the preview result query format between firmware versions 7.2 and 7.4.
Scope FortiManager.
Solution
  •  The FortiManager JSON API script has been enhanced in FortiManager v7.4.4, v7.6.0 and above as follows:

 

doc: install policy package diff preview
method: exec
params:
url: "/securityconsole/install/preview"
data:
adom: $ADOM_NAME
flags: 1
scope:
- name: $DEVICE_NAME
vdom: $VDOM_NAME

 

  • Difference in the preview result query format between firmware versions 7.2 and 7.4.

 

FortiManager v7.2 FortiManager v7.4
Install Package  
{
    "method": "exec",
    "params": [
        {
            "data": {
                "adom": "{{adom}}",
                "flags": [
                    "preview"
                ],
                "pkg": [
                    "{{pkg_name}}"
                ],
                "scope": [
                    {
                        "name": "{{device_name}}",
                        "vdom": "{{vdom}}"
                    }
                ]
            },
            "url": "securityconsole/install/package"
        }
    ],
    "id": "{{session_id}}",
    "session": "{{session}}"
}
{
    "method": "exec",
    "params": [
        {
            "data": {
                "adom": "{{adom}}",
                "flags": [
                    "preview"
                ],
                "pkg": [
                    "{{pkg_name}}"
                ],
                "scope": [
                    {
                        "name": "{{device_name}}",
                        "vdom": "{{vdom}}"
                    }
                ]
            },
            "url": "securityconsole/install/package"
        }
    ],
    "id": "{{session_id}}",
    "session": "{{session}}"
}
Install Preview  
{
  "method": "exec",
  "params": [
    {
      "data": {
        "adom": "{{adom}}",
        "device": "{{device_name}}",
        "flags": [
          "none"
        ],
        "vdoms": "{{vdom}}"
      },
      "url": "securityconsole/install/preview"
    }
  ],
    "id": "{{session_id}}",
    "session": "{{session}}"
}
{
    "method": "exec",
    "params": [
        {
            "data": {
                "adom": "{{adom}}",
                "flags": [
                    "none"
                ],
                "scope": [
                    {
                        "name": "{{device_name}}",
                        "vdom": "{{vdom}}"
                    }
                ]
            },
            "url": "securityconsole/install/preview"
        }
    ],
    "id": "{{session_id}}",
    "session": "{{session}}"
}
Preview Result  
{
    "method": "exec",
    "params": [
        {
            "data": {
                "adom": "{{adom}}",
                "device": "{{device_name}}"
            },
            "url": "/securityconsole/preview/result"
        }
    ],
    "id": "{{session_id}}",
    "session": "{{session}}"
}
{
    "method": "exec",
    "params": [
        {
            "data": {
                "adom":"{{adom}}",
                "scope": [
                    {
                        "name": "{{device_name}}",
                        "vdom": "{{vdom}}"
                    }
                ]
            },
            "url": "/securityconsole/preview/result"
        }
    ],
    "id": "{{session_id}}",
    "session": "{{session}}"
}

 

Notes:

 

  1. Note that 'adom' is a string, not an array.

 

"adom": "string",

 

  1. Note that 'pkg' is an array, not a string.

"pkg": [
"{{pkg_name}}"
],

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT