Customer Service
Customer Service Information and Announcements
mrashid
Staff
Staff
Article Id 355212
Description This article describes how to configure installation target for a specific policy in a policy package using JSON API.
Scope FortiManager
Solution

Solution:

To add a device under a specific policy installation target, use the following API syntax:


{
"session": "{{session}}",
"id": 1,
"method": "add",
"params": [
{
"data": [
{
"name": "<FGT Name>",
"vdom": "<vdom name>"
}
],
"url": "/pm/config/adom/<adom>/pkg/<pkg name>/firewall/policy/<id>/scope member"
}
]


}

To append to existing members, the following API syntax can be used.

{
"session": "{{session}}",
"id": 1,
"method": "set",
"params": [
{
"data": [
{
"name": "<FGT Name>",
"vdom": "<vdom name>"
}
],
"url": "/pm/config/adom/<adom>/pkg/<pkg name>/firewall/policy/<id>/scope member"
}
]


}

 

Note: Replace FortiGate Name, VDOM name, DOM, pkg name and ID (policy ID) with actual values or variables.

 

Related documents: