<?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: View by CLI details of Policy Packages in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252397#M9144</link>
    <description>&lt;P&gt;As &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/38213"&gt;@the_rock&lt;/a&gt;&amp;nbsp;mentioned make sure your user has the Profile "Multi-Domain Super User" assigned.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jul 2025 07:55:35 GMT</pubDate>
    <dc:creator>Daniel_Kuhl1</dc:creator>
    <dc:date>2025-07-02T07:55:35Z</dc:date>
    <item>
      <title>View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252060#M9136</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I have a MDS that has about 10 CMAs, each CMA has more than 4 ‘Policy Packages’.&lt;/P&gt;
&lt;P&gt;Is there a way to view by CLI of the MDS, see the list of policy packages that are ‘tied’ to a particular CMA?&lt;/P&gt;
&lt;P&gt;Thanks for your comments&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 13:58:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252060#M9136</guid>
      <dc:creator>Matlu</dc:creator>
      <dc:date>2025-06-26T13:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252062#M9137</link>
      <description>&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-package~v2" target="_blank" rel="noopener"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-package~v2&lt;/A&gt;&amp;nbsp;shows the target gateways for the package&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 14:14:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252062#M9137</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2025-06-26T14:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252063#M9138</link>
      <description>&lt;P&gt;Hey brother,&lt;/P&gt;
&lt;P&gt;Try below, its my lab, regular mgmt, not MDS, but should be same.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;
&lt;P&gt;[Expert@CP-MANAGEMENT:0]# mgmt_cli show packages&lt;BR /&gt;Username: admin&lt;BR /&gt;Password:&lt;BR /&gt;packages:&lt;BR /&gt;- uid: "0fd04089-8f41-424a-aeb3-0534161618ca"&lt;BR /&gt;name: "R82-SSL-INSPECTION-LAB-POLICY"&lt;BR /&gt;type: "package"&lt;BR /&gt;domain:&lt;BR /&gt;uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"&lt;BR /&gt;name: "SMC User"&lt;BR /&gt;domain-type: "domain"&lt;BR /&gt;icon: "Blades/Access"&lt;BR /&gt;color: "cyan"&lt;BR /&gt;from: 1&lt;BR /&gt;to: 1&lt;BR /&gt;total: 1&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 14:14:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252063#M9138</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2025-06-26T14:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252072#M9139</link>
      <description>&lt;P&gt;Btw, built MDS lab quickly and same command I gave you also worked fine.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 15:34:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252072#M9139</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2025-06-26T15:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252079#M9140</link>
      <description>&lt;P&gt;Bro,&lt;BR /&gt;Do you apply the command in the main MDS, or do you jump to a CMA to apply it there?&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 17:08:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252079#M9140</guid>
      <dc:creator>Matlu</dc:creator>
      <dc:date>2025-06-26T17:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252080#M9141</link>
      <description>&lt;P&gt;I did it on mds.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 17:08:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252080#M9141</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2025-06-26T17:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252095#M9142</link>
      <description>&lt;P&gt;[Expert@MDS:0]# &lt;BR /&gt;[Expert@MDS:0]# mgmt_cli show packages&lt;BR /&gt;Username: cpsc_admin&lt;BR /&gt;Password: &lt;BR /&gt;packages: []&lt;BR /&gt;total: 0&lt;/P&gt;
&lt;P&gt;[Expert@MDS:0]# &lt;BR /&gt;[Expert@MDS:0]# &lt;BR /&gt;[Expert@MDS:0]# &lt;BR /&gt;[Expert@MDS:0]# &lt;BR /&gt;[Expert@MDS:0]# mdsenv 10.123.94.133&lt;BR /&gt;[Expert@MDS:0]# &lt;BR /&gt;[Expert@MDS:0]# mgmt_cli show packages&lt;BR /&gt;Username: cpsc_admin&lt;BR /&gt;Password: &lt;BR /&gt;packages: []&lt;BR /&gt;total: 0&lt;/P&gt;
&lt;P&gt;[Expert@MDS:0]#&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I have tested the command, with an account that has permissions, but I get empty results, whether I run it on the main MDS, or on a particular CMA.&lt;/P&gt;
&lt;P&gt;The detail is that the CMA that I have, really do have several POLICY PACKAGES tied to each CMA.&lt;/P&gt;
&lt;P&gt;It is strange&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2025 00:06:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252095#M9142</guid>
      <dc:creator>Matlu</dc:creator>
      <dc:date>2025-06-27T00:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252096#M9143</link>
      <description>&lt;P&gt;I had to sadly delete that lab, as I had to build something else for a pressing issue I was dealing with, but it definitely worked for me using that exact same command,&lt;/P&gt;
&lt;P&gt;You are sure that account has super user permissions?&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2025 00:30:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252096#M9143</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2025-06-27T00:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252397#M9144</link>
      <description>&lt;P&gt;As &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/38213"&gt;@the_rock&lt;/a&gt;&amp;nbsp;mentioned make sure your user has the Profile "Multi-Domain Super User" assigned.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 07:55:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252397#M9144</guid>
      <dc:creator>Daniel_Kuhl1</dc:creator>
      <dc:date>2025-07-02T07:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252416#M9146</link>
      <description>&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/22279"&gt;@Daniel_Kuhl1&lt;/a&gt;&amp;nbsp;I dont know if thats a must, but it would definitely help.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 11:36:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252416#M9146</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2025-07-02T11:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252426#M9147</link>
      <description>&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/82839"&gt;@Matlu&lt;/a&gt;&amp;nbsp;I checked on my lab. I got the same output as you from MDS:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@A-MDS:0]# mgmt_cli login api-key "API-KEY"
