<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python library for using R80 management server APIs in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40977#M2803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The source code is now an open source on GitHub repository:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/CheckPoint-APIs-Team/cpapi-python-sdk" title="https://github.com/CheckPoint-APIs-Team/cpapi-python-sdk"&gt;GitHub - CheckPoint-APIs-Team/cpapi-python-sdk: Check Point API Python Development Kit&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 27 Aug 2017 12:20:37 GMT</pubDate>
    <dc:creator>Robert_Decker</dc:creator>
    <dc:date>2017-08-27T12:20:37Z</dc:date>
    <item>
      <title>Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40965#M2791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H2&gt;Overview&lt;/H2&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;Check Point Python Development Kit simplifies the usage of the Check Point R80 Management Server APIs. The kit contains the API library project, and sample projects demonstrating the capabilities of the library.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Examples:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;add_access_rule - &lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;demonstrates a basic flow of using the APIs: performs a login command, adds an access rule to the top of the access policy layer, and publishes the changes&lt;/SPAN&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;find_duplicate_ip - &lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;demonstrates searching for all the hosts that share the same IP address&lt;/SPAN&gt;.&lt;/LI&gt;&lt;LI&gt;discard_sessions - &lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;demonstrates how to discard the changes to the database for un-published sessions&lt;/SPAN&gt;.&lt;/LI&gt;&lt;LI&gt;clone_host -&amp;nbsp;&lt;SPAN style="color: #24292e; background-color: #ffffff;"&gt;demonstrates cloning and replacing an existing host with a cloned host.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Description&lt;/H2&gt;&lt;P&gt;A Python 2.7 and Python 3.7 code that uses a library&amp;nbsp;that handles all the communication with the Check Point R80 Management Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Instructions&lt;/H2&gt;&lt;P&gt;Download the development kit containing the library and the examples.&lt;/P&gt;&lt;P&gt;Run each example from its folder.&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;python example_name.py&lt;/CODE&gt;&lt;/P&gt;&lt;H4 style="color: #24292e; background-color: #ffffff; font-weight: 600; font-size: 16px; margin-top: 24px; margin-bottom: 16px;"&gt;Or you can instalI the library with pip as follows:&lt;/H4&gt;&lt;PRE style="color: #24292e; background-color: #f6f8fa; margin-bottom: 16px; padding: 16px;"&gt;&lt;CODE style="background: transparent; border: 0px;"&gt;pip install git+https://github.com/CheckPointSW/cp_mgmt_api_python_sdk&lt;/CODE&gt;&lt;/PRE&gt;&lt;H6 style="color: #6a737d; background-color: #ffffff; font-weight: 600; font-size: 0.85em; margin-top: 24px; margin-bottom: 16px;"&gt;&lt;A href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk#note-you-might-be-required-to-use-sudo-for-this-command" style="color: #0366d6; background-color: transparent; text-decoration: none; margin-left: -20px; padding-right: 4px;"&gt;https://github.com/CheckPointSW/cp_mgmt_api_python_sdk#note-you-might-be-required-to-use-sudo-for-this-command&lt;/A&gt;Note: you might be required to use "sudo" for this command.&lt;/H6&gt;&lt;P&gt;For other ways to install/upgrade, see:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/blob/master/README.md" title="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/blob/master/README.md"&gt;cp_mgmt_api_python_sdk/README.md&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Tested on version&lt;/H2&gt;&lt;P&gt;R80, API version 1.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;Source Code Availability&lt;/H2&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;The source code is now public on GitHub repository:&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&lt;A class="link-titled" href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk" title="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk"&gt;GitHub - CheckPointSW/cp_mgmt_api_python_sdk: Check Point API Python Development Kit&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&lt;A class="link-titled" href="https://github.com/CheckPoint-APIs-Team/cpapi-python-sdk" title="https://github.com/CheckPoint-APIs-Team/cpapi-python-sdk"&gt;https://github.com/CheckPoint-APIs-Team/cpapi-python-sdk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 13px; color: #ff0000;"&gt;&lt;STRONG&gt;NOTICE: &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.6667px; color: #999999;"&gt;&lt;STRONG&gt;By using this sample code you agree to terms and conditions in this &lt;A href="https://community.checkpoint.com/docs/DOC-1042"&gt;Terms and Conditions&lt;/A&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 07:36:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40965#M2791</guid>
      <dc:creator>Uri_Bialik</dc:creator>
      <dc:date>2015-12-17T07:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40966#M2792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;with this I can start, thanks for inspiration..!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 15:57:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40966#M2792</guid>
      <dc:creator />
      <dc:date>2016-03-01T15:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40967#M2793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, &lt;/P&gt;&lt;P&gt;Enjoy the exploration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 16:22:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40967#M2793</guid>
      <dc:creator>Kobi_Eisenkraft</dc:creator>
      <dc:date>2016-03-01T16:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40968#M2794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nice! I'm going to have fun with this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 22:01:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40968#M2794</guid>
      <dc:creator>John_White</dc:creator>
      <dc:date>2016-03-01T22:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40969#M2795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the likelihood that Check Point will establish an official repository for these that can be more easily tracked than a forum post?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking Github, or one of it's peers.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 16:05:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40969#M2795</guid>
      <dc:creator>Quinn_Yost</dc:creator>
      <dc:date>2017-04-13T16:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40970#M2796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Quinn, &lt;/P&gt;&lt;P&gt;Thank you for your suggestion. Yes, an official repository is indeed the way to go...&lt;/P&gt;&lt;P&gt;Uri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 11:11:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40970#M2796</guid>
      <dc:creator>Uri_Bialik</dc:creator>
      <dc:date>2017-04-19T11:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40971#M2797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the recent transition to CodeHub intended to be the repository, or are should we still look forward to a transition to git (or equivalent)?&amp;nbsp;&amp;nbsp;&amp;nbsp; Seem that CodeHub is just a new theme applied to a Jive community.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 18:22:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40971#M2797</guid>
      <dc:creator>Quinn_Yost</dc:creator>
      <dc:date>2017-05-25T18:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40972#M2798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I attempt to run these scripts from the management server I receive the following error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@fwadmin:0]# ./python /home/admin/api_scripts/find_duplicate_ip/findDupIP.py&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Enter server IP address or hostname: 10.253.228.4&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Enter username: admin&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Enter password:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Traceback (most recent call last):&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; File "/home/admin/api_scripts/find_duplicate_ip/findDupIP.py", line 87, in &amp;lt;module&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; main()&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; File "/home/admin/api_scripts/find_duplicate_ip/findDupIP.py", line 38, in main&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; if client.check_fingerprint(server) is False:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; File "/home/admin/api_scripts/find_duplicate_ip/mgmt_api_lib/cp_mgmt_api.py", line 505, in check_fingerprint&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; server_fingerprint = self.get_server_fingerprint(server)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; File "/home/admin/api_scripts/find_duplicate_ip/mgmt_api_lib/cp_mgmt_api.py", line 369, in get_server_fingerprint&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; context = ssl.create_default_context()&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;AttributeError: 'module' object has no attribute 'create_default_context'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actively learning python, so forgive me if it is a trivial error I am not understanding.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am running this on the R80 management server itself utilizing python found in the /opt/CPsuite-R80/fw1/Python/bin directory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 03:04:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40972#M2798</guid>
      <dc:creator>Josh_Smith</dc:creator>
      <dc:date>2017-06-14T03:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40973#M2799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333; border: 0px; font-weight: inherit;"&gt;Hi Josh,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333; border: 0px; font-weight: inherit;"&gt;Thank you for your comment!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #333333; border: 0px; font-weight: inherit;"&gt;I will &lt;SPAN style="color: #333333; border: 0px; font-weight: inherit;"&gt;contact&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; color: #333333; font-weight: inherit;"&gt; you offline.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 06:29:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40973#M2799</guid>
      <dc:creator>Inbar_Moskovich</dc:creator>
      <dc:date>2017-06-14T06:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40974#M2800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what was the fix for this? &amp;nbsp;i've run into it as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;much thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 16:12:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40974#M2800</guid>
      <dc:creator>Greg_Dunlap</dc:creator>
      <dc:date>2017-07-21T16:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40975#M2801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it the same error as above or a different error?&lt;/P&gt;&lt;P&gt;Assuming it's the same,&amp;nbsp;&lt;A href="https://community.checkpoint.com/migrated-users/2065"&gt;https://community.checkpoint.com/people/inbareeae75d0-98f5-44ac-97e4-698af63daa24&lt;/A&gt;‌, can you comment on how you resolved the issue for Josh or provide an update?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2017 19:04:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40975#M2801</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2017-07-24T19:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40976#M2802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;I apologize for the delay in my response, I have not been at the office in the last week.&lt;/EM&gt;&lt;/P&gt;&lt;PRE style="background: white;"&gt;&lt;P&gt;&lt;EM&gt;The error: &lt;/EM&gt;&lt;STRONG style="color: #666666; font-size: 10.5pt;"&gt;AttributeError: 'module' object has no attribute 'create_default_context' &lt;/STRONG&gt;&lt;/P&gt;&lt;EM style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;EM style="font-size: 11.0pt;"&gt;usually happens when the python version is not 2.7.9 or up, so I will recommend you to upgrade your python to 2.7.9 or up.&lt;/EM&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;PRE style="background: white;"&gt;&lt;EM style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&amp;nbsp;&lt;SPAN style="font-size: 11.0pt;"&gt;Best Regards.&lt;/SPAN&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2017 06:57:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40976#M2802</guid>
      <dc:creator>Inbar_Moskovich</dc:creator>
      <dc:date>2017-07-25T06:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40977#M2803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The source code is now an open source on GitHub repository:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/CheckPoint-APIs-Team/cpapi-python-sdk" title="https://github.com/CheckPoint-APIs-Team/cpapi-python-sdk"&gt;GitHub - CheckPoint-APIs-Team/cpapi-python-sdk: Check Point API Python Development Kit&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Aug 2017 12:20:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40977#M2803</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2017-08-27T12:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40978#M2804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very grateful for clone script! Two observations (sorry can't update on Git right now) when using MDS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It calls this method with wrong arguments so it fails to log into CMA..&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt;def handle_local_domain(client_domain, domain, username, password, orig_host_ip, cloned_host_name, &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;cloned_host_ip&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gets called as (thus passing server IP address as username &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.checkpoint.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp; and cloned&amp;nbsp;IP is missing)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt;handle_local_domain(client_domain, domain, &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;server&lt;/STRONG&gt;&lt;/SPAN&gt;, username, password, orig_host_ip,&amp;nbsp;cloned_host_name)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly API session with default 10min timer was not sufficient, so I had to add keepalive in CMA loop&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; for domain in domains.data:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;log("\n\tChecking on Local Domain {}".format(domain["name"]))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;handle_local_domain(client_domain, domain, username, password, orig_host_ip,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;cloned_host_name, &lt;SPAN&gt;cloned_host_ip&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;client.api_call("keepalive", {}, login_res.data["sid"])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;I haven't had time to fix these yet as script seems to complete OK and correct updates are made&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; File "clone_host.py", line 794, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; main(sys.argv[1:])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; File "clone_host.py", line 787, in main&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; client_domain.save_debug_data()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; File "/home/kasparsz/cp_mgmt_api_python_sdk-master/cp_mgmt_api_python_sdk-master/lib/mgmt_api.py", line 128, in save_debug_data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; out_file.write(json.dumps(self.api_calls, indent=4, sort_keys=True))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; File "/opt/CPsuite-R80/fw1/Python/lib/python2.7/json/__init__.py", line 251, in dumps&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; sort_keys=sort_keys, **kw).encode(obj)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; File "/opt/CPsuite-R80/fw1/Python/lib/python2.7/json/encoder.py", line 209, in encode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt; chunks = list(chunks)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt;MemoryError&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 14:04:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40978#M2804</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2018-10-24T14:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40979#M2805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your comment, @yaelg from my team will look into it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2018 06:45:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40979#M2805</guid>
      <dc:creator>Amiad_Stern</dc:creator>
      <dc:date>2018-11-02T06:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40980#M2806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m glad to inform that our &lt;A href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk"&gt;Python SDK&lt;/A&gt; was updated and is now Python2 and Python3 compatible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2018 21:12:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40980#M2806</guid>
      <dc:creator>Amiad_Stern</dc:creator>
      <dc:date>2018-11-20T21:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40981#M2807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have Python 3.4.3 and I am&amp;nbsp;unable to use the scripts as I get error at the login stage ...&lt;/P&gt;&lt;P&gt;[user1@serv1 python]$ python3 clone_host.py&lt;BR /&gt;Enter server IP address or hostname: 10.95.195.105&lt;BR /&gt;Enter username: admin&lt;BR /&gt;Enter password:&lt;BR /&gt;Enter host IP address: 10.0.0.1&lt;BR /&gt;Enter new host name: HostA&lt;BR /&gt;Enter new host server IP :10.0.0.2&lt;BR /&gt;Enter global domain name in case of MDS server: [In order to use the default value ('Global') or in case of CMA hit 'Enter']&lt;BR /&gt;Enter 'True' if you want the script to do assign of the global domain [In order to use the default value ('False') hit 'Enter']&lt;/P&gt;&lt;P&gt;Checking the fingerprint for server 10.45.195.105...&lt;/P&gt;&lt;P&gt;Logging in to server 10.45.195.105...&lt;BR /&gt;Login failed:&lt;BR /&gt;the JSON object must be str, not 'bytes'&lt;/P&gt;&lt;P&gt;Saving data to debug file api_calls.json&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2019 11:27:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40981#M2807</guid>
      <dc:creator>Ash_Sidhu</dc:creator>
      <dc:date>2019-02-21T11:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40982#M2808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashu,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your feedback, I'm using v3.7.1 and i just checked it and it works for me. I will ask someone from my team to check it tomorrow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amiad.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2019 20:59:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/40982#M2808</guid>
      <dc:creator>Amiad_Stern</dc:creator>
      <dc:date>2019-02-27T20:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/49618#M3246</link>
      <description>Hi Ash, wanted to inform you the issue was fixed in our SDK. See this commit &lt;A href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/pull/14" target="_blank"&gt;https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/pull/14&lt;/A&gt;</description>
      <pubDate>Tue, 02 Apr 2019 19:34:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/49618#M3246</guid>
      <dc:creator>Amiad_Stern</dc:creator>
      <dc:date>2019-04-02T19:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Python library for using R80 management server APIs</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/66431#M4067</link>
      <description>&lt;P&gt;hello , i do all the step, but when i run the script i get this error :&lt;/P&gt;&lt;P&gt;Login failed: APIResponse received a response which is not a valid JSON.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Do you know what is wrong ?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 21:39:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-library-for-using-R80-management-server-APIs/m-p/66431#M4067</guid>
      <dc:creator>netanel1431</dc:creator>
      <dc:date>2019-11-02T21:39:20Z</dc:date>
    </item>
  </channel>
</rss>

