<?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 get virtual system/router dynamic routes using the Run-Script API command in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116316#M5790</link>
    <description>&lt;P&gt;Try building a one-liner like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sh -c 'command 1;command 2;third "command with quotes";fourth \'command with ticks\';command 5'&lt;/LI-CODE&gt;
&lt;P&gt;I haven't used this construct with Run-Script before, but I use it with xargs all the time.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Apr 2021 13:46:42 GMT</pubDate>
    <dc:creator>Bob_Zimmerman</dc:creator>
    <dc:date>2021-04-19T13:46:42Z</dc:date>
    <item>
      <title>How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116310#M5789</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;Is there a way to get the dynamic/static routes from VSX virtual systems (VS/VR) using the Run-Script API command?&lt;/P&gt;&lt;P&gt;Meaning, build a script body composed of &lt;STRONG&gt;several CLI commands&lt;/STRONG&gt;, such as:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;vsenv &amp;lt;vsid&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;show route&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 12:13:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116310#M5789</guid>
      <dc:creator>Robert_Decker1</dc:creator>
      <dc:date>2021-04-19T12:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116316#M5790</link>
      <description>&lt;P&gt;Try building a one-liner like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sh -c 'command 1;command 2;third "command with quotes";fourth \'command with ticks\';command 5'&lt;/LI-CODE&gt;
&lt;P&gt;I haven't used this construct with Run-Script before, but I use it with xargs all the time.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 13:46:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116316#M5790</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2021-04-19T13:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116770#M5804</link>
      <description>&lt;P&gt;Thanks Bob.&lt;/P&gt;&lt;P&gt;My problem is that I've to run that commands in CLISH mode.&lt;/P&gt;&lt;P&gt;Is there a way to change the CLI mode using run-script API command?&lt;/P&gt;&lt;P&gt;For example:&amp;nbsp; &amp;gt;&amp;gt;clish;set virtual-system 4;show route;&lt;/P&gt;&lt;P&gt;I've also tried: clish -c 'set virtual-system 4;show route;' with no success - run-script failed&lt;/P&gt;</description>
      <pubDate>Sun, 25 Apr 2021 08:22:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116770#M5804</guid>
      <dc:creator>Robert_Decker1</dc:creator>
      <dc:date>2021-04-25T08:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116813#M5805</link>
      <description>&lt;P&gt;Yeah, that's a limitation of clish. It's pretty solidly useless for troubleshooting or most automation. The best workaround I've found so far would be something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sh -c 'printf "set virtual-system 4\nshow route\nexit\n" | clish'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That way, you can wrap the pipeline, do other commands to process the data locally on the firewall, then you get the eventual result back at the management.&lt;/P&gt;
&lt;P&gt;There is also now the GAiA API which might be able to do what you want without involving clish.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Apr 2021 15:11:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116813#M5805</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2021-04-25T15:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116909#M5808</link>
      <description>&lt;P&gt;Probably this won't be perfect for you because you mention of use clish only. But in case you have an expert level access, then you can use following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for i in /proc/vrf/*; do i=${i#*vrf/}; vsenv $i; echo "set virtual-system" $i &amp;gt; /tmp/clishcmd; echo "show route" &amp;gt;&amp;gt; /tmp/clishcmd; clish -i -f /tmp/clishcmd; done&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just change&amp;nbsp;&lt;STRONG&gt;show route&lt;/STRONG&gt; for any other command which you need.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 11:58:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116909#M5808</guid>
      <dc:creator>Petr_Hantak</dc:creator>
      <dc:date>2021-04-26T11:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116911#M5809</link>
      <description>&lt;P&gt;Thank you Petr,&lt;/P&gt;&lt;P&gt;I've tried that in expert mode but it didn't work correctly.&lt;/P&gt;&lt;P&gt;It requires CLISH mode to respond with the correct results (for the combination of "set virtual-system ID" and "show route").&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 12:08:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116911#M5809</guid>
      <dc:creator>Robert_Decker1</dc:creator>
      <dc:date>2021-04-26T12:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116912#M5810</link>
      <description>&lt;P&gt;can't you create shell script and then add custom clish command?&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Usage: add command &amp;lt;command name&amp;gt; path &amp;lt;command path&amp;gt; description &amp;lt;command description&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;we use those for "special" users that can execute only one command in clish that's script based&lt;/P&gt;
&lt;P&gt;essentially you map clish command to a shell script&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 12:20:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116912#M5810</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2021-04-26T12:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116914#M5811</link>
      <description>&lt;P&gt;Hey, I cannot, it's customer's device and we are not allowed to upload bash scripts there.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 12:21:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/116914#M5811</guid>
      <dc:creator>Robert_Decker1</dc:creator>
      <dc:date>2021-04-26T12:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/256728#M9238</link>
      <description>&lt;P&gt;Hi Kaspars,&lt;/P&gt;
&lt;P&gt;I could not find a specific thread for this query, but this is the closest I think.&lt;BR /&gt;I've created a bunch of VS's using vsx_provisioning_tool on R82, however things I could not do are adding comments, changing the colour of the object and setting the main ip (need to change it).&lt;BR /&gt;So I looked at mgmt_cli api commands and I still can't see anything, so was wondering if this can be done using API?&lt;BR /&gt;Failing that I would need to go into every object and update (not a biggy but wanted to get it done using a script).&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2025 08:36:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/256728#M9238</guid>
      <dc:creator>genisis__</dc:creator>
      <dc:date>2025-09-08T08:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/256802#M9239</link>
      <description>&lt;P&gt;Legacy VSX objects do not have API support.&lt;BR /&gt;VSnext (from R82), on the other hand, does.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2025 18:19:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/256802#M9239</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2025-09-08T18:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get virtual system/router dynamic routes using the Run-Script API command</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/256815#M9240</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; So In my case will just need to update additional parameter manually.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2025 19:25:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-virtual-system-router-dynamic-routes-using-the-Run/m-p/256815#M9240</guid>
      <dc:creator>genisis__</dc:creator>
      <dc:date>2025-09-08T19:25:20Z</dc:date>
    </item>
  </channel>
</rss>

