- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
02-09-2022 03:58 AM
Hi @itzikc, with the REST API the call would look something like this:
https://{{host}}/restapi/v10.0/Policies/SecurityRules?name={{rulename}}&location={{location}}&vsys={{vsys}}&output-format=json
And the response:
},
"action": "drop",
"log-start": "yes",
"log-setting": "default",
"disabled": "yes"
}
]
}
}
With the XML API the call would look like this:
https://{{host}}/api/?key={{key}}&type=config&action=show&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='{{rulename}}']
And the response:
<action>drop</action>
<log-start>yes</log-start>
<log-setting>default</log-setting>
<disabled>yes</disabled>
</entry>
</result>
</response>
Modify as appropriate for you environment, specifically the API version for the REST API, and add Device Groups parameters if this is via Panorama.
02-09-2022 03:58 AM
Hi @itzikc, with the REST API the call would look something like this:
https://{{host}}/restapi/v10.0/Policies/SecurityRules?name={{rulename}}&location={{location}}&vsys={{vsys}}&output-format=json
And the response:
},
"action": "drop",
"log-start": "yes",
"log-setting": "default",
"disabled": "yes"
}
]
}
}
With the XML API the call would look like this:
https://{{host}}/api/?key={{key}}&type=config&action=show&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='{{rulename}}']
And the response:
<action>drop</action>
<log-start>yes</log-start>
<log-setting>default</log-setting>
<disabled>yes</disabled>
</entry>
</result>
</response>
Modify as appropriate for you environment, specifically the API version for the REST API, and add Device Groups parameters if this is via Panorama.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!