1
23.7 Legacy Series / Re: Is it possible to enable firewall rules via the command line / cron?
« on: July 08, 2024, 02:43:40 am »
I am using an example from the docs and it returns an empty result set. Are the API docs out of date now that the firewall endpoints are built in?
Code: [Select]
rule_description='test_rule_1'
remote_uri="http://192.168.1.1"
# search for rule
r = requests.get("%s/api/firewall/filter/searchRule?searchPhrase=%s" % (
remote_uri, rule_description
),
auth=(api_key, api_secret), verify=False
)
print("status code", r.status_code, r.text)
Code: [Select]
status code 200 {"rows":[],"rowCount":0,"total":0,"current":1}
rule test_rule_1 not found