<?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: How to list and export the objects member from the network group in checkpoint management server in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/128823#M6219</link>
    <description>&lt;P&gt;Sure, it's possible, but you're getting into scripting territory.&lt;/P&gt;
&lt;P class="p1 lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;mgmt_cli -r true login &amp;gt; sid.txt;&lt;BR /&gt;mgmt_cli -s sid.txt --format json show-groups | jq -r '.objects[] | .name' | while read X; do&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; &amp;nbsp; echo $X&lt;BR /&gt;&amp;nbsp; &amp;nbsp; mgmt_cli -s sid.txt show-group name "$X" --format json | jq '.members[] | [.name, ."ipv4-address",.subnet4,."mask-length4"] |@csv' -r&lt;BR /&gt;&amp;nbsp; &amp;nbsp; echo&lt;BR /&gt;done&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;Just to explain what's going on here:&lt;/P&gt;
&lt;UL&gt;
&lt;LI class="p1"&gt;We're logging into the API once and saving the session in sid.txt, which we reuse in other commands.&lt;/LI&gt;
&lt;LI class="p1"&gt;We're querying the API to get all the groups, then showing each one with some specific information (object name, ipv4-address for host objects, network and mask for network objects)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Limitations of the above:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If IPv6 is in use, you will have to adjust the jq command accordingly to output the specific fields you want.&lt;/LI&gt;
&lt;LI&gt;For large numbers of groups or objects in a group, you will have to make multiple calls using limit/offset calls.&lt;/LI&gt;
&lt;LI&gt;This does not handle nested groups (groups inside of groups), which will require additional scripting.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Sep 2021 23:35:48 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2021-09-06T23:35:48Z</dc:date>
    <item>
      <title>How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76422#M4445</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We need to list all the objects members along with the name and IP-Address from the particular network group to the CSV format. The checkpoint management server is in R80.20 version. Is there any way from commandline or others to exports the object members along with the name and ip address from the particular network group in csv format.&lt;/P&gt;&lt;P&gt;Please help if there is any solution.&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:solution.@phoneboy" target="_blank"&gt;@phoneboy&lt;/A&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;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 06:48:19 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76422#M4445</guid>
      <dc:creator>Rabindra_Khadka</dc:creator>
      <dc:date>2020-02-26T06:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76426#M4446</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i am not Phoneboy but nevertheless i take the liberty to answer &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'd suggest to have a look at the &lt;A href="https://github.com/mybasementcloud/R8x-export-import-api-scripts" target="_blank" rel="noopener"&gt;R8x-export-import-api-scripts&lt;/A&gt; on GitHub.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Vincent&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 07:27:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76426#M4446</guid>
      <dc:creator>Vincent_Bacher</dc:creator>
      <dc:date>2020-02-26T07:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76440#M4448</link>
      <description>&lt;P&gt;thanks vincent,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but is there documents or process to follow to run this script&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 09:27:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76440#M4448</guid>
      <dc:creator>Rabindra_Khadka</dc:creator>
      <dc:date>2020-02-26T09:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76446#M4449</link>
      <description>&lt;DIV class=""&gt;
