Created on
05-01-2025
11:02 PM
Edited on
06-23-2025
10:56 PM
By
Jean-Philippe_P
This article describes how to move a policy package and folder to a different folder using the JSON API.
FortiManager.
Here is the initial policy package and folder location before any changes:
Scenario 1: Move policy package.
{
"method": "exec",
"params": [ {
"data": {
"adom": "ADOM-001",
"dst_name": "policy-package-002",
"dst_parent": "folder-002",
"pkg": "folder001/policy-package002"
},
"url": "/securityconsole/package/move"
}],
"session": "{{session}}",
"verbose": 1,
"id": 1
}
To clone the package, change the URL to: '/securityconsole/package/clone'.
Scenario 2: Move folder.
{
"method": "exec",
"params": [ {
"data": {
"adom": "ADOM-001",
"dst_name": "folder-002",
"dst_parent": "folder-001",
"pkg": "folder-002"
},
"url": "/securityconsole/package/move"
}],
"session": "{{session}}",
"verbose": 1,
"id": 1
}
Scenario 3: Move folder/policy package to root folder:
{
"method": "exec",
"params": [ {
"data": {
"adom": "ADOM-001",
"dst_name": "folder-002",
"dst_parent": "",
"pkg": "folder-001/folder-002"
},
"url": "/securityconsole/package/move"
}],
"session": "{{session}}",
"verbose": 1,
"id": 1
}
Note:
In case Workspace mode is enabled on FortiManager, it is required to lock the ADOM.
Refer to the article: Technical Tip: How to lock/unlock an ADOM and commit changes in FortiManager using the JSON API.
Troubleshooting:
The following commands can be used on the FortiManager CLI to debug the API Calls:
diagnose debug service httpd 255
diagnose debug service main 255
Related documents:
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.