<?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 Basic problem with adding a host in an MDS via mgmt_cli in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Basic-problem-with-adding-a-host-in-an-MDS-via-mgmt-cli/m-p/63205#M3952</link>
    <description>&lt;P&gt;Hi, I'm trying to do some batch imports from one domain to another, but I'm having a strange issue out of the gate. When I do a simple "mgmt_cli add", it adds an object to the "MDS" domain instead of the "Core" domain I'm trying to get.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Expert@mds-1:0]# mgmt_cli login user [me] domain Core&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Password: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;uid: "b1f49fd8-daa1-4d0c-ad3e-38f57e75b1b1"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sid: "zQtNUq5L8HG_QI5Zk5v4Vl684kcPezUlG9S2Ef37IaE"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;url: "&lt;A href="https://127.0.0.1:443/web_api" target="_blank" rel="noopener"&gt;https://127.0.0.1:443/web_api&lt;/A&gt;"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;session-timeout: 600&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;last-login-was-at: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;posix: 1568061885668&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;iso-8601: "2019-09-09T13:44-0700"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;api-server-version: "1.1"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Expert@mds-1:0]# mgmt_cli add host name blah ipv4-address 1.2.3.4&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Username: [me]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Password:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;---------------------------------------------&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Time: [13:55:31] 19/9/2019&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;---------------------------------------------&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Publish operation" succeeded (100%) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Expert@mds-1:0]# mgmt_cli publish&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Username: bcotter&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Password:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;---------------------------------------------&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Time: [13:57:04] 19/9/2019&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;---------------------------------------------&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Publish operation" succeeded (100%) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;tasks: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- task-id: "01234567-89ab-cdef-a3c4-f6cd65a7062f"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;task-name: "Publish operation"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;status: "succeeded"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;progress-percentage: 100&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;suppressed: false&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;task-details: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- publishResponse: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;numberOfPublishedChanges: 0&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;revision: "90f810f4-7130-4122-a704-f40810b20fb8"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The object doesn't show up in the Core domain, but rather ends up getting created in "MDS," which I didn't even know had an object database. I'm attaching the audit log from SmartConsole.&lt;/P&gt;&lt;P&gt;What did I do wrong?&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 19 Sep 2019 21:16:06 GMT</pubDate>
    <dc:creator>Brandon_Cotter</dc:creator>
    <dc:date>2019-09-19T21:16:06Z</dc:date>
    <item>
      <title>Basic problem with adding a host in an MDS via mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Basic-problem-with-adding-a-host-in-an-MDS-via-mgmt-cli/m-p/63205#M3952</link>
      <description>&lt;P&gt;Hi, I'm trying to do some batch imports from one domain to another, but I'm having a strange issue out of the gate. When I do a simple "mgmt_cli add", it adds an object to the "MDS" domain instead of the "Core" domain I'm trying to get.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Expert@mds-1:0]# mgmt_cli login user [me] domain Core&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Password: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;uid: "b1f49fd8-daa1-4d0c-ad3e-38f57e75b1b1"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sid: "zQtNUq5L8HG_QI5Zk5v4Vl684kcPezUlG9S2Ef37IaE"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;url: "&lt;A href="https://127.0.0.1:443/web_api" target="_blank" rel="noopener"&gt;https://127.0.0.1:443/web_api&lt;/A&gt;"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;session-timeout: 600&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;last-login-was-at: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;posix: 1568061885668&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;iso-8601: "2019-09-09T13:44-0700"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;api-server-version: "1.1"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Expert@mds-1:0]# mgmt_cli add host name blah ipv4-address 1.2.3.4&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Username: [me]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Password:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;---------------------------------------------&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Time: [13:55:31] 19/9/2019&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;---------------------------------------------&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Publish operation" succeeded (100%) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Expert@mds-1:0]# mgmt_cli publish&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Username: bcotter&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Password:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;---------------------------------------------&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Time: [13:57:04] 19/9/2019&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;---------------------------------------------&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Publish operation" succeeded (100%) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;tasks: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- task-id: "01234567-89ab-cdef-a3c4-f6cd65a7062f"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;task-name: "Publish operation"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;status: "succeeded"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;progress-percentage: 100&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;suppressed: false&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;task-details: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- publishResponse: &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;numberOfPublishedChanges: 0&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;revision: "90f810f4-7130-4122-a704-f40810b20fb8"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The object doesn't show up in the Core domain, but rather ends up getting created in "MDS," which I didn't even know had an object database. I'm attaching the audit log from SmartConsole.&lt;/P&gt;&lt;P&gt;What did I do wrong?&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Sep 2019 21:16:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Basic-problem-with-adding-a-host-in-an-MDS-via-mgmt-cli/m-p/63205#M3952</guid>
      <dc:creator>Brandon_Cotter</dc:creator>
      <dc:date>2019-09-19T21:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Basic problem with adding a host in an MDS via mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Basic-problem-with-adding-a-host-in-an-MDS-via-mgmt-cli/m-p/63206#M3953</link>
      <description>&lt;P&gt;Figured it out from&amp;nbsp;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/multidomain-and-mgmt-cli/m-p/28018#M1644" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/multidomain-and-mgmt-cli/m-p/28018#M1644&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I was not referencing a session file. Adding "&amp;gt; id.txt" to the "mgmt_cli login" command, and "-s id.txt" to the "mgmt_cli add" command had the desired results.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 21:35:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Basic-problem-with-adding-a-host-in-an-MDS-via-mgmt-cli/m-p/63206#M3953</guid>
      <dc:creator>Brandon_Cotter</dc:creator>
      <dc:date>2019-09-19T21:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Basic problem with adding a host in an MDS via mgmt_cli</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Basic-problem-with-adding-a-host-in-an-MDS-via-mgmt-cli/m-p/63241#M3955</link>
      <description>Correct, if you do not reference the session you opened with "login", it creates a new session, which in your case was going to MDS then and every command without login or session-id set, will do it's own login/&amp;lt;whatever you specified/publish/logout.</description>
      <pubDate>Fri, 20 Sep 2019 11:10:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Basic-problem-with-adding-a-host-in-an-MDS-via-mgmt-cli/m-p/63241#M3955</guid>
      <dc:creator>Norbert_Bohusch</dc:creator>
      <dc:date>2019-09-20T11:10:28Z</dc:date>
    </item>
  </channel>
</rss>

