- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026: Submissions
Are Now Open!
What's New in R82.10?
Watch NowOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
Hello,
Can the Checkpoint python sdk for the management api be installed or references on the management server itself?
I want to automate the execution of some python scripts for policy maintenance from AWX against the management server using the ansible cp_mgmt_run_script module. This module requires you to specify a target host in the playbook, which in this case is the management server itself.
It will then attempt to run the script locally from the target host (mgmt server).
I've copied the scripts to a location on the management server, however when I try to run them the mgmt server report the require module cpapi is missing - which was expected as the sdk is not installed.
The README.md in the github site (https://github.com/CheckPointSW/cp_mgmt_api_python_sdk) refers to configuring the sdk on a management machine - not sure 100 what this would be. It requires you to download then sdk (not install it using pip), then configure a reference to it in an environment variable.
export PYTHONPATH=$PYTHONPATH:/home/admin/cp_mgmt_api_python_sdk/
Regards,
Simon
Hi Simon - Martin was saying to create a folder on your management server and call it "cpapi". Then download all of the files API into it like the instructions say on the github page.
Example CPAPI path: /home/admin/cpapi
If you put your script in this folder: /home/admin/
This should allow it to find the CPAPI module. See the example I did using the find_dup_ip.py sample script:
[Expert@mgmt-sa1:0]# pwd
/home/admin
[Expert@mgmt-sa1:0]# ls -d c*
cpapi
[Expert@mgmt-sa1:0]# cd cpapi/
[Expert@mgmt-sa1:0]# ls
__init__.py __init__.pyc api_exceptions.py api_exceptions.pyc api_response.py api_response.pyc cli.py mgmt_api.py mgmt_api.pyc utils.py utils.pyc
[Expert@mgmt-sa1:0]# cd ..
[Expert@mgmt-sa1:0]# python find_dup_ip.py
Enter server IP address or hostname:x.x.x.x
Enter username: admin
Enter password:
Processing. Please wait...
Saving data to debug file api_calls.json
List of Duplicate IP addresses:
-------------------------------
it's enough to create folder called "cpapi" and put those files to it and script which will be running in same folder where "cpapi" is located it will load it.
Hi Martin,
Can you please explain that in a bit more detail.
Regards,
Simon
Hi Simon - Martin was saying to create a folder on your management server and call it "cpapi". Then download all of the files API into it like the instructions say on the github page.
Example CPAPI path: /home/admin/cpapi
If you put your script in this folder: /home/admin/
This should allow it to find the CPAPI module. See the example I did using the find_dup_ip.py sample script:
[Expert@mgmt-sa1:0]# pwd
/home/admin
[Expert@mgmt-sa1:0]# ls -d c*
cpapi
[Expert@mgmt-sa1:0]# cd cpapi/
[Expert@mgmt-sa1:0]# ls
__init__.py __init__.pyc api_exceptions.py api_exceptions.pyc api_response.py api_response.pyc cli.py mgmt_api.py mgmt_api.pyc utils.py utils.pyc
[Expert@mgmt-sa1:0]# cd ..
[Expert@mgmt-sa1:0]# python find_dup_ip.py
Enter server IP address or hostname:x.x.x.x
Enter username: admin
Enter password:
Processing. Please wait...
Saving data to debug file api_calls.json
List of Duplicate IP addresses:
-------------------------------
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 4 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
Tue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY