<?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: mgmt_cli in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186977#M7888</link>
    <description>&lt;P&gt;yes but how do i import all of the list?&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 07:33:29 GMT</pubDate>
    <dc:creator>dotank2</dc:creator>
    <dc:date>2023-07-20T07:33:29Z</dc:date>
    <item>
      <title>mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186661#M7866</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hi trying to create very simple script.&lt;/P&gt;&lt;P&gt;im using command line from the smart console. i create a group&amp;nbsp; and i want to add all geo policy countries i have.&lt;/P&gt;&lt;P&gt;i create a group using set group name "Geo-Block"&lt;/P&gt;&lt;P&gt;and now i want to add countries.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i do: set group name "Geo-Block" members.add "countrie1" members.add "countries2" and its not working&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;the error is:&lt;/P&gt;&lt;P&gt;code:"generic_err_object_not_found"&lt;/P&gt;&lt;P&gt;message: "Requested object [countrie1] not found"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 08:00:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186661#M7866</guid>
      <dc:creator>dotank2</dc:creator>
      <dc:date>2023-07-18T08:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186663#M7867</link>
      <description>&lt;P&gt;What is the version you are using? Are you trying to add to the older Geo Policy or to the Access Control Rulebase?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For adding to the Rulebase which is the recommended way you first need to import the relevant Updatable Object:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-updatable-object~v1.9%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-updatable-object~v1.9%20&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 08:21:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186663#M7867</guid>
      <dc:creator>Tal_Paz-Fridman</dc:creator>
      <dc:date>2023-07-18T08:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186673#M7868</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;im use management version r81.10.&lt;/P&gt;&lt;P&gt;i have geo policy in the shared policy. and i want to create rule in the access rule with all the&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;countries that i want to block.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so i create a group, and&amp;nbsp; I can't add country objects to the group.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and the command&amp;nbsp; "show updatable-objects-repository-content" not give me the parameter of uri.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 09:13:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186673#M7868</guid>
      <dc:creator>dotank2</dc:creator>
      <dc:date>2023-07-18T09:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186676#M7869</link>
      <description>&lt;P&gt;And something strange happens, when I blocked for example Israel it worked.&lt;BR /&gt;Me trying to block Albania doesn't work&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;this is work:&lt;/STRONG&gt; set group name "Geo-Block" members.add "israel"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;this is now working&lt;/STRONG&gt;:&amp;nbsp;set group name "Geo-Block" members.add "albnia"&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 09:20:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186676#M7869</guid>
      <dc:creator>dotank2</dc:creator>
      <dc:date>2023-07-18T09:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186693#M7870</link>
      <description>&lt;P&gt;In the command, you mispelled Albania...it shows albnia&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 12:51:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186693#M7870</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2023-07-18T12:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186714#M7871</link>
      <description>&lt;P&gt;Another important note. This syntax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mgmt_cli ... members.add "country1" members.add "country2"&lt;/LI-CODE&gt;
