<?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: API - Smartconsole CLi - usual script commands like error check, if then etc. in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-SmartConsole-CLI-usual-script-commands-like-error-check-if/m-p/28237#M1695</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Regarding error codes/breaks/loops etc.:&lt;/P&gt;&lt;P&gt;This has to be done by your scripting. You can't do such things inside the window provided by SmartConsole CLI. You have to use either mgmt_cli binary or REST API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Regarding access from mgmt_cli&lt;/P&gt;&lt;P&gt;The default API setting only allows access from localhost. Means through SmartConsole CLI or from the CLISH/BASH from the management server itself using mgmt/mgmt_cli command.&lt;/P&gt;&lt;P&gt;To enable access from IPs which are defined as GUI client (trusted client) or from anywhere, please refere to API documentation:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://sc1.checkpoint.com/documents/latest/APIs/index.html" title="https://sc1.checkpoint.com/documents/latest/APIs/index.html"&gt;Check Point - Management API reference&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jan 2019 16:27:38 GMT</pubDate>
    <dc:creator>Norbert_Bohusch</dc:creator>
    <dc:date>2019-01-29T16:27:38Z</dc:date>
    <item>
      <title>API - SmartConsole CLI - usual script commands like error check, if then etc.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-SmartConsole-CLI-usual-script-commands-like-error-check-if/m-p/28236#M1694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry, but the API reference does not point out how to check for error codes, breaks, doing loops etc.&lt;/P&gt;&lt;P&gt;As the CLi window allows to open a file, which implies you are able to use more then one command, my expectation would be to be able to control the flow. Found no excamples. Everything I found was shell based stuff with mgmt_cli.&lt;BR /&gt;My actual issue i.e is to install several policies one after the other. The issue is, when the script command finished, the real task has not finished yet. So you get an error only one install can run the same time.&lt;/P&gt;&lt;P&gt;But this is only one example I struggled with earlier.&lt;/P&gt;&lt;P&gt;I've tried shell commands, but the seems not to be allowed. Did I found a further limitation of the API?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2019 11:54:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-SmartConsole-CLI-usual-script-commands-like-error-check-if/m-p/28236#M1694</guid>
      <dc:creator>Andreas_Lorenze</dc:creator>
      <dc:date>2019-01-29T11:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: API - Smartconsole CLi - usual script commands like error check, if then etc.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-SmartConsole-CLI-usual-script-commands-like-error-check-if/m-p/28237#M1695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Regarding error codes/breaks/loops etc.:&lt;/P&gt;&lt;P&gt;This has to be done by your scripting. You can't do such things inside the window provided by SmartConsole CLI. You have to use either mgmt_cli binary or REST API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Regarding access from mgmt_cli&lt;/P&gt;&lt;P&gt;The default API setting only allows access from localhost. Means through SmartConsole CLI or from the CLISH/BASH from the management server itself using mgmt/mgmt_cli command.&lt;/P&gt;&lt;P&gt;To enable access from IPs which are defined as GUI client (trusted client) or from anywhere, please refere to API documentation:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://sc1.checkpoint.com/documents/latest/APIs/index.html" title="https://sc1.checkpoint.com/documents/latest/APIs/index.html"&gt;Check Point - Management API reference&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2019 16:27:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-SmartConsole-CLI-usual-script-commands-like-error-check-if/m-p/28237#M1695</guid>
      <dc:creator>Norbert_Bohusch</dc:creator>
      <dc:date>2019-01-29T16:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: API - Smartconsole CLi - usual script commands like error check, if then etc.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-SmartConsole-CLI-usual-script-commands-like-error-check-if/m-p/28238#M1696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The API (and consequentially mgmt_cli and the SmartConsole CLI) is not a scripting language.&lt;/P&gt;&lt;P&gt;It follows the principles of REST: You send it a query, it gives you a response based on that query.&lt;/P&gt;&lt;P&gt;Processing the results of the query (and deciding what to do next) is a function of the program/script you write that calls the API.&lt;/P&gt;&lt;P&gt;The SmartConsole CLI is not a general purpose scripting engine, it merely allows you to make API calls with no scripting logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 01:47:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-SmartConsole-CLI-usual-script-commands-like-error-check-if/m-p/28238#M1696</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-01-31T01:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: API - Smartconsole CLi - usual script commands like error check, if then etc.</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-SmartConsole-CLI-usual-script-commands-like-error-check-if/m-p/28239#M1697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would check out the usage examples by Python &lt;A class="link-titled" href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/tree/master/examples_python3" title="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk/tree/master/examples_python3"&gt;cp_mgmt_api_python_sdk/examples_python3 at master · CheckPointSW/cp_mgmt_api_python_sdk · GitHub&lt;/A&gt;&amp;nbsp;&amp;nbsp;or Java &lt;A class="link-titled" href="https://github.com/CheckPointSW/cp-mgmt-api-java-sdk/tree/master/samples/clone_host" title="https://github.com/CheckPointSW/cp-mgmt-api-java-sdk/tree/master/samples/clone_host"&gt;cp-mgmt-api-java-sdk/samples/clone_host at master · CheckPointSW/cp-mgmt-api-java-sdk · GitHub&lt;/A&gt;&amp;nbsp; .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 16:51:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-SmartConsole-CLI-usual-script-commands-like-error-check-if/m-p/28239#M1697</guid>
      <dc:creator>Tomer_Sole</dc:creator>
      <dc:date>2019-02-05T16:51:53Z</dc:date>
    </item>
  </channel>
</rss>

