<?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: Export Group objects to CSV in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159599#M7195</link>
    <description>&lt;P&gt;Can you choose an "export" option in SmartConsole that will provide you the details of a group? No, there is not a way to do that currently.&lt;/P&gt;
&lt;P&gt;You can get data from SmartConsole CLI, e.g. &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;show group name "Corporate LANs" --format json&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;However, it won't be in CSV format.&lt;BR /&gt;JSON can&amp;nbsp;be parsed offline with jq or similar similar to what I provided in my initial answer.&lt;BR /&gt;SmartConsole CLI does not provide access to jq or any other output parsing mechanisms.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Further, depending on the size and contents of the group, additional commands may be required to obtain all the data you're interested in.&lt;BR /&gt;This is because API commands return a limited number of results by default, though the additional results can be requested with additional calls using limit and/or offset parameters.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2022 17:39:44 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2022-10-14T17:39:44Z</dc:date>
    <item>
      <title>Export Group objects to CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159366#M7183</link>
      <description>&lt;P&gt;We are using Smart1 Cloud for management and don't have access to CLI. Also the CLI we have access to though the console doesn't accept -r commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We need to export a list of objects per group. A scheduled report would be desired however if manual that's better than nothing. I tried in object explorer to export a list of the objects but it only exports the group title. Seems dumb. Is there a way to export the objects?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 14:58:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159366#M7183</guid>
      <dc:creator>Agent_Smith</dc:creator>
      <dc:date>2022-10-12T14:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Export Group objects to CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159369#M7184</link>
      <description>&lt;P&gt;You don't need CLI access to Smart-1 Cloud to do&amp;nbsp;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-list-and-export-the-objects-member-from-the-network-group/m-p/147019/highlight/true#M6765" target="_self"&gt;what is described in this thread.&lt;/A&gt;&lt;BR /&gt;You just have to do it a little differently as mgmt_cli -r true can only be executed directly on the management station in expert mode.&lt;BR /&gt;-r true is a shortcut for the following commands:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;mgmt_cli -m localhost login &amp;gt; sid.txt&lt;/LI&gt;
&lt;LI&gt;mgmt_cli -m localhost -s sid.txt ...&lt;/LI&gt;
&lt;LI&gt;mgmt_cli -m localhost -s sid.txt publish&lt;/LI&gt;
&lt;LI&gt;mgmt_cli -m logout&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You can execute similar commands from one of your gateways in expert mode (cannot be done via clish):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;mgmt_cli -m mgmt-ip login &amp;gt; sid.txt&lt;/LI&gt;
&lt;LI&gt;mgmt_cli -m mgmt-ip -s sid.txt show-group name 'RFC 1918 Addresses' --format json | jq '.members[] | [.name, ."ipv4-address", .subnet4, ."mask-length4" ] | @csv' -r&lt;/LI&gt;
&lt;LI&gt;mgmt_cli -m mgmt-ip -s sid.txt logout&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The mgmt-ip can be obtained from SmartConsole.&lt;BR /&gt;Authenticate with your SmartConsole credentials (make sure the user in question has API permissions).&lt;BR /&gt;Refer to the online help for mgmt_cli for additional options (just type the command with no arguments).&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 21:27:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159369#M7184</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-10-12T21:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Export Group objects to CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159372#M7186</link>
      <description>&lt;P&gt;"-m" is not supported within SmartConsole's CLI window. This is a cloud manager so there's not an IP.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 15:25:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159372#M7186</guid>
      <dc:creator>Agent_Smith</dc:creator>
      <dc:date>2022-10-12T15:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export Group objects to CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159373#M7187</link>
      <description>&lt;P&gt;As I stated in my response, these commands should be executed from one of your gateways.&lt;BR /&gt;The SmartConsole CLI cannot be used for this purpose.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 15:28:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159373#M7187</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-10-12T15:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Export Group objects to CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159378#M7188</link>
      <description>&lt;P&gt;This is the gateway response&lt;/P&gt;&lt;P&gt;MGMT9206 You are not logged in to management server, in order to log-in you will need to run "mgmt login user [user name] ip [ip address]"&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 15:41:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159378#M7188</guid>
      <dc:creator>Agent_Smith</dc:creator>
      <dc:date>2022-10-12T15:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Export Group objects to CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159398#M7193</link>
      <description>&lt;P&gt;The commands I highlighted need to be run in expert mode (will update my answer above).&lt;BR /&gt;clish has a rough equivalent to mgmt_cli (called mgmt).&lt;BR /&gt;However, to get the precise output you're looking for, the output of this command must be "piped" through another tool called jq.&lt;BR /&gt;jq is not available in clish.&lt;BR /&gt;Further, you cannot use pipes and redirects from clish, which is required in this case.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 21:26:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159398#M7193</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-10-12T21:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Export Group objects to CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159550#M7194</link>
      <description>&lt;P&gt;So its not possible in the GUI to get a simple copy and paste list of objects in a group?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 13:06:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159550#M7194</guid>
      <dc:creator>Agent_Smith</dc:creator>
      <dc:date>2022-10-14T13:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Export Group objects to CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159599#M7195</link>
      <description>&lt;P&gt;Can you choose an "export" option in SmartConsole that will provide you the details of a group? No, there is not a way to do that currently.&lt;/P&gt;
&lt;P&gt;You can get data from SmartConsole CLI, e.g. &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;show group name "Corporate LANs" --format json&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;However, it won't be in CSV format.&lt;BR /&gt;JSON can&amp;nbsp;be parsed offline with jq or similar similar to what I provided in my initial answer.&lt;BR /&gt;SmartConsole CLI does not provide access to jq or any other output parsing mechanisms.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Further, depending on the size and contents of the group, additional commands may be required to obtain all the data you're interested in.&lt;BR /&gt;This is because API commands return a limited number of results by default, though the additional results can be requested with additional calls using limit and/or offset parameters.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 17:39:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/159599#M7195</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-10-14T17:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Export Group objects to CSV</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/160392#M7232</link>
      <description>&lt;P&gt;Hey PhoneBoy,&lt;/P&gt;&lt;P&gt;Can you tell me what the key is to export the comments for each entry in the network object?&lt;/P&gt;&lt;P&gt;I can't seem to find it or figure it out.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 17:04:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-Group-objects-to-CSV/m-p/160392#M7232</guid>
      <dc:creator>meigen</dc:creator>
      <dc:date>2022-10-25T17:04:12Z</dc:date>
    </item>
  </channel>
</rss>

