Hi there, Pretty new to Checkpoint API/Scripting but was trying to do a policy cleanup and this looks like it could be a huge help.
-Running directly on SMS R80.20 M2
-Check Point API Python SDK added and variable set
Ran policyCleanUp.py multiple ways - but to keep it simple examples below
as User
# python policyCleanUp.py -op plan
[2019-06-25 22:39:10] Failed to login. Error: APIResponse received a response which is not a valid JSON.
User has access to management api in user settings, API is set to accept from all IP addresses
using the root flag
# python policyCleanUp.py -op plan -r true
Traceback (most recent call last):
File "policyCleanUp.py", line 1118, in <module>
main()
File "policyCleanUp.py", line 989, in main
check_validation_for_mds(client, user_args.domain)
File "policyCleanUp.py", line 935, in check_validation_for_mds
if int(api_res.data.get('total')) != 0:
AttributeError: 'NoneType' object has no attribute 'get'
Any ideas? This seemed like it would be really helpful to run for me.
thanks!