&lt;P&gt;won't actually work. You need to specify it like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mgmt_cli ... members.add.1 "country1" members.add.2 "country2"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 15:15:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186714#M7871</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2023-07-18T15:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186718#M7872</link>
      <description>&lt;P&gt;Thats it, just verified!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 15:49:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186718#M7872</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2023-07-18T15:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186792#M7873</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;thank you for your response.&lt;/P&gt;&lt;P&gt;i do the command:&lt;/P&gt;&lt;P&gt;set group name "Geo-Block" members.add.1 "Albania" members.add.2 "Algeria"&lt;/P&gt;&lt;P&gt;and the error is same:&lt;/P&gt;&lt;P&gt;code: "generic_err_object_not_found"&lt;BR /&gt;message: "Requested object [Albania1] not found"&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 05:32:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186792#M7873</guid>
      <dc:creator>dotank2</dc:creator>
      <dc:date>2023-07-19T05:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186795#M7874</link>
      <description>&lt;P&gt;also i do ssh to the managment.&lt;/P&gt;&lt;P&gt;and same command i get an error:&lt;/P&gt;&lt;P&gt;"Authentication to server failed."&lt;/P&gt;&lt;P&gt;but the username is correct and i have permission "GAIA api"&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 05:43:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186795#M7874</guid>
      <dc:creator>dotank2</dc:creator>
      <dc:date>2023-07-19T05:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186798#M7875</link>
      <description>&lt;P&gt;Can you break down the chnage into adding 1 country per line? That is how I would do it anyway as I can then loop over a list. Be it 1 or 10 or 100 countries it will be the same code.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 06:16:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186798#M7875</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2023-07-19T06:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186799#M7876</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;i try it, also don't works&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 06:43:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186799#M7876</guid>
      <dc:creator>dotank2</dc:creator>
      <dc:date>2023-07-19T06:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186813#M7877</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;updating&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script works only on objects built in the system.&lt;/P&gt;&lt;P&gt;The problem is that it is an updateable object, for example countries.&lt;/P&gt;&lt;P&gt;That is, I do the command:&lt;BR /&gt;mgmt_cli set group name "Geo-Block" members.add.1 "host1" members.add.2 "host2" &amp;gt; working&lt;/P&gt;&lt;P&gt;And I do the command:&lt;BR /&gt;mgmt_cli set group name "Geo-Block" members.add.1 "Togo" members.add.2 "Tunisia" &amp;gt; not working&lt;/P&gt;&lt;P&gt;And I get a message that it can't find the object.&lt;/P&gt;&lt;P&gt;Now the strange thing is, I do the command:&lt;BR /&gt;set group name "Geo-Block" members.add "israel" it works (only on Israel, when I change the country for example Togo, it doesn't work)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 09:29:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186813#M7877</guid>
      <dc:creator>dotank2</dc:creator>
      <dc:date>2023-07-19T09:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186815#M7878</link>
      <description>&lt;P&gt;Did you import the relevant Updatable Object into the database?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-updatable-object~v1.9%20" target="_blank" rel="noopener noreferrer"&gt;https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-updatable-object~v1.9%20&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 09:56:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186815#M7878</guid>
      <dc:creator>Tal_Paz-Fridman</dc:creator>
      <dc:date>2023-07-19T09:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186820#M7879</link>
      <description>&lt;P&gt;I just tested on R81.20 mgmt server and it failed as well...weird&lt;/P&gt;
&lt;P&gt;[Expert@QUANTUM-MANAGEMENT:0]# mgmt_cli set group name "geo-block-test" members.add "albania"&lt;BR /&gt;Username: admin&lt;BR /&gt;Password:&lt;BR /&gt;code: "generic_err_object_not_found"&lt;BR /&gt;message: "Requested object [geo-block-test] not found"&lt;/P&gt;
&lt;P&gt;Executed command failed. Changes are discarded.&lt;BR /&gt;[Expert@QUANTUM-MANAGEMENT:0]#&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 11:51:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186820#M7879</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2023-07-19T11:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186822#M7880</link>
      <description>&lt;P&gt;You need to fetch the category first. Did you?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 12:06:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186822#M7880</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2023-07-19T12:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186823#M7881</link>
      <description>&lt;P&gt;Hey Val,&lt;/P&gt;
&lt;P&gt;Can you clarify what you are referring to exactly?&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 12:07:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186823#M7881</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2023-07-19T12:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186853#M7882</link>
      <description>&lt;H3 class="description"&gt;Description&lt;/H3&gt;
&lt;P&gt;&lt;SPAN class="description" data-description-path="add-updatable-object"&gt;Import an updatable object from the repository to the management server. This operation takes effect immediately and doesn't require publishing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="description" data-description-path="add-updatable-object"&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-updatable-object~v1.9%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-updatable-object~v1.9%20&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 14:24:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186853#M7882</guid>
      <dc:creator>Tal_Paz-Fridman</dc:creator>
      <dc:date>2023-07-19T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186861#M7883</link>
      <description>&lt;P&gt;That message is saying the group you're trying to add the member to doesn't exist. 'set' won't create a group.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 14:55:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186861#M7883</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2023-07-19T14:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186863#M7884</link>
      <description>&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/27871"&gt;@Bob_Zimmerman&lt;/a&gt;&amp;nbsp;...layer 8 problem Homer Simpson moment...DUH lol&lt;/P&gt;
