This URL exports firewall policies from the Manager.
Resource URL
PUT /domain/<domain_id>/firewallpolicy/export
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Domain id | Number | Yes |
Payload Request Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| List of the policies to export | Object | Yes |
Details of selectedPolicyList:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| List of name of firewall policy to export. By default all the policies are exported. | StringList | No |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Byte stream of the exported file | String |
Example
Request
PUT https://<NSM_IP>/sdkapi/domain/0/firewallpolicy/export
Payload
{
“selectedPolicyNameList”:[“FirewallPolicy4”,“FirewallPolicy3”]
}
Response
{
"byteSream": “<FWConfig>
<NetworkObjects/>
<FWPolicies>
<FWPolicy owner_ad="My Company" policyName="FirewallPolicy4" policyType="1" visibleToChild="false" policyDescription="Firewall Policy for Port">
<FWPolicyRules owner_ad="My Company" uuid="108" Rulename="" direction="3" action="0" enablelog="N" description="" ordernum="0" type="1" state="1" mandate_auth="N">
<SourceObjectMember>
<NetworkObjectMember noid="-1" noname="" notype="1" noconfig="1"/>
</SourceObjectMember>
<DestinationObjectMember>
<NetworkObjectMember noid="-1" noname="" notype="1" noconfig="1"/>
</DestinationObjectMember>
<ServiceObjectMember>
<NetworkObjectMember noid="-1" noname="" notype="8" noconfig="1"/>
</ServiceObjectMember>
//……//
DestinationObjectMember>
<NetworkObjectMember noid="-1" noname="" notype="1" noconfig="1"/>
</DestinationObjectMember>
<ServiceObjectMember>
<NetworkObjectMember noid="-1" noname="" notype="8" noconfig="1"/>
</ServiceObjectMember>
<TimeObjectMember>
<NetworkObjectMember noid="-1" noname="" notype="9" noconfig="1"/>
</TimeObjectMember>
<UserObjectMember>
<NetworkObjectMember noid="-1" noname="" notype="32" noconfig="1"/>
</UserObjectMember>
</FWPolicyRules>
</FWPolicy>
</FWPolicies>
</FWConfig>”
}
Error Information
Following error codes are returned by this URL:
No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 404 | 1105 | Invalid domain |
2 | 400 | 5305 | The policy given is not present: <policyname> |