&lt;P&gt;Consider using JSON over CSV format for exporting group contents that can be nested &lt;EM&gt;(groups within groups)&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;Use the following command on expert mode of your SmartCenter Server to export the first 500 members of a group object:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;mgmt_cli login -r true show group name [GROUP] –format json details-level full offset 0 limit 500 –port 443&lt;/LI-CODE&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Feb 2020 10:52:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76446#M4449</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2020-02-26T10:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76484#M4452</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;Danny&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me try this one. i will update you regarding this.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 15:35:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76484#M4452</guid>
      <dc:creator>Rabindra_Khadka</dc:creator>
      <dc:date>2020-02-26T15:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76503#M4453</link>
      <description>&lt;P&gt;With the correct command, it's not difficult to get CSV output:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;mgmt_cli -r true show-group name "groupname" --format json | jq '.members[] | [.name, ."ipv4-address"] |@csv' -r&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Just to explain:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;mgmt_cli -r true&lt;/STRONG&gt; is how you can utilize the API from a CLI (-r true means "login as root user" which only works on the local management server)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;show-group&lt;/STRONG&gt; is the API command for showing a specific group specified by the name parameter.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;--format json&lt;/STRONG&gt;&amp;nbsp;tells mgmt_cli to output the data in JSON format.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;jq&lt;/STRONG&gt; parses the JSON output from mgmt_cli, in this case pulling out the all the "name" and "ipv4-address" entries from members and outputting to CSV.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 26 Feb 2020 21:51:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76503#M4453</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-02-26T21:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76515#M4458</link>
      <description>&lt;P&gt;Thanks Phoneboy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is what i am looking for&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 06:00:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/76515#M4458</guid>
      <dc:creator>Rabindra_Khadka</dc:creator>
      <dc:date>2020-02-27T06:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/86731#M4908</link>
      <description>&lt;P&gt;Hi i have been testing this and all looks really good. However what does the&amp;nbsp;@csv command do at the end&lt;/P&gt;&lt;P&gt;i.e.&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;mgmt_cli -r true show-group name "groupname" --format json | jq '.members[] | [.name, ."ipv4-address"] |@csv' -r&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I was expecting a csv file to be created but i cant find it&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 15:29:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/86731#M4908</guid>
      <dc:creator>Darren_Fishwick</dc:creator>
      <dc:date>2020-05-29T15:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/86753#M4909</link>
      <description>Normally jq will output results in JSON format.&lt;BR /&gt;@csv will convert the output to CSV.&lt;BR /&gt;If you want it to a file, you'll have to pipe the output from the command to a file.&lt;BR /&gt;</description>
      <pubDate>Fri, 29 May 2020 19:20:19 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/86753#M4909</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-05-29T19:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/86905#M4913</link>
      <description>Thank you for the update&lt;BR /&gt;Regards</description>
      <pubDate>Mon, 01 Jun 2020 07:06:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/86905#M4913</guid>
      <dc:creator>Darren_Fishwick</dc:creator>
      <dc:date>2020-06-01T07:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/102548#M5329</link>
      <description>&lt;P&gt;Hi, I'm new to checkpoint this week and have some issues with the R80.30 platform. I have a need to extract the members ( hostname and ipv4) details from certain groups ( some seem to have more than a couple of hundred entries) from specific groups.&amp;nbsp; I have navigated to the respective Group and indeed a .csv is produced. The only issue is that the .csv output only contains (from memory) the last modified date with the respective user name of who made the last change.&amp;nbsp; I now need a method to extract the members and have found this article. Now I have no test env to test your suggested commands. Can you confirm that these are non intrusive to any normal operations and will give me the correct outputs.&lt;/P&gt;&lt;P&gt;Is this command executable from the "admin" account ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Phoneboy,&lt;/P&gt;&lt;P&gt;I'm making some further extractions from the Db from the specific Network Group called "GP_WinUpdates_Exceptions".&lt;/P&gt;&lt;P&gt;I run the following and get the output shown:-&lt;/P&gt;&lt;P&gt;"mgmt_cli -r true show-group name "GP_WinUpdates_Exceptions" offset 500 --format json | jq '.members[] | [.name, ."ipv4-address"] |@csv' -r&lt;/P&gt;&lt;P&gt;I get the following error: can you please advise on what may be the issue please?&lt;/P&gt;&lt;P&gt;"jq: error: Cannot iterate over null"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 09:39:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/102548#M5329</guid>
      <dc:creator>JED</dc:creator>
      <dc:date>2021-02-24T09:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/102549#M5330</link>
      <description>&lt;P&gt;These are read-only commands and shouldn't cause any issues.&lt;BR /&gt;That said, if you want to try and rehearse this in an entirely test environment, you can do this and more using the Automation and Orchestration lab in &lt;A href="https://community.checkpoint.com/t5/CheckMates-Labs/ct-p/checkmates-labs" target="_self"&gt;CheckMates Labs&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;One caveat: if a group has too many items in it, you may have to execute the command multiple times with different offset values.&lt;BR /&gt;If I recall correctly, the limit is 500 items, so to get the next 500 items, you'd do:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;mgmt_cli -r true show-group name "groupname" offset 500 --format json | jq '.members[] | [.name, ."ipv4-address"] |@csv' -r&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 21:39:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/102549#M5330</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-11-18T21:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/103970#M5364</link>
      <description>&lt;P&gt;Hi PhoneBoy, The above worked great , I have a further request now which I have tried but had no success with.&amp;nbsp; I need to list the Object Group and as the contained output need the results for the Service Port/ Socket id.&amp;nbsp; Can you please advise on the string that I would need to extract this data. ( We have recently upgraded to R80.40 but again the CSV export from GUI seems not to be working)&amp;nbsp; Your assistance is greatly appreciated.&amp;nbsp; Thanks JED.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 09:19:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/103970#M5364</guid>
      <dc:creator>JED</dc:creator>
      <dc:date>2020-12-02T09:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/104040#M5365</link>
      <description>&lt;P&gt;The above is for network object groups.&lt;BR /&gt;Service groups are a different type, but a similar type of command is used:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;mgmt_cli -r true show-service-group name "NBT" --format json | jq '.members[] | [.name, .type, .port] | @csv' -r&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 17:50:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/104040#M5365</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-12-02T17:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/110481#M5574</link>
      <description>&lt;P&gt;Is it the same for R80.10, because I can't find the CCV file. Could you please help me ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 18:11:56 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/110481#M5574</guid>
      <dc:creator>eliascoranti</dc:creator>
      <dc:date>2021-02-10T18:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/110633#M5575</link>
      <description>&lt;P&gt;am getting below error while phrasing above command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Expert@FX:0]# mgmt_cli -r true show-group name "EXT-MOVEiT" --format json | jq '.members[] | [.name, ."ipv4-address"] |@csv' -r &amp;gt;EXT_MOVEiT.json&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Logout failed&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;parse error: Invalid numeric literal at line 1, column 9&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;API Settings:&lt;BR /&gt;---------------------&lt;BR /&gt;Accessibility: Require all granted&lt;BR /&gt;Automatic Start: Enabled&lt;/P&gt;&lt;P&gt;Processes:&lt;/P&gt;&lt;P&gt;Name State PID More Information&lt;BR /&gt;-------------------------------------------------&lt;BR /&gt;API Started 31143&lt;BR /&gt;CPM Started 16920 Check Point Security Management Server is running and ready&lt;BR /&gt;FWM Started 18638&lt;BR /&gt;APACHE Started 3908&lt;/P&gt;&lt;P&gt;Port Details:&lt;BR /&gt;-------------------&lt;BR /&gt;JETTY Internal Port: 50277&lt;BR /&gt;APACHE Gaia Port: 4434 (a non-default port)&lt;BR /&gt;When running mgmt_cli commands add '--port 4434'&lt;BR /&gt;When using web-services, add port 4434 to the URL&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;Overall API Status: Started&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 11:03:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/110633#M5575</guid>
      <dc:creator>Sec_Boy</dc:creator>
      <dc:date>2021-02-12T11:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/110634#M5576</link>
      <description>&lt;P&gt;am getting below error while phrasing above command.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;parse error: Invalid numeric literal at line 1, column 9&lt;BR /&gt;Logout failed&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 11:04:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/110634#M5576</guid>
      <dc:creator>Sec_Boy</dc:creator>
      <dc:date>2021-02-12T11:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/115086#M5746</link>
      <description>&lt;P&gt;Thank you for this.&lt;/P&gt;&lt;P&gt;An additional question if I may...&lt;/P&gt;&lt;P&gt;Is it possible to recursively do this for all the network groups where I have a large number of network groups set up?&lt;/P&gt;&lt;P&gt;Or alternatively to extract all the network group names passing them on to this command to extract for each network group?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 07:40:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/115086#M5746</guid>
      <dc:creator>Kola_CP</dc:creator>
      <dc:date>2021-04-01T07:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/128619#M6212</link>
      <description>&lt;P&gt;I need to to the same, where you able to export all your groups?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 09:21:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/128619#M6212</guid>
      <dc:creator>Jan_Z</dc:creator>
      <dc:date>2021-09-02T09:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to list and export the objects member from the network group in checkpoint management server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/128823#M6219</link>
      <description>&lt;P&gt;Sure, it's possible, but you're getting into scripting territory.&lt;/P&gt;
