{"id":19873078,"url":"https://github.com/checkpointsw/harmony-endpoint-management-py-sdk","last_synced_at":"2025-10-15T06:17:42.525Z","repository":{"id":224327538,"uuid":"758026071","full_name":"CheckPointSW/harmony-endpoint-management-py-sdk","owner":"CheckPointSW","description":"Check Point's Harmony Endpoint management SDK for Python ecosystem","archived":false,"fork":false,"pushed_at":"2025-07-03T17:05:09.000Z","size":23687,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"release","last_synced_at":"2025-09-27T11:16:44.771Z","etag":null,"topics":["checkpoint","endpoint","harmony","python","sdk"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/chkp-harmony-endpoint-management-sdk/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CheckPointSW.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-15T13:31:59.000Z","updated_at":"2025-07-03T16:59:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"dbde126c-0b04-4304-9d58-ea6a2c7b0b26","html_url":"https://github.com/CheckPointSW/harmony-endpoint-management-py-sdk","commit_stats":null,"previous_names":["checkpointsw/harmony-endpoint-management-py-sdk"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/CheckPointSW/harmony-endpoint-management-py-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheckPointSW%2Fharmony-endpoint-management-py-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheckPointSW%2Fharmony-endpoint-management-py-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheckPointSW%2Fharmony-endpoint-management-py-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheckPointSW%2Fharmony-endpoint-management-py-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CheckPointSW","download_url":"https://codeload.github.com/CheckPointSW/harmony-endpoint-management-py-sdk/tar.gz/refs/heads/release","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheckPointSW%2Fharmony-endpoint-management-py-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279057863,"owners_count":26094842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["checkpoint","endpoint","harmony","python","sdk"],"created_at":"2024-11-12T16:17:43.272Z","updated_at":"2025-10-15T06:17:42.493Z","avatar_url":"https://github.com/CheckPointSW.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Check Point - Harmony Endpoint Management Python SDK\n\n[![License](https://img.shields.io/github/license/CheckPointSW/harmony-endpoint-management-py-sdk.svg?style=plastic)](https://github.com/CheckPointSW/harmony-endpoint-management-py-sdk/blob/release/LICENSE) [![Latest Release](https://img.shields.io/github/v/release/CheckPointSW/harmony-endpoint-management-py-sdk?style=plastic)](https://github.com/CheckPointSW/harmony-endpoint-management-py-sdk/releases) [![PyPI version](https://img.shields.io/pypi/v/chkp-harmony-endpoint-management-sdk.svg?style=plastic)](https://pypi.org/project/chkp-harmony-endpoint-management-sdk/)\n\n\n\u003c!-- \nComing soon :)\n\n[![npm downloads](https://img.shields.io/npm/dt/@chkp/harmony-endpoint-management-sdk.svg.svg?style=plastic)](https://npmjs.com/package/@chkp/harmony-endpoint-management-sdk.svg)\n\n[![GitHub stars](https://img.shields.io/github/stars/CheckPointSW/harmony-endpoint-management-py-sdk.svg?style=social\u0026label=Star)](https://github.com/CheckPointSW/harmony-endpoint-management-py-sdk/stargazers) --\u003e\n\n[![Build SDK Package](https://github.com/CheckPointSW/harmony-endpoint-management-py-sdk/actions/workflows/build.yml/badge.svg)](https://github.com/CheckPointSW/harmony-endpoint-management-py-sdk/actions/workflows/build.yml) [![Publish package to PyPI](https://github.com/CheckPointSW/harmony-endpoint-management-py-sdk/actions/workflows/release.yml/badge.svg)](https://github.com/CheckPointSW/harmony-endpoint-management-py-sdk/actions/workflows/release.yml)\n\nThis is the Harmony Endpoint management SDK for Python ecosystem.\n\nThe SDK is based on the public [Harmony Endpoint management OpenAPI](https://app.swaggerhub.com/apis/Check-Point/web-mgmt-external-api-production) specifications.\n\nWith the SDK, you do not have to manage log in, send keep alive requests, worry about session expiration or pull long processing jobs.\n\n\u003e 💡 The Harmony Endpoint SDK supports simultaneous instances with different tenants.\n\n## ⬇️ SDK installation\n\nTo start using this SDK, add the SDK package to your project\n\nVia PIP (PyPi registry)\n```bash \npip install chkp-harmony-endpoint-management-sdk\n```\n\n## 🚀 Getting started\n\nFirst, import the `HarmonyEndpoint` object from the package.\n\n```python\nfrom chkp_harmony_endpoint_management_sdk import HarmonyEndpoint\n```\n\nThen, create a new instance of `HarmonyEndpoint`, which provides CloudInfra API credentials and a gateway to connect to.\n\nTo obtain CloudInfra credentials, open the Infinity Portal and create a suitable API Key. Make sure to select `Endpoint` in the `Service` field. For more information, see [Infinity Portal Administration Guide](https://sc1.checkpoint.com/documents/Infinity_Portal/WebAdminGuides/EN/Infinity-Portal-Admin-Guide/Content/Topics-Infinity-Portal/API-Keys.htm?tocpath=Global%20Settings%7C_____7#API_Keys).\n\nOnce the Client ID, Secret Key, and Authentication URL are obtained, Harmony Endpoint SDK can be used.\n\nAll API operations can be explored with the `HarmonyEndpoint` instance, notice to the documentation on each API operation, what and where are the arguments it requires.\n\nAll API's can be also explored in [SwaggerHub](https://app.swaggerhub.com/apis/Check-Point/web-mgmt-external-api-production)\n\nA complete example:\n\n```python\nfrom chkp_harmony_endpoint_management_sdk import HarmonyEndpoint, InfinityPortalAuth\n\n# Create a new instance of HarmonyEndpoint (we do support multiple instances in parallel)\nhe = HarmonyEndpoint()\n\n# Connect to management using CloudInfra API credentials\nhe.connect(infinity_portal_auth=InfinityPortalAuth(\n        client_id=\"place here your CI client-id\", # The \"Client ID\"\n        access_key= \"place here your CI access-key\", # The \"Secret Key\"\n        gateway=\"https://cloudinfra-gw-us.portal.checkpoint.com/auth/external\" # The \"Authentication URL\"\n        )) \n\n# Query the API operation\nrules_metadata_res = he.policy_general_api.get_all_rules_metadata(header_params={ \"x-mgmt-run-as-job\": 'off'})\nprint(rules_metadata_res.payload)  # Your rulebase metadata\n\n# Also you can query this operation using job, no extra logic required, in the background, it will trigger a job and will pull the status till it finish and return the final results. \nrules_metadata_res = he.policy_general_api.get_all_rules_metadata(header_params={ \"x-mgmt-run-as-job\": 'on'})\nprint(rules_metadata_res.is_job)  # True\nprint(rules_metadata_res.payload)  # Your rulebase metadata\n\n# Once finish, disconnect to stop all background session management. \nhe.disconnect()\n```\n\n### 🏠 On-premise\n\n🛠️🛠️🛠️ **Under Development** 🛠️🛠️🛠️\n\nHarmony Endpoint On-premise instances are also supported.\n\n\u003e Pay attention! Not all cloud operations are available for on-premise, also need to specify the SDK version to comply with your Gaia / JHF version\n\n\n```python\nfrom chkp_harmony_endpoint_management_sdk import HarmonyEndpointPremise, OnPremisePortalAuth\n\n# Create a new instance of HarmonyEndpoint (we do support multiple instances in parallel)\nhep = HarmonyEndpointPremise()\n\n# Connect to management using CloudInfra API credentials\nhep.connect(on_premise_portal_auth=OnPremisePortalAuth(\n    username=\"xxxx\", \n    password= \"xxxx\", \n    url=\"https://x.x.x.x\",\n    disable_tls_chain_validation=False # Set it true only if you fully trust this URL (e.g. case of internal but not verified https certificate)\n    )) \n\n# Query the API operation\nrules_metadata_res = hep.policy_general_api.get_all_rules_metadata(header_params={ \"x-mgmt-run-as-job\": 'off'})\nprint(rules_metadata_res.payload)  # Your rulebase metadata\n\n# Once all finish, disconnect to stop all background session management. \nhep.disconnect()\n```\n\nOn-Premises API can be explored in [SwaggerHub](https://app.swaggerhub.com/apis/Check-Point/web-mgmt-external-api-premise)\n\n### ☁️ Cloud \u0026 MSSP services APIs\n\nHarmony Endpoint also provides APIs for MSSP and Cloud service management (relevant to SaaS customers only) \n\n\nThe usage is similar to the management API\n```python\nfrom chkp_harmony_endpoint_management_sdk import HarmonyEndpointSaaS, InfinityPortalAuth, HarmonyEndpointSaaSOptions\n\nhe_saas = HarmonyEndpointSaaS()\n\n# Connect to management using CloudInfra API credentials\nhe_saas.connect(infinity_portal_auth=InfinityPortalAuth(\n        client_id=\"place here your CI client-id\", # The \"Client ID\"\n        access_key= \"place here your CI access-key\", # The \"Secret Key\"\n        gateway=\"https://cloudinfra-gw-us.portal.checkpoint.com/auth/external\", # The \"Authentication URL\"\n        harmony_endpoint_saas_options=HarmonyEndpointSaaSOptions(\n                    activate_mssp_session=True # Activate MSSP's session management, turn on if you're using MSSP APIs\n                )\n        )) \n\n# Query the cloud API operation\ninstance_status_res = he_saas.self_service_api.public_machines_single_status()\nprint(instance_status_res.payload)  # Your instance status\n\nhe_saas.disconnect()\n```\nAPI available at [SwaggerHub](https://app.swaggerhub.com/apis/Check-Point/harmony-endpoint-cloud-api-prod)\n\n## 🔍 Troubleshooting and logging\n\nThe full version and build info of the SDK is available by `HarmonyEndpoint.info()` see example:\n```python\nfrom chkp_harmony_endpoint_management_sdk import HarmonyEndpoint, HarmonyEndpointSDKInfo\n\nsdk_info: HarmonyEndpointSDKInfo = HarmonyEndpoint.info()\nprint(sdk_info) # sdk_build:\"9728283\", sdk_version:\"1.0.2\", spec:\"web-mgmt-external-api-production\", spec_version:\"1.9.159\", released_on:\"2023-09-10T18:14:38.264Z\"\n```\n\nHarmony Endpoint Management SDK uses the official python logger package for logging.\n\nThere are 3 loggers, for general info, errors and to inspect network.\n\nAs default they will be disabled, in order to enable logging, set to the `HARMONY_ENDPOINT_SDK_LOGGER` environment variable the following string before loading the SDK:\n```bash\nHARMONY_ENDPOINT_SDK_LOGGER=\"*\"\n```\n\nAnd for a specific/s logger set the logger name followed by a command as following:\n```bash\nHARMONY_ENDPOINT_SDK_LOGGER=\"info,error,network\"\n```\n\nor activate logger programmatically using SDK methods:\n```python\nfrom chkp_harmony_endpoint_management_sdk import activate_all_loggers, activate_info_logger, activate_error_logger, activate_network_logger\n...\nactivate_all_loggers() # Will activate all logger\nactivate_info_logger() # Will activate the info logger only\nactivate_error_logger() # Will activate the error logger only\nactivate_network_logger() # Will activate the network logger only\n```\n\n## 🐞 Report Bug\n\nIn case of an issue or a bug found in the SDK, please open an [issue](https://github.com/CheckPointSW/harmony-endpoint-management-py-sdk/issues) or report to us [Check Point Software Technologies Ltd](mailto:harmony-endpoint-external-api@checkpoint.com).\n\n## 🤝 Contributors \n- Haim Kastner - [chkp-haimk](https://github.com/chkp-haimk)\n- Yuval Pomerchik - [chkp-yuvalpo](https://github.com/chkp-yuvalpo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckpointsw%2Fharmony-endpoint-management-py-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheckpointsw%2Fharmony-endpoint-management-py-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckpointsw%2Fharmony-endpoint-management-py-sdk/lists"}