&lt;P&gt;Anyway, command&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/85364"&gt;@dotank2&lt;/a&gt;&amp;nbsp;gave did actually work now&lt;/P&gt;
&lt;P&gt;[Expert@QUANTUM-MANAGEMENT:0]# mgmt_cli set group name "geo-group-test" members.add.1 "Togo" members.add.2 "Tunisia"&lt;BR /&gt;Username: admin&lt;BR /&gt;Password:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;Time: [10:59:37] 19/7/2023&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;"Publish operation" succeeded (100%)&lt;BR /&gt;[Expert@QUANTUM-MANAGEMENT:0]#&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 15:00:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186863#M7884</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2023-07-19T15:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186865#M7885</link>
      <description>&lt;P&gt;That error indicates the command you actually ran was slightly different. Something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;set group name "Geo-Block" members.add.1 "Albania1"&lt;/LI-CODE&gt;
&lt;P&gt;After running this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@DallasSA]# mgmt_cli -f json -r true update-updatable-objects-repository-content
...
[Expert@DallasSA]# mgmt_cli -f json -r true show updatable-objects-repository-content details-level full limit 500 offset 0 | jq -c '.objects[]|.' &amp;gt;&amp;gt; updatable.json
[Expert@DallasSA]# mgmt_cli -f json -r true show updatable-objects-repository-content details-level full limit 500 offset 500 | jq -c '.objects[]|.' &amp;gt;&amp;gt; updatable.json
[Expert@DallasSA]# mgmt_cli -f json -r true show updatable-objects-repository-content details-level full limit 500 offset 1000 | jq -c '.objects[]|.' &amp;gt;&amp;gt; updatable.json
[Expert@DallasSA]# mgmt_cli -f json -r true show updatable-objects-repository-content details-level full limit 500 offset 1500 | jq -c '.objects[]|.' &amp;gt;&amp;gt; updatable.json
[Expert@DallasSA]# mgmt_cli -f json -r true show updatable-objects-repository-content details-level full limit 500 offset 2000 | jq -c '.objects[]|.' &amp;gt;&amp;gt; updatable.json
[Expert@DallasSA]# mgmt_cli -f json -r true show updatable-objects-repository-content details-level full limit 500 offset 2500 | jq -c '.objects[]|.' &amp;gt;&amp;gt; updatable.json
[Expert@DallasSA]# mgmt_cli -f json -r true show updatable-objects-repository-content details-level full limit 500 offset 3000 | jq -c '.objects[]|.' &amp;gt;&amp;gt; updatable.json
[Expert@DallasSA]# mgmt_cli -f json -r true show updatable-objects-repository-content details-level full limit 500 offset 3500 | jq -c '.objects[]|.' &amp;gt;&amp;gt; updatable.json
[Expert@DallasSA]# mgmt_cli -f json -r true show updatable-objects-repository-content details-level full limit 500 offset 4000 | jq -c '.objects[]|.' &amp;gt;&amp;gt; updatable.json
[Expert@DallasSA]# wc -l updatable.json 
4249 updatable.json
[Expert@DallasSA]# grep "GEO Locations" updatable.json | jq '."name-in-updatable-objects-repository"' | sort
"Afghanistan"
"Africa"
"Aland Islands"
"Albania"
"Algeria"
"American Samoa"
"Andorra"
"Angola"
"Anguilla"
"Antarctica Other"
"Antarctica"
...&lt;/LI-CODE&gt;
&lt;P&gt;you can see all of the country object names. Each country object must be imported via '&lt;SPAN&gt;mgmt_cli ... add updatable-object uid-in-updatable-objects-repository &amp;lt;UUID&amp;gt;' before you can actually use it. Once imported, the names will be as above.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 15:15:19 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli/m-p/186865#M7885</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2023-07-19T15:15:19Z</dc:date>
    </item>
  </channel>
</rss>

