<?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: Problem to publish objects created with API in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93784#M5086</link>
    <description>&lt;P&gt;This will happen if you call publish without specifying the UUID of the session you want to publish (such as in your 'mgmt_cli publish' call in the screenshot). On the CLI of the management, try 'mgmt_cli -r true show sessions details-level full --format json'. I bet you will see a session for your user with changes.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Aug 2020 17:26:53 GMT</pubDate>
    <dc:creator>Bob_Zimmerman</dc:creator>
    <dc:date>2020-08-10T17:26:53Z</dc:date>
    <item>
      <title>Problem to publish objects created with API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93761#M5082</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I´m using Postman and mgmt_cli to create host objects but I get the same result. All is running successfully but although I send the POST publish or mgmt_cli command, I don´t get the host object in object list from SmartConsole 80.30.&lt;/P&gt;&lt;P&gt;SmartConsole 993000076 R80.30&lt;/P&gt;&lt;P&gt;API-Version: 1.5&lt;/P&gt;&lt;P&gt;I don´t get any error when login &amp;gt; create host &amp;gt; publish.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="login_postman_ok.png" style="width: 209px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7558i8CE0F19A7F6B3294/image-dimensions/209x308?v=v2" width="209" height="308" role="button" title="login_postman_ok.png" alt="login_postman_ok.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="mgmt_cli_ok.png" style="width: 333px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7556i18EAE6B719FAFA4F/image-dimensions/333x243?v=v2" width="333" height="243" role="button" title="mgmt_cli_ok.png" alt="mgmt_cli_ok.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="publish_postman_ok.png" style="width: 248px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7559i4F34C818EB6E42EA/image-dimensions/248x295?v=v2" width="248" height="295" role="button" title="publish_postman_ok.png" alt="publish_postman_ok.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="add-host_postman_ok.png" style="width: 306px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7557i1757E5E306AB0C9C/image-dimensions/306x297?v=v2" width="306" height="297" role="button" title="add-host_postman_ok.png" alt="add-host_postman_ok.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try to create the object again, I get an error because of it's a duplicated object.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="duplicated_host_postman_error.PNG" style="width: 400px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7560i7DB8EA87724ECE88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="duplicated_host_postman_error.PNG" alt="duplicated_host_postman_error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any Idea what's happening here?&lt;/P&gt;&lt;P&gt;Thanks in advances!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 12:40:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93761#M5082</guid>
      <dc:creator>Javier002</dc:creator>
      <dc:date>2020-08-10T12:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to publish objects created with API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93762#M5083</link>
      <description>&lt;P&gt;It looks like you have created it once but did not publish. Trying to create another object with the same name will then fail. Look at your unpublished sessions in SmartConsole and discard.&lt;/P&gt;
&lt;P&gt;If an object already exists and is available for editing (session was published), use "modify" instead of "add"&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 13:24:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93762#M5083</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2020-08-10T13:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to publish objects created with API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93769#M5084</link>
      <description>&lt;P&gt;I have not session without apply. Session bar is empty of yellow signals and Publish is shown greyed.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sessionBar.PNG" style="width: 307px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7561iC9E6D490EF69A2D8/image-dimensions/307x46?v=v2" width="307" height="46" role="button" title="sessionBar.PNG" alt="sessionBar.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have nothing pending to publish according to Check Point Lab:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sessionActiviy.PNG" style="width: 400px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7562iB8C5C714D116BB54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sessionActiviy.PNG" alt="sessionActiviy.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It's a Mutli-Domain environment...&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 14:15:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93769#M5084</guid>
      <dc:creator>Javier002</dc:creator>
      <dc:date>2020-08-10T14:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to publish objects created with API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93774#M5085</link>
      <description>&lt;P&gt;[UPDATE]&lt;/P&gt;&lt;P&gt;If I run the same commands using &lt;STRONG&gt;mgmt_cli&lt;/STRONG&gt; the Host is created.&lt;/P&gt;&lt;P&gt;mgmt_cli login -r true domain "domain" &amp;gt; domain-id-$$.txt&lt;BR /&gt;mgmt_cli add host name "HostFromMgmtCli" ip-address "192.0.2.5" color "blue" -s domain-id-69936.txt --format json&lt;BR /&gt;mgmt_cli publish -s domain-id-69936.txt --format json&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BlueHost.PNG" style="width: 400px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7563i2BA658253B6927A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BlueHost.PNG" alt="BlueHost.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seems that only works when running at localhost...I'm using Postman with Collection Web API (version 1.5) and a python script using Check Point's SDK to create rules.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 14:47:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93774#M5085</guid>
      <dc:creator>Javier002</dc:creator>
      <dc:date>2020-08-10T14:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to publish objects created with API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93784#M5086</link>
      <description>&lt;P&gt;This will happen if you call publish without specifying the UUID of the session you want to publish (such as in your 'mgmt_cli publish' call in the screenshot). On the CLI of the management, try 'mgmt_cli -r true show sessions details-level full --format json'. I bet you will see a session for your user with changes.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 17:26:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93784#M5086</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2020-08-10T17:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to publish objects created with API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93794#M5087</link>
      <description>&lt;P&gt;Hi Bob,&lt;/P&gt;&lt;P&gt;I see all sessions,&amp;nbsp;both the ones that work and the ones that don't. I have compared the session created when I run mgmt_cli with other created using Postman and I´ve not seen any significant difference:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Comparing_uid_webAPI_admin.png" style="width: 633px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7565i14AA581B12287968/image-dimensions/633x434?v=v2" width="633" height="434" role="button" title="Comparing_uid_webAPI_admin.png" alt="Comparing_uid_webAPI_admin.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The right side is the output from "&lt;SPAN&gt;mgmt_cli -r true show sessions details-level full --format json" when I run login using Postman:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="session_uuid_postman.png" style="width: 622px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7566i8C8AF667D9A2325E/image-dimensions/622x499?v=v2" width="622" height="499" role="button" title="session_uuid_postman.png" alt="session_uuid_postman.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 19:25:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93794#M5087</guid>
      <dc:creator>Javier002</dc:creator>
      <dc:date>2020-08-10T19:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to publish objects created with API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93836#M5088</link>
      <description>&lt;P&gt;[SOLVED]&lt;/P&gt;&lt;P&gt;I have been using the &lt;STRONG&gt;uid&lt;/STRONG&gt; to define de parameter domain instead of use &lt;STRONG&gt;name&lt;/STRONG&gt; variable. You can have something like:&lt;/P&gt;&lt;P&gt;"domain": {&lt;BR /&gt;"uid": "0ff14a07-3f01-443b-86c6-8dc7eb1c2b3e",&lt;BR /&gt;&lt;STRONG&gt;"name": "name_CMA"&lt;/STRONG&gt;,&lt;BR /&gt;"domain-type": "domain"}&lt;/P&gt;&lt;P&gt;Although you requests to CMA´s IP address, you must to use domain parameter to login and use the name variable to avoid problems; at least that's my experience.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="domain_name_cma_works.png" style="width: 419px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/7571iC334CFBAE84AB6C5/image-dimensions/419x594?v=v2" width="419" height="594" role="button" title="domain_name_cma_works.png" alt="domain_name_cma_works.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 09:17:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Problem-to-publish-objects-created-with-API/m-p/93836#M5088</guid>
      <dc:creator>Javier002</dc:creator>
      <dc:date>2020-08-11T09:17:45Z</dc:date>
    </item>
  </channel>
</rss>

