<?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 management by API (SMS) in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/153108#M6993</link>
    <description>&lt;P&gt;Ah Yes thanks that did the trick.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2022 15:08:56 GMT</pubDate>
    <dc:creator>BarbervdH</dc:creator>
    <dc:date>2022-07-15T15:08:56Z</dc:date>
    <item>
      <title>export management by API (SMS)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/152781#M6973</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a project i'm working on, we are looking to export/import the management configuration, this needs to be done programmatically.&lt;BR /&gt;The idea is to rebuild the checkpoint in case something happens. Resources will be redeployed, and the management config should also be reapplied.&lt;BR /&gt;&lt;BR /&gt;I have been looking at the export-management (API) command.&lt;BR /&gt;It states that it should be able to do this with a SMS environment, but somehow i keep getting the error message 501 stating that this is only possible with a MDS environment.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;What i did so far using postman:&lt;BR /&gt;&lt;SPAN&gt;https://&amp;lt;mgmt-server&amp;gt;:&amp;lt;port&amp;gt;/web_api/login&lt;/SPAN&gt; (to generate a sid)&lt;BR /&gt;&lt;A target="_blank" rel="noopener"&gt;https://&amp;lt;mgmt-server&amp;gt;:&amp;lt;port&amp;gt;/web_api/export-management&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Stated the content-type and x-chkp-sid in the headers field&lt;BR /&gt;in the body of the request tried:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"file-path" : "/home/&amp;lt;userid&amp;gt;/backup.tgz"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;or sending a emty body, but it keeps giving me the error state 501&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;message"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"This&amp;nbsp;command&amp;nbsp;can&amp;nbsp;work&amp;nbsp;only&amp;nbsp;on&amp;nbsp;domains&amp;nbsp;of&amp;nbsp;type&amp;nbsp;MDS.&amp;nbsp;Cannot&amp;nbsp;execute&amp;nbsp;it&amp;nbsp;in&amp;nbsp;the&amp;nbsp;current&amp;nbsp;domain&amp;nbsp;(current&amp;nbsp;domain&amp;nbsp;type&amp;nbsp;is&amp;nbsp;Domain)."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tested from the CLI to export the management config, and this was successful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resource used:&lt;BR /&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/export-management~v1.8%20" target="_blank" rel="noopener"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/export-management~v1.8%20&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 11:28:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/152781#M6973</guid>
      <dc:creator>BarbervdH</dc:creator>
      <dc:date>2022-07-12T11:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: export management by API (SMS)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/152972#M6989</link>
      <description>&lt;P&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;you need to specify the version of the server. Without it the API assumes you are trying to export a domain only. For an SMS it looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="code"&gt;POST {{server}}/export-management
Content-Type: application/json
X-chkp-sid: {{session}}

{
  "version" : "R81.10",
  "file-path" : "/var/log/exported.tgz"
}&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jul 2022 12:31:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/152972#M6989</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2022-07-14T12:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: export management by API (SMS)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/153024#M6990</link>
      <description>&lt;P&gt;You have to be logged into the System Data domain to run this call from an SMS.&lt;/P&gt;&lt;P&gt;Add "domain" : "System Data" to your login query and it will work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 17:22:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/153024#M6990</guid>
      <dc:creator>Alex-</dc:creator>
      <dc:date>2022-07-14T17:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: export management by API (SMS)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/153084#M6991</link>
      <description>&lt;P&gt;Thx for the suggestion, but i still get the same error message.&lt;BR /&gt;The body i now sent is:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"file-path"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"/home/nl18348/backup.tgz"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"version"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"81.10"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"domain"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"System&amp;nbsp;Data"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Jul 2022 11:17:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/153084#M6991</guid>
      <dc:creator>BarbervdH</dc:creator>
      <dc:date>2022-07-15T11:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: export management by API (SMS)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/153092#M6992</link>
      <description>&lt;P&gt;The domain needs to be specified in your login call, not the export-management one.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 12:49:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/153092#M6992</guid>
      <dc:creator>Alex-</dc:creator>
      <dc:date>2022-07-15T12:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: export management by API (SMS)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/153108#M6993</link>
      <description>&lt;P&gt;Ah Yes thanks that did the trick.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 15:08:56 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/export-management-by-API-SMS/m-p/153108#M6993</guid>
      <dc:creator>BarbervdH</dc:creator>
      <dc:date>2022-07-15T15:08:56Z</dc:date>
    </item>
  </channel>
</rss>

