GetUsersExtendedByRole endpoint always returns the same marker and data
This endpoint (/school/v1/users/extended?base_role_ids={base_role_ids}&%s), which returns a paginated list of school users limited to 1000 users at a time, with a link containing the next marker.
The problem is no matter what I use for the starting marker, the data being returned along with the next marker is always identical, meaning I can not get all my users this way. I think this is a bug but before I open a case I thought I would ask here in case someone else has solved this problem, or has a work around.
Comments
-
@Yves Parent - calls to User Extended List with a marker are working as expected for me.
The marker that you should use in the second call is returned in the “next” field of the first call. Have you done this with the Try It on the end-point documentation for User Extended List?
Can you post URL for your first call, the “next” field that it returns, and the second call you make?
0 -
Brian, thanks for the reply.
For the first call, I use zero as the marker, then read the next_link value returned to determine if I should call the endpoint again. I get the new marker value for subsequent calls from that next_link value and in theory would keep doing that until next_link returns an empty string. But after the first call next_link keeps returning the same value, even if I start with something other than zero for the first call and even if I start with a value greater than that first marker, it still returns the exact same marker every time. The only thing that changes what new marker is returned is if I change the base_role_id parameter, but within the same role next_link always returns the same value.
Here is a real return value for next_link
"next_link": "/school/v1/users/extended?base_role_ids=1&marker=2721322"
I just tried it though the Blackbaud console like you suggested and there it returns a different marker in next_link and appears to be working correctly. This is just confusing me even more now...
So I have a question for you: do you use a single base_rold_id for your calls or multiple roles at a time?
0 -
BTW, if it makes a difference I'm sing Python to call those endpoints. Other paginated function calls like GetConstituentList work as expected.
0 -
@Yves Parent - You really don't need to interpret the “next” link - just use it in subsequent calls to get the rest of the users in the role(s) you requested.
In the Try-it page, if you request base role 16 (parents) you will see that the initial request URL is:

In the data returned by that call, the “next” field is:

You can add “https://api.sky.blackbaud.com” to the front of that “next” string and make your next call. Continue making calls and consuming the replies until the “next” field is an empty string.
The value of the marker in the “next” field will vary on each call depending on several factors (including which combination of roles you request, which users are in those roles or more than one of those roles, the phase of the moon and shoe size of the first user returned). The good news is that you don't care what the value is - just use whatever you're given.
I sometimes request a single role (e.g., just Student when I want details on current students), and sometimes I request multiple roles at one time (e.g., Teacher, Advisor, Coach, Dorm Supervisor, Nurse, Activity Leader, and Non-teaching Staff when I want info about all employees).
On a side-note…beware that User Extended by Role expects BASE Role IDs, but Users by Role expects Role IDs. You can get both values for each role in a call to Core Roles.
1 -
Brian, thanks for the reply once again. Before we go any further what language are you using for your API calls? I'm using Python and I now believe it's an issue with the Python library I'm using.
I tried using the next_link value as-is for the next call but it always returns the following error:
“TypeError: not all arguments converted during string formatting”
This is a generic Python error indicating a type mismatch in a function call, and I now believe my problem is specific to the http.client library. It does not allow me to pass in the next_link as is without using one of its methods to encode the parameters. I even tried hard-coding the URL and it fails with the above error every time.
I think only someone who has solved this issue in Python can help me. I will also investigate if there are other libraries in the Python language that I can use instead of http.client. I still think there's an issue, possibly even a big, with Blackbaud's code on this. The GetUsersByRole endpoint exhibits the exact same behavior, but GetConstituentList works fine using my approach (but that one uses an offset parameter instead of a marker which has slightly different meaning).
0 -
I also want to add, if anyone else is reading this:
When I encode the marker parameter with the following:
_httpParams = urllib.parse.urlencode({'marker': '{' + str(_newMarker) + '}',})
which works on the original call and examine the value of _httpParams it looks like this:
marker=%7B101%7D
where 101 would be the next marker and whatever that value is it's always surrounded by %7B and %7D. These are the ascii values for { and }. So I tried hard-coding it as it's displayed above and with the bracket symbols themselves but still get the same error.
So now I'm stuck. Whatever base role I select I can fetch the first 1000 users and that's it.
0 -
I work in Visual Basic using the SKYLib.Net library. I can't help you with the Python code.
In your screenshot, the value enclosed by the { } appears to be hexadecimal. The API is expecting a base 10 integer.
0 -
For the time being I found a way around this little problem. Use a Blackbaud list to export all user IDs to a file, then read each ID individually to call the GetUserByID endpoint to fetch the data one user at a time. It requires some manual steps so it can't be automated, and it takes about 10 times longer to run, but at least I have a complete dataset to work with.
Thanks for your help.
0
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 401 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 655 Blackbaud Grantmaking™
- 576 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 939 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.6K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 241 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 34 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 792 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

