<?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: API - Changes in List endusers? in ExtremeCloud IQ Developer Community</title>
    <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/api-changes-in-list-endusers/m-p/92911#M33</link>
    <description>&lt;P&gt;The api endpoint worked for me as well.&amp;nbsp; Back in April, we introduced a parameter to search by usernames.&amp;nbsp; This parameter eliminates the need to download and parse the entire enduser payload response, which is especially useful in a large organization.&amp;nbsp; Please note that the value entered is case-sensitive.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2022 21:37:24 GMT</pubDate>
    <dc:creator>2delarosa</dc:creator>
    <dc:date>2022-09-06T21:37:24Z</dc:date>
    <item>
      <title>API - Changes in List endusers?</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/api-changes-in-list-endusers/m-p/92893#M31</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I have this python script where I list all endusers into a list and the iterate over it to find a spesific user.&lt;/P&gt;&lt;P&gt;This used to work fine, but not anymore.&lt;/P&gt;&lt;P&gt;The function looks like this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def list_endusers(pageSize):                                # LIST ALL ENDUSERS IN DATABASE. NEEDED TO FIND IF USER EXISTS
        print("Retrieve all PPSK users from ExtremeCloudIQ")
        page = 1

        endusers = []

        while page &amp;lt; 1000:
            url = URL + "/endusers?page=" + str(page) + "&amp;amp;limit=" + str(pageSize)
            print("Retrieving next page of PPSK users from ExtremeCloudIQ starting at page " + str(page) + " url: " + url)

            # Get the next page of the endusers
            response = requests.get(url, headers=headers, verify = True)
            if response is None:
                print("Error retrieving PPSK users from XIQ - no response!")
                return

            if response.status_code != 200:
                print("Error retrieving PPSK users from XIQ - HTTP Status Code: " +
                      str(response.status_code))
                print(response)
                print(response.content)
                return

            rawList = response.json()['data']
            for name in rawList:                            #### UNTAG THESE TO SEE ALL USERS
                print(name)                                 #### UNTAG THESE TO SEE ALL USERS
            print("Retrieved " + str(len(rawList)) + " users on this page")
            endusers = endusers + rawList

            if len(rawList) == 0:
                #print("Reached the final page - stopping to retrieve users ")
                break

            page = page + 1

        return endusers&lt;/LI-CODE&gt;&lt;P&gt;I get this error:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;&amp;lt;Response [400]&amp;gt;
b'{"error_code":"UNKNOWN","error_id":"ff98e0177ca64c7d9a775385fbff00c9","error_message":"UNKNOWN"}'&lt;/LI-CODE&gt;&lt;P&gt;Has there been any changes to the API that can cause this?&lt;/P&gt;&lt;P&gt;In the Swagger UI page, I can see to new(?) options:&lt;BR /&gt;- user_group_ids&lt;BR /&gt;- usernames&lt;/P&gt;&lt;P&gt;Do they need to be filled out (not optionable)? If so, is there a wildcard that can be used to find usernames?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 12:24:22 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/api-changes-in-list-endusers/m-p/92893#M31</guid>
      <dc:creator>dal</dc:creator>
      <dc:date>2022-09-05T12:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: API - Changes in List endusers?</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/api-changes-in-list-endusers/m-p/92910#M32</link>
      <description>&lt;P&gt;I just tried the call from swagger without needing to fill them out and it worked fine for me. I also tried via python using requests and didn't run into the issue.&lt;/P&gt;&lt;P&gt;Can you try adding some debug or print statements to see the full URL or requests that's being submitted?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 20:09:20 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/api-changes-in-list-endusers/m-p/92910#M32</guid>
      <dc:creator>TylerMarcotte</dc:creator>
      <dc:date>2022-09-06T20:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: API - Changes in List endusers?</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/api-changes-in-list-endusers/m-p/92911#M33</link>
      <description>&lt;P&gt;The api endpoint worked for me as well.&amp;nbsp; Back in April, we introduced a parameter to search by usernames.&amp;nbsp; This parameter eliminates the need to download and parse the entire enduser payload response, which is especially useful in a large organization.&amp;nbsp; Please note that the value entered is case-sensitive.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 21:37:24 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/api-changes-in-list-endusers/m-p/92911#M33</guid>
      <dc:creator>2delarosa</dc:creator>
      <dc:date>2022-09-06T21:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: API - Changes in List endusers?</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/api-changes-in-list-endusers/m-p/92919#M35</link>
      <description>&lt;P&gt;I have tried both directly in swagger UI &lt;A href="https://api.extremecloudiq.com/swagger-ui/index.html#/Configuration%20-%20User%20Management/listEndUsers" target="_self"&gt;here&lt;/A&gt; and from my python scripts.&lt;BR /&gt;If I leave both fields blank, it throws an error code 400. If I fill out one of the fields, it seems to work.&lt;/P&gt;&lt;P&gt;Searching by usernames is a welcome addition, and something I requested about a year ago.&lt;BR /&gt;Excellent. I just wish there was a way to use a wildcard in the username, though.&lt;/P&gt;&lt;P&gt;I have altered my python scripts now, so it's not really an issue anymore as long as the correct method is known.&lt;/P&gt;&lt;P&gt;I have another problem, though. But I can make another thread for that.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 11:55:03 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/api-changes-in-list-endusers/m-p/92919#M35</guid>
      <dc:creator>dal</dc:creator>
      <dc:date>2022-09-07T11:55:03Z</dc:date>
    </item>
  </channel>
</rss>

