<?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: Script in creating object and add in a object group using CLI in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/69287#M4156</link>
    <description>&lt;LI-CODE lang="markup"&gt;mgmt add group name "group_name"

mgmt add host name "host_name_1" ip-address "x.x.x.1" groups.1 "group_name"
mgmt add host name "host_name_2" ip-address "x.x.x.2" groups.1 "group_name"&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 04 Dec 2019 11:23:06 GMT</pubDate>
    <dc:creator>Danny</dc:creator>
    <dc:date>2019-12-04T11:23:06Z</dc:date>
    <item>
      <title>Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/69243#M4154</link>
      <description>&lt;P&gt;What is the command line script&amp;nbsp;to create object/object group and add object in an object group. Like hundred of objects (IPs).&lt;/P&gt;&lt;P&gt;I am using Checkpoint R80.10.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 02:34:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/69243#M4154</guid>
      <dc:creator>Achilles_Tagg</dc:creator>
      <dc:date>2019-12-04T02:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/69279#M4155</link>
      <description>&lt;P&gt;There is no such CLI script - you have to write your own using CP commands from GAiA clish or the Management API.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 10:06:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/69279#M4155</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2019-12-04T10:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/69287#M4156</link>
      <description>&lt;LI-CODE lang="markup"&gt;mgmt add group name "group_name"

mgmt add host name "host_name_1" ip-address "x.x.x.1" groups.1 "group_name"
mgmt add host name "host_name_2" ip-address "x.x.x.2" groups.1 "group_name"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 04 Dec 2019 11:23:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/69287#M4156</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2019-12-04T11:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/69499#M4157</link>
      <description>&lt;P&gt;Thanks! Tested okay.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 07:21:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/69499#M4157</guid>
      <dc:creator>Achilles_Tagg</dc:creator>
      <dc:date>2019-12-06T07:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/127832#M6170</link>
      <description>&lt;P&gt;I need to add 100 new IPs in to group, how can I add in single command?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 12:57:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/127832#M6170</guid>
      <dc:creator>babasahebb</dc:creator>
      <dc:date>2021-08-24T12:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/127878#M6174</link>
      <description>&lt;P&gt;With 80.10 you cannot or else just create for loop in bash. Starting Mgmt API version 1.6 (R80.40) you can use API call&amp;nbsp;&lt;EM&gt;add objects-batch&lt;/EM&gt; do what you want.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Arturas Zalenekas&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 15:48:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/127878#M6174</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2021-08-24T15:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/127968#M6179</link>
      <description>&lt;P&gt;Can you please give full syntex of this command-&amp;nbsp;&lt;EM&gt;add objects-batch&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp; ( i have 100 ips in .csv file and need to add in group)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 12:38:08 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/127968#M6179</guid>
      <dc:creator>babasahebb</dc:creator>
      <dc:date>2021-08-25T12:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/128254#M6203</link>
      <description>&lt;P&gt;I am using R80.40, so i need full command syntex to add 100 jobects in to group.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 18:00:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/128254#M6203</guid>
      <dc:creator>babasahebb</dc:creator>
      <dc:date>2021-08-27T18:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/128259#M6204</link>
      <description>&lt;LI-CODE lang="markup"&gt;# cat hosts.csv
name,ip-address,groups
test1,192.2.0.1,gtest
test2,192.2.0.2,gtest
test3,192.2.0.3,gtest&lt;/LI-CODE&gt;
&lt;P&gt;# mgmt_cli -r true add host --batch hosts.csv&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 19:05:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/128259#M6204</guid>
      <dc:creator>Art_Zalenekas</dc:creator>
      <dc:date>2021-08-27T19:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/128279#M6205</link>
      <description>&lt;P&gt;Gaia WebUi has a nice UI interface to allow adding routes in batch mode. I always missed a batch mode to add objects directly in SmartConsole. A SmartConsole Extension could solve this of course.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Aug 2021 13:46:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/128279#M6205</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2021-08-28T13:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/129651#M6248</link>
      <description>&lt;P&gt;Not working follwoing syntex in R80.40-&lt;SPAN&gt;# mgmt_cli -r true add host --batch hosts.csv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Following syntex working for creating object but if any object existing that time getting error, pls help for this.&lt;/P&gt;&lt;P&gt;mgmt_cli add host --batch filename.csv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 13:07:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/129651#M6248</guid>
      <dc:creator>babasahebb</dc:creator>
      <dc:date>2021-09-17T13:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/129658#M6249</link>
      <description>&lt;P&gt;You can use the "set-if-exists true" parameter to handle such a situation&lt;/P&gt;
&lt;P&gt;It is documented in the management API reference guide&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-host~v1.8%20" target="_blank" rel="noopener"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-host~v1.8%20&lt;/A&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditor_e1d0343dc8b9ffJim_Oqvist_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;TABLE class="table"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="param_key"&gt;&lt;SPAN class="blue"&gt;set-if-exists&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD class="param_value"&gt;boolean&lt;BR /&gt;&lt;SPAN class="grey"&gt;Default:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="blue"&gt;false&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD class="param_description"&gt;&lt;SPAN class="description to_check_for_rewrite"&gt;If another object with the same identifier already exists, it will be updated. The command behaviour will be the same as if originally a set command was called. Pay attention that original object's fields will be overwritten by the fields provided in the request payload!&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;DIV id="tinyMceEditor_e1d0343dc8b9ffJim_Oqvist_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind Regards&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 14:06:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/129658#M6249</guid>
      <dc:creator>Jim_Oqvist</dc:creator>
      <dc:date>2021-09-17T14:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/191163#M7962</link>
      <description>&lt;P&gt;Danny, I have to add over 200 IPs to an object group, but when I log into the MDS to run the commands mentioned above but get this error (see below) when trying to add an object group. I am&amp;nbsp;Running&amp;nbsp; R81.10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;Error:&lt;BR /&gt;MGMTXXX You are not logged in to management server, in order to log-in you will need to run "mgmt login user [user name]"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 20:57:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/191163#M7962</guid>
      <dc:creator>Etheldra_Freder</dc:creator>
      <dc:date>2023-08-30T20:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Script in creating object and add in a object group using CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/191176#M7963</link>
      <description>&lt;P&gt;The error message is telling you how to resolve this issue: log into the management server using the specified command.&lt;BR /&gt;Note that this is required for any use of the API (including via mgmt and mgmt_cli).&lt;BR /&gt;Also note that changes must be published or they will not take effect:&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#clish/publish~v1.9%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#clish/publish~v1.9%20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 01:46:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-in-creating-object-and-add-in-a-object-group-using-CLI/m-p/191176#M7963</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-08-31T01:46:31Z</dc:date>
    </item>
  </channel>
</rss>