&lt;P class="p1 lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;mgmt_cli -r true login &amp;gt; sid.txt;&lt;BR /&gt;mgmt_cli -s sid.txt --format json show-groups | jq -r '.objects[] | .name' | while read X; do&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; &amp;nbsp; echo $X&lt;BR /&gt;&amp;nbsp; &amp;nbsp; mgmt_cli -s sid.txt show-group name "$X" --format json | jq '.members[] | [.name, ."ipv4-address",.subnet4,."mask-length4"] |@csv' -r&lt;BR /&gt;&amp;nbsp; &amp;nbsp; echo&lt;BR /&gt;done&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;Just to explain what's going on here:&lt;/P&gt;
&lt;UL&gt;
&lt;LI class="p1"&gt;We're logging into the API once and saving the session in sid.txt, which we reuse in other commands.&lt;/LI&gt;
&lt;LI class="p1"&gt;We're querying the API to get all the groups, then showing each one with some specific information (object name, ipv4-address for host objects, network and mask for network objects)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Limitations of the above:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If IPv6 is in use, you will have to adjust the jq command accordingly to output the specific fields you want.&lt;/LI&gt;
&lt;LI&gt;For large numbers of groups or objects in a group, you will have to make multiple calls using limit/offset calls.&lt;/LI&gt;
&lt;LI&gt;This does not handle nested groups (groups inside of groups), which will require additional scripting.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 23:35:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/128823#M6219</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-09-06T23:35:48Z</dc:date>
    </item>
  </channel>
</rss>

