<?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: R80.10 Management API &amp;quot;put-file&amp;quot; command's undocumented flag in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/R80-10-Management-API-quot-put-file-quot-command-s-undocumented/m-p/39139#M98859</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This command eventually uploads the content of the file to the specified target.&lt;/P&gt;&lt;P&gt;You must specify either the parameter for the file-content argument or use the new flag mentioned above.&lt;/P&gt;&lt;P&gt;Robert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jan 2018 08:15:33 GMT</pubDate>
    <dc:creator>Robert_Decker</dc:creator>
    <dc:date>2018-01-02T08:15:33Z</dc:date>
    <item>
      <title>R80.10 Management API "put-file" command's undocumented flag</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/R80-10-Management-API-quot-put-file-quot-command-s-undocumented/m-p/39137#M98857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The&amp;nbsp;Management API &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/put-file~v1.1"&gt;"put-file" command&lt;/A&gt; allows uploading a file to a management server or a gateway.&lt;/P&gt;&lt;P&gt;If you run this API command using a&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#mgmt_cli~v1.1"&gt;mgmt_cli tool&lt;/A&gt;, you may use a new &lt;STRONG&gt;"&lt;SPAN style="font-size: 11.0pt;"&gt;--treat-value-as-file-by-prefix&lt;/SPAN&gt;"&lt;/STRONG&gt; flag, which will replace the value of &lt;STRONG&gt;file-content&lt;/STRONG&gt; argument with the content of a file on your machine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example using the &lt;STRONG&gt;standard&lt;/STRONG&gt; syntax -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993300; font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;&lt;EM&gt;mgmt_cli put-file file-path "/home/admin/" file-name "vsx_conf" &lt;STRONG style="color: #0000ff;"&gt;file-content "vs ip 192.0.2.1\nvs2 ip 192.0.2.2"&lt;/STRONG&gt; targets.1 "corporate-gateway"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example using&amp;nbsp;the &lt;STRONG&gt;new&lt;/STRONG&gt; syntax -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #993300; font-size: 13px; font-family: 'courier new', courier, monospace;"&gt;mgmt_cli put-file file-path "/home/admin/" file-name "vsx_conf" &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;file-content @my_file.txt --treat-value-as-file-by-prefix @&lt;/STRONG&gt;&lt;/SPAN&gt; targets.1 "corporate-gateway"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while the content of the file my_file.txt will be "vs ip 192.0.2.1\nvs2 ip 192.0.2.2".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new flag informs the mgmt_cli tool that an argument&amp;nbsp;&lt;STRONG&gt;file-content&lt;/STRONG&gt; with a value&amp;nbsp;&lt;STRONG&gt;my_file.txt&lt;/STRONG&gt; starting with a &lt;STRONG&gt;'@'&lt;/STRONG&gt; character, should have a new value&amp;nbsp;- the content of &lt;STRONG&gt;my_file.txt&lt;/STRONG&gt; file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may use any prefix of any length for this flag.&lt;/P&gt;&lt;P&gt;If the file is not located in the current directory, you should specify an absolute path.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2017 13:43:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/R80-10-Management-API-quot-put-file-quot-command-s-undocumented/m-p/39137#M98857</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2017-12-28T13:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: R80.10 Management API "put-file" command's undocumented flag</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/R80-10-Management-API-quot-put-file-quot-command-s-undocumented/m-p/39138#M98858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;A href="https://community.checkpoint.com/migrated-users/47511"&gt;Robert&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for explanation.&amp;nbsp;&lt;BR /&gt;Is it possible to use the &lt;EM&gt;mgmt-cli&lt;/EM&gt; to simply put a file at the target?&lt;BR /&gt;say:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;&lt;EM style="color: #993300; background-color: #ffffff; border: 0px; font-size: 13px;"&gt;mgmt_cli put-file file-path "/home/admin/" file-name "my_file.txt"&amp;nbsp;&lt;EM style="background-color: #ffffff; border: 0px;"&gt;targets.1 "corporate-gateway"&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;And then the file located in my directory will be in the target directory of the command?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Adiel&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jan 2018 18:24:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/R80-10-Management-API-quot-put-file-quot-command-s-undocumented/m-p/39138#M98858</guid>
      <dc:creator>Adiel_Ashrov</dc:creator>
      <dc:date>2018-01-01T18:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: R80.10 Management API "put-file" command's undocumented flag</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/R80-10-Management-API-quot-put-file-quot-command-s-undocumented/m-p/39139#M98859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This command eventually uploads the content of the file to the specified target.&lt;/P&gt;&lt;P&gt;You must specify either the parameter for the file-content argument or use the new flag mentioned above.&lt;/P&gt;&lt;P&gt;Robert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2018 08:15:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/R80-10-Management-API-quot-put-file-quot-command-s-undocumented/m-p/39139#M98859</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2018-01-02T08:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: R80.10 Management API "put-file" command's undocumented flag</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/R80-10-Management-API-quot-put-file-quot-command-s-undocumented/m-p/125975#M98860</link>
      <description>&lt;P&gt;Another way of transferring files. Python SDK:&lt;BR /&gt;f = open("dynamic_id_users_info.lst", "r")&lt;BR /&gt;filecontent = f.read()&lt;/P&gt;&lt;P&gt;put_file_response = client.api_call("put-file", {"file-path" : "/var/opt/CPshrd-R80.40/conf/", "file-name" : "dynamic_id_users_info.lst", "file-content" : f"{filecontent}", "targets" : [ "target1","target2" ]})&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 02:31:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/R80-10-Management-API-quot-put-file-quot-command-s-undocumented/m-p/125975#M98860</guid>
      <dc:creator>Igor_Shnurko</dc:creator>
      <dc:date>2021-08-09T02:31:49Z</dc:date>
    </item>
  </channel>
</rss>