uid: "17a0067d-bef7-4b0c-a075-14179532dcef"
sid: "McLfS6kPLMq3B8jKywHXGDnDDs2B5CEfzTpTB6aSVik"
url: "https://127.0.0.1:443/web_api"
session-timeout: 600
api-server-version: "1.9.1"
user-name: "api-user"
user-uid: "0ac44df8-9f52-4f33-b2a4-04c03ccc4304"

[Expert@A-MDS:0]# mgmt_cli show packages --session-id "McLfS6kPLMq3B8jKywHXGDnDDs2B5CEfzTpTB6aSVik"
packages: []
total: 0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to login to the specific domain and then you got the packages:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@A-MDS:0]# mgmt_cli login api-key "API-KEY" domain "Alpha"
uid: "6d143c11-4a7b-4f22-8a00-660350bd5c2a"
sid: "p4mbKWT6fHQrAtkXewfBVmDkeqEL-InurxYHi9xv9H0"
url: "https://127.0.0.1:443/web_api"
session-timeout: 600
last-login-was-at: 
  posix: 1751463922464
  iso-8601: "2025-07-02T15:45+0200"
api-server-version: "1.9.1"
user-name: "api-user"
user-uid: "0ac44df8-9f52-4f33-b2a4-04c03ccc4304"

[Expert@A-MDS:0]# mgmt_cli show packages --session-id "p4mbKWT6fHQrAtkXewfBVmDkeqEL-InurxYHi9xv9H0"
packages: 
- uid: "0a96b8c1-e9bf-43ba-b604-26e2831d4b15"
  name: "A-VSX_VSX"
  type: "package"
  domain: 
    uid: "0f60c08a-e6ac-4180-9678-8fb98ee13e8e"
    name: "Alpha"
    domain-type: "domain"
  icon: "Blades/Access"
  color: "black"
- uid: "0fd04089-8f41-424a-aeb3-0534161618ca"
  name: "Alpha-Policy"
  type: "package"
  domain: 
    uid: "0f60c08a-e6ac-4180-9678-8fb98ee13e8e"
    name: "Alpha"
    domain-type: "domain"
  icon: "Blades/Access"
  color: "black"
- uid: "e6cd96da-6564-4a90-a593-a2f7868c8622"
  name: "DMZ-Policy"
  type: "package"
  domain: 
    uid: "0f60c08a-e6ac-4180-9678-8fb98ee13e8e"
    name: "Alpha"
    domain-type: "domain"
  icon: "Blades/Access"
  color: "sea green"
- uid: "9c1143d8-86b7-42f6-a457-127a547a17c3"
  name: "Internal-Policy"
  type: "package"
  domain: 
    uid: "0f60c08a-e6ac-4180-9678-8fb98ee13e8e"
    name: "Alpha"
    domain-type: "domain"
  icon: "Blades/Access"
  color: "crete blue"
from: 1
to: 4
total: 4&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use a script looping through all domains and get the packages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 14:12:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252426#M9147</guid>
      <dc:creator>Daniel_Kuhl1</dc:creator>
      <dc:date>2025-07-02T14:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252428#M9148</link>
      <description>&lt;P&gt;Did not know that command, thanks Daniel!&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 14:16:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252428#M9148</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2025-07-02T14:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: View by CLI details of Policy Packages</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252452#M9149</link>
      <description>&lt;P&gt;If you just want the package names under every domain on an MDS or SmartCenter, this will do it:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;domains="$(mgmt_cli -f json -r true show domains | jq '.objects[].name' | tr -d '"' | tr ' ' '\n')";echo "${domains}" | while read domainName;do mgmt_cli -f json -r true -d "${domainName}" show packages | jq -c ".packages[]|{domain:\"${domainName:-$(hostname)}\",name:.name}";done&lt;/LI-CODE&gt;
&lt;P&gt;If you want the installation targets, that's also doable, but more complicated:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;domains="$(mgmt_cli -f json -r true show domains | jq '.objects[].name' | tr -d '"' | tr ' ' '\n')";echo "${domains}" | while read domainName;do mgmt_cli -f json -r true -d "${domainName}" show packages details-level full | jq -c ".packages[]|{domain:\"${domainName:-$(hostname)}\",name:.name,targets:(if (.\"installation-targets\" | type) == \"array\" then [.\"installation-targets\"[]|.name] else [.\"installation-targets\"] end)}";done&lt;/LI-CODE&gt;
&lt;P&gt;Note that these don't include packages defined in the global domain.&lt;/P&gt;
&lt;P&gt;Edit: fixed a minor bug in the installation targets. Check Point returns either a list or a string in that property, and jq doesn't handle that ambiguity.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 17:47:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/View-by-CLI-details-of-Policy-Packages/m-p/252452#M9149</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2025-07-02T17:47:11Z</dc:date>
    </item>
  </channel>
</rss>

