<?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: Bulk GET Question using Postman in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/bulk-get-question-using-postman/m-p/3942815#M456434</link>
    <description>&lt;P&gt;Thank you for your answer Arne.&lt;/P&gt;&lt;P&gt;In Postman, it has some query params for page size, and I can increase that value out to 100. This does increase the number of responses returned, but they are only just username and ID-string. I can then utilize those ID-strings in another GET, but I have only been able to figure out how to get these one at a time. NOTE: this second get returns more specific guest account information.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2019 19:59:11 GMT</pubDate>
    <dc:creator>ropauljr87</dc:creator>
    <dc:date>2019-10-17T19:59:11Z</dc:date>
    <item>
      <title>Bulk GET Question using Postman</title>
      <link>https://community.cisco.com/t5/network-access-control/bulk-get-question-using-postman/m-p/3941045#M456431</link>
      <description>&lt;P&gt;ISE 1.3&lt;/P&gt;&lt;P&gt;Using Postman,&lt;/P&gt;&lt;P&gt;I have tried using:&lt;BR /&gt;GET (ise-admin-url:9060)/ers/config/guestuser&lt;BR /&gt;Accept: application/vnd.com.cisco.ise.identity.guestuser.2.0+xml&lt;BR /&gt;Content-Type: application/vnd.com.cisco.ise.identity.guestuser.2.0+xml&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This returns:&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;resources&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;resource&lt;/SPAN&gt; &lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"username"&lt;/SPAN&gt; &lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"long-id-string"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;link&lt;/SPAN&gt; &lt;SPAN&gt;type&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"application/xml"&lt;/SPAN&gt; &lt;SPAN&gt;href&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"url with long-id-string"&lt;/SPAN&gt; &lt;SPAN&gt;rel&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"self"&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;resource&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I can use the id="long-id-string" to then do another GET for specific account information.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;GET (ise-admin-url:9060)/ers/config/guestuser/"long-id-string"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My question: Is there a way to just do one GET to obtain the specific account information for all guest accounts? I am looking to complete this to save guest accounts for auditing information. Doing this for each id would take me a long while...considering I am not savvy enough to script it.&lt;/DIV&gt;</description>
      <pubDate>Fri, 21 Feb 2020 19:11:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/bulk-get-question-using-postman/m-p/3941045#M456431</guid>
      <dc:creator>ropauljr87</dc:creator>
      <dc:date>2020-02-21T19:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Bulk GET Question using Postman</title>
      <link>https://community.cisco.com/t5/network-access-control/bulk-get-question-using-postman/m-p/3941596#M456432</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/817245"&gt;@ropauljr87&lt;/a&gt;&amp;nbsp; - it's been a while since I did any REST stuff. But I recall that you can append a ?size=100 (100 is the max apparently) to the REST call, and then it tells the server to return up to that many items in your XML/JSON response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you need more than 100 then you have no option but to script it. It's not that scary ...&lt;/P&gt;
&lt;P&gt;I will also refer you to this neat little Python procedure that &lt;A href="https://community.cisco.com/t5/policy-and-access/cisco-ise-ers-apis-for-network-devices-to-get-a-device-list-with/m-p/3053072" target="_self"&gt;someone posted on this Community forum&lt;/A&gt; - I am sure you can hack something together to suit your needs &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;def get_device_list(s):
    """
    Return list of the Network Devices
    Maximum is 100 devices per page ?size=100
    Go through the pages &amp;amp;page = 1
    """
    url = "https://" + ISE_SERVER + ":9060/ers/config/networkdevice?size=100&amp;amp;page="
    url = url + "1"
     resp= requests.request("GET", url, data=payload, headers=headers, params=querystring)
    
    device_list = []
if resp.status_code == 200:
        result  = resp.json()['SearchResult']
        total = result['total']
        pages = total / 100 + 1
        for page in range (1, int(pages + 1)):
            resp= requests.request("GET", url + str(page), data=payload, headers=headers, params=querystring)
            if resp.ok:
                result = resp.json()['SearchResult']['resources']
                for item in result:
                    device = {}
                    device['id'] = item['id']
                    device['name'] = item['name']
                    """ Not all devices has description field """
                    # device['description'] = item['description']
                    device['link'] = item['link']['href']
                    device_list.append(device)
return device_list


&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Oct 2019 11:28:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/bulk-get-question-using-postman/m-p/3941596#M456432</guid>
      <dc:creator>Arne Bier</dc:creator>
      <dc:date>2019-10-16T11:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bulk GET Question using Postman</title>
      <link>https://community.cisco.com/t5/network-access-control/bulk-get-question-using-postman/m-p/3942815#M456434</link>
      <description>&lt;P&gt;Thank you for your answer Arne.&lt;/P&gt;&lt;P&gt;In Postman, it has some query params for page size, and I can increase that value out to 100. This does increase the number of responses returned, but they are only just username and ID-string. I can then utilize those ID-strings in another GET, but I have only been able to figure out how to get these one at a time. NOTE: this second get returns more specific guest account information.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 19:59:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/bulk-get-question-using-postman/m-p/3942815#M456434</guid>
      <dc:creator>ropauljr87</dc:creator>
      <dc:date>2019-10-17T19:59:11Z</dc:date>
    </item>
  </channel>
</rss>

