<?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: Most efficient way to get group member names via API? in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Most-efficient-way-to-get-group-member-names-via-API/m-p/120310#M5889</link>
    <description>&lt;P&gt;Looks like I figured it out.&amp;nbsp; I missed the "show-object" call in the Misc. section of the API's documentation.&lt;/P&gt;&lt;P&gt;Tested it and it works wonderfully!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jun 2021 17:23:18 GMT</pubDate>
    <dc:creator>Scott_NORRIS</dc:creator>
    <dc:date>2021-06-03T17:23:18Z</dc:date>
    <item>
      <title>Most efficient way to get group member names via API?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Most-efficient-way-to-get-group-member-names-via-API/m-p/120309#M5888</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to export a list of all network and service groups' members by name, and am running into some issues doing that via the API.&lt;/P&gt;&lt;P&gt;When I get the information from a group, it returns the members' UIDs, as such:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;'uid':'80dccaca-b24b-437c-8bf9-3db51369ba45',&lt;BR /&gt;'name':'xxxxxxxxxxxx.com_subnets',&lt;BR /&gt;'type':'group',&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;},&lt;BR /&gt;'members':[&lt;BR /&gt;'475841b2-bccf-4b77-984a-7d2152dfbf97',&lt;BR /&gt;'5cc36867-b259-4708-897f-0741b8de4910',&lt;BR /&gt;'27d3f6ec-d566-4586-ad48-f7e8df3f70b3',&lt;BR /&gt;'98cffe2e-1d61-454e-9986-e2566e561c8f',&lt;BR /&gt;'7d5bad99-8303-427e-8dff-b0de0a7fd459',&lt;BR /&gt;],&lt;BR /&gt;'comments':'',&lt;BR /&gt;'color':'black',&lt;BR /&gt;'icon':'General/group',&lt;BR /&gt;'tags':[&lt;BR /&gt;],&lt;BR /&gt;'meta-info':{&lt;BR /&gt;'lock':'unlocked',&lt;BR /&gt;'validation-state':'ok',&lt;BR /&gt;'last-modify-time':{&lt;BR /&gt;'posix':1617023570975,&lt;BR /&gt;'iso-8601':'2021-03-29T09:12-0400'&lt;BR /&gt;},&lt;BR /&gt;'last-modifier':'user',&lt;BR /&gt;'creation-time':{&lt;BR /&gt;'posix':1599654745782,&lt;BR /&gt;'iso-8601':'2020-09-09T08:32-0400'&lt;BR /&gt;},&lt;BR /&gt;'creator':'user'&lt;BR /&gt;},&lt;BR /&gt;'read-only':False&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Now, if all objects that could be within a group were objects of the same type, that would be great.&amp;nbsp; However, since that is not the case, and for example, in a network group, I could have host, network, IP Range or gateway objects, I do not know which one to search for a UID match.&amp;nbsp; That makes it so I need to go through all object types to find the UID and a matching object name, which is definitely not efficient.&lt;/P&gt;&lt;P&gt;Is there a way to search the entire database by UID in order to get the corresponding object?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for you help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 17:15:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Most-efficient-way-to-get-group-member-names-via-API/m-p/120309#M5888</guid>
      <dc:creator>Scott_NORRIS</dc:creator>
      <dc:date>2021-06-03T17:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Most efficient way to get group member names via API?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Most-efficient-way-to-get-group-member-names-via-API/m-p/120310#M5889</link>
      <description>&lt;P&gt;Looks like I figured it out.&amp;nbsp; I missed the "show-object" call in the Misc. section of the API's documentation.&lt;/P&gt;&lt;P&gt;Tested it and it works wonderfully!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 17:23:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Most-efficient-way-to-get-group-member-names-via-API/m-p/120310#M5889</guid>
      <dc:creator>Scott_NORRIS</dc:creator>
      <dc:date>2021-06-03T17:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Most efficient way to get group member names via API?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Most-efficient-way-to-get-group-member-names-via-API/m-p/120313#M5890</link>
      <description>&lt;P&gt;Depends on what you mean by efficient. As you found, 'show object uid &amp;lt;uuid&amp;gt;' is the most efficient from a memory perspective, as you're getting only the exact objects you want.&lt;/P&gt;
&lt;P&gt;If you need time-efficiency, it's worth noting API calls all have a communication overhead beyond the time required for the management server to look up and return the result. Running 'show objects limit 500 offset ___' to download all of your objects, then looking things up from that output is likely to be far more time-efficient if you need to look up more than about 50.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 19:41:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Most-efficient-way-to-get-group-member-names-via-API/m-p/120313#M5890</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2021-06-03T19:41:33Z</dc:date>
    </item>
  </channel>
</rss>

