<?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: Get all network objects from a specific group with api in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Get-all-network-objects-from-a-specific-group-with-api/m-p/146323#M6728</link>
    <description>&lt;P&gt;Yeah, objects of type network do not have an element called ipv4-address.&lt;BR /&gt;Haven't tried this, but maybe this will work:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;mgmt_cli -r true show-group name 'group name' --format json | jq '.members[] | [.name, ."ipv4-address", .subnet4, ."mask-length4" ] |&amp;nbsp;@scv' -r&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For host objects, you'll see the IPv4 address.&lt;BR /&gt;For networks, you'll get the IPv4 network and mask length.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2022 22:07:49 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2022-04-14T22:07:49Z</dc:date>
    <item>
      <title>Get all network objects from a specific group with api</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Get-all-network-objects-from-a-specific-group-with-api/m-p/146095#M6727</link>
      <description>&lt;P&gt;We tried this code&lt;/P&gt;&lt;P&gt;mgmt_cli -r true show-group name 'group name' --format json | jq '.members[] | [.name, ."ipv4-address"] |&amp;nbsp;@scv' -r&lt;/P&gt;&lt;P&gt;we have used this command to get all network object from a specific group (objects names and IP addresses) but we have &lt;SPAN&gt;encountered a problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Objects defined as networks (with a subnet mask of 255.255.255.0 or higher) do not have IP addresses assigned to them&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 13:50:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Get-all-network-objects-from-a-specific-group-with-api/m-p/146095#M6727</guid>
      <dc:creator>MichaelGur</dc:creator>
      <dc:date>2022-04-12T13:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get all network objects from a specific group with api</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Get-all-network-objects-from-a-specific-group-with-api/m-p/146323#M6728</link>
      <description>&lt;P&gt;Yeah, objects of type network do not have an element called ipv4-address.&lt;BR /&gt;Haven't tried this, but maybe this will work:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;mgmt_cli -r true show-group name 'group name' --format json | jq '.members[] | [.name, ."ipv4-address", .subnet4, ."mask-length4" ] |&amp;nbsp;@scv' -r&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For host objects, you'll see the IPv4 address.&lt;BR /&gt;For networks, you'll get the IPv4 network and mask length.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 22:07:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Get-all-network-objects-from-a-specific-group-with-api/m-p/146323#M6728</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-04-14T22:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get all network objects from a specific group with api</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Get-all-network-objects-from-a-specific-group-with-api/m-p/146332#M6732</link>
      <description>&lt;P&gt;Minor typo:&amp;nbsp;@scv should be&amp;nbsp;@csv in the end. It works otherwise:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@DallasSA]# mgmt_cli -r true show-group name 'RFC 1918 Addresses' --format json | jq '.members[] | [.name, ."ipv4-address", .subnet4, ."mask-length4" ] | @csv' -r
"RFC 10/8",,"10.0.0.0",8
"RFC 192.168/16",,"192.168.0.0",16
"RFC 172.16/12",,"172.16.0.0",12&lt;/LI-CODE&gt;
&lt;P&gt;Note that this only covers hosts and networks. Address ranges have another set of properties, DNS domains work solely based on the name of the object, and wildcards have yet another set of properties. Groups can also contain groups, which gets really complicated to handle.&lt;/P&gt;
&lt;P&gt;As long as you know roughly the contents of the group ahead of time, this is fine.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2022 00:34:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Get-all-network-objects-from-a-specific-group-with-api/m-p/146332#M6732</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-04-15T00:34:43Z</dc:date>
    </item>
  </channel>
</rss>

