I'm experiencing with the API and Postman. We use a wildcard-certificate and I wants to update all WAF-Rules at once. Becuase the GUI-way ist very hard (every time set the certificate, all domains will be dropped and the domain from the certificate only is listed). In the forum was recommended to update the certificate via API.
There is a easy way to get started with postman and the prepared collection. I'm able to get all rules or specific rules filtered after name. But I'm not able to list all policies that are policytype=HTTPBased.
Following request does not work. Error is always "Transaction failed"
<Request>
<Login>
<Username>{{username}}</Username>
<Password>{{password}}</Password>
</Login>
<Get>
<FirewallRule >
<Filter>
<key name="PolicyType" criteria="=">HTTPBased</key>
</Filter>
</FirewallRule >
</Get>
</Request>
Other requests after the same schema works very well:
<Request>
<Login>
<Username>{{username}}</Username>
<Password>{{password}}</Password>
</Login>
<Get>
<FirewallRule >
<Filter>
<key name="Name" criteria="=">Rulename</key>
</Filter>
</FirewallRule >
</Get>
</Request>
I checked the docu https://docs.sophos.com/nsg/sophos-firewall/19.5/API/PROTECT/Firewall/SecurityPolicy/operations/Addfirewallrule&Editfirewallrule.html but it seems PolicyType is filterable field like name.
any advice or where did I the wrong turn?
Added TAGs
[edited by: Raphael Alganes at 11:38 AM (GMT -8) on 6 Nov 2024]