<?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 Retrieving group members not working over 100 in APIs</title>
    <link>https://community.cisco.com/t5/apis/retrieving-group-members-not-working-over-100/m-p/4882725#M467</link>
    <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Let’s take this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;&amp;gt; client.jsonApiCall('GET', '/admin/v2/groups/XXXXXXXXXXXXXXXX/users', { limit: 200 }, console.log);
undefined
&amp;gt; {
  metadata: { total_objects: 101 },
  response: [
    { user_id: '--------', username: 'xxxx_001' },
    . . . .
    { user_id: '--------', username: 'xxxx_099' },
    { user_id: '--------', username: 'xxxx_100' },
    ... 1 more item
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I specified “200” as limit, because in principle we won’t have more than 200 users, so I don’t have to deal with pagination.&lt;/P&gt;
&lt;P&gt;Is this normal behaviour? I mean, even when setting 200 as limit, it’s only showing 100. Doesn’t matter if I do&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;limit: 200&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;limit: “200”&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The group has 101 users.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 23 Nov 2021 21:11:00 GMT</pubDate>
    <dc:creator>Ruben_Cardenal</dc:creator>
    <dc:date>2021-11-23T21:11:00Z</dc:date>
    <item>
      <title>Retrieving group members not working over 100</title>
      <link>https://community.cisco.com/t5/apis/retrieving-group-members-not-working-over-100/m-p/4882725#M467</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Let’s take this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;&amp;gt; client.jsonApiCall('GET', '/admin/v2/groups/XXXXXXXXXXXXXXXX/users', { limit: 200 }, console.log);
undefined
&amp;gt; {
  metadata: { total_objects: 101 },
  response: [
    { user_id: '--------', username: 'xxxx_001' },
    . . . .
    { user_id: '--------', username: 'xxxx_099' },
    { user_id: '--------', username: 'xxxx_100' },
    ... 1 more item
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I specified “200” as limit, because in principle we won’t have more than 200 users, so I don’t have to deal with pagination.&lt;/P&gt;
&lt;P&gt;Is this normal behaviour? I mean, even when setting 200 as limit, it’s only showing 100. Doesn’t matter if I do&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;limit: 200&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;limit: “200”&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The group has 101 users.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 Nov 2021 21:11:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/retrieving-group-members-not-working-over-100/m-p/4882725#M467</guid>
      <dc:creator>Ruben_Cardenal</dc:creator>
      <dc:date>2021-11-23T21:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving group members not working over 100</title>
      <link>https://community.cisco.com/t5/apis/retrieving-group-members-not-working-over-100/m-p/4882726#M468</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I have zero node experience so I can’t speak to the nodejs client specifically, but yes that is how &lt;CODE&gt;limit&lt;/CODE&gt; should work in the api request/response and I’d think you would add &lt;CODE&gt;{limit:200}&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;I have the python client working and checked it there with a group of 125 users and it increased the page…&lt;/P&gt;
&lt;P&gt;w/o specifying a value for &lt;CODE&gt;limit&lt;/CODE&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;python -m duo_client.client --ikey nnn --skey nnn --host nnn --path /admin/v2/groups/the_group_id/users --method GET

200 OK
{
    "metadata": {
        "next_offset": 100, 
        "total_objects": 125
    }, 
    "response": [  ............
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;with a value for &lt;CODE&gt;limit&lt;/CODE&gt; ( both &amp;gt; 100 and &amp;gt; the # of group members):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;python -m duo_client.client --ikey nnn --skey nnn --host nnn --path /admin/v2/groups/the_group_id/users limit=110 --method GET

200 OK
{
    "metadata": {
        "next_offset": 110, 
        "total_objects": 125
    }, 
    "response": [ ..........

python -m duo_client.client --ikey nnn --skey nnn --host nnn --path /admin/v2/groups/the_group_id/users limit=200 --method GET

200 OK
{
    "metadata": {
        "total_objects": 125
    }, 
    "response": [ ..........
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 Nov 2021 22:49:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/retrieving-group-members-not-working-over-100/m-p/4882726#M468</guid>
      <dc:creator>DuoKristina</dc:creator>
      <dc:date>2021-11-23T22:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving group members not working over 100</title>
      <link>https://community.cisco.com/t5/apis/retrieving-group-members-not-working-over-100/m-p/4882727#M469</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Might you be running into &lt;CODE&gt;maxArrayLength&lt;/CODE&gt;? I see that defaults to 100.&lt;/P&gt;
&lt;ASIDE class="onebox allowlistedgeneric" data-onebox-src="https://zaiste.net/posts/nodejs-log-over-100-array-items/"&gt;
  &lt;HEADER class="source"&gt;

      &lt;A href="https://zaiste.net/posts/nodejs-log-over-100-array-items/" target="_blank" rel="noopener"&gt;zaiste.net&lt;/A&gt;
  &lt;/HEADER&gt;

  &lt;ARTICLE class="onebox-body"&gt;
    &lt;DIV class="aspect-image" style="--aspect-ratio:690/362;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2X_0_018696504ca04005c644a379b96efc13da584244.png" style="width: 690px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/191058iA450DB6946CF8B4B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2X_0_018696504ca04005c644a379b96efc13da584244.png" alt="2X_0_018696504ca04005c644a379b96efc13da584244.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;

&lt;H3&gt;&lt;A href="https://zaiste.net/posts/nodejs-log-over-100-array-items/" target="_blank" rel="noopener"&gt;Node.js: Log over 100 Array elements&lt;/A&gt;&lt;/H3&gt;

  &lt;P&gt;Zaiste Programming is a personal website by Jakub Neander about programming. It covers Java, Ruby, Python, JavaScript, Node.js, Clojure, Dart, Flutter and more.&lt;/P&gt;


  &lt;/ARTICLE&gt;

  &lt;DIV class="onebox-metadata"&gt;
    
    
  &lt;/DIV&gt;

  &lt;DIV style="clear: both"&gt;&lt;/DIV&gt;
&lt;/ASIDE&gt;

&lt;P&gt;ETA: yes, when I set the &lt;CODE&gt;maxArrayLength&lt;/CODE&gt; to null my output from the get on the group of 125 users with &lt;CODE&gt;limit:200&lt;/CODE&gt; went from:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;...99 preceding lines of users...
{ user_id: 'DUblahblah', username: 'someuser' },
  ... 25 more items
]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;...124 preceding lines of users...
  { user_id: 'DUnewblahblah', username: 'someotheruser' }
]
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 Nov 2021 23:12:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/retrieving-group-members-not-working-over-100/m-p/4882727#M469</guid>
      <dc:creator>DuoKristina</dc:creator>
      <dc:date>2021-11-23T23:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving group members not working over 100</title>
      <link>https://community.cisco.com/t5/apis/retrieving-group-members-not-working-over-100/m-p/4882728#M470</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Thanks for pointing in the right direction. Actually what’s needed for this case is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;const util = require('util')
util.inspect.defaultOptions.maxArrayLength = null
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Regards.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 Nov 2021 08:52:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/retrieving-group-members-not-working-over-100/m-p/4882728#M470</guid>
      <dc:creator>Ruben_Cardenal</dc:creator>
      <dc:date>2021-11-24T08:52:06Z</dc:date>
    </item>
  </channel>
</rss>

