Clarification needed on Users by role(s) /UserRead Model
Hello everyone,
I’m starting to work on the Education Management side of things and using the API to pull users by role: API Reference.
So far, I’ve been successful in fetching all students using the student role. However, I noticed the documentation mentions a UserRead collection. Does this need to be enabled in some way to access those extra fields? I don’t see how it’s fetched.
Here’s what I’m using in Python:
url = f"{BASE_URL}/v1/users?roles={role_id}"
I also saw the extended users by role endpoint, but that returns way more data than I need right now.
My questions:
- What do these definitions, including UserRead, actually mean?
- How do I enable or fetch those fields when needed?
Thanks in advance for any guidance!
Answers
-
The UserRead collection is the name of the data package returned by the call to User Get (by role or by ID). It includes a count of the number of users returned, a link to the next "page" of data (if there is a next page), and an array of the user data objects.
See the page (which is probably the documentation you're referring to). At the top of the page, you can sign into the the page and use the Try It button to interact directly with the API - to see the returned data or an error message. At the top of the page, in the Documentation menu you will find a link to the Getting Started page, which will take you through the process of doing the initial work to allow API access to your data.
0 -
@Brian Gray Thanks for the quick response. I completed all the get-started guides and successfully used the 'Users by role(s)' request; however, I only received the default fields in the JSON object.
Clarifying my question, under the UserRead Model, there are other fields like "gender" that are not included in the default response. How can I get those values? Below is the first entry of a student on the first page (date is a replica of a student's response for privacy). I want to be able to access those other fields listed under the UserRead Model.{ "id": 524872, "deceased": false, "display": "Joe, Odessa '26", "email": "olman@ae.org", "email_active": true, "first_name": "Odessa", "last_name": "Gelman", "lost": false, "maiden_name": "", "middle_name": "Su'ad", "nick_name": "Odessa", "preferred_name": "Odessa", "preferred_last_name": "", "dob": "2008-03-25T00:00:00+00:00", "prefix": "", "suffix": "", "home_languages": [] },Below is "gender" listed under the UserRead Model as an example. Thank you!
0 -
It appears to me like you are looking at documentation in another part of the API. The User Get by Role end-point in the School API (developer.sky.blackbaud.com/api#api=school&operation=v1usersget) includes these fields in the response:
User Extended Get (developer.sky.blackbaud.com/api#api=school&operation=V1UsersExtendedGet) includes gender (and lots of other stuff).
There is no option to request that specific fields are included or excluded in the response. You get all of the data listed for each user.
Note that User Get by Role uses the Role ID, and User Extended Get by Role uses the Base Role ID. They are different values. See developer.sky.blackbaud.com/api#api=school&operation=v1rolesget.
My understanding is that Base Role IDs are constant from school to school, but the role ID values could be different. I don't know that for certain, but you should verify the values for your school.
For my school, the "Student" role has base role ID 14 and role ID 17426.
0 -
Thank you@Brian Gray. That's super helpful. I think I was misguided because these other fields are listed on the same page. Why list them there if they are part of the response?
I will play around with User Extended Get. Thanks again!1 -
Base role ID is also constant for all clones of the role. E.g. if Substitute is a clone of Teacher, they'd both have a base role ID of 15 (and yes base role IDs are constant across schools as well).
These two endpoints were created before my time. The response output likely simply delivers exactly what is delivered by the internal stored procedures, and the dev used the same object model for both despite it not really fitting for the 'by roles' version.0 -
Good callout. This looks like a bug.
The OpenAPI schema says /v1/users returns a collection of UserRead models. But the actual responses are missing gender and a number of other UserRead properties.
1 -
To share my experience just as one more data point among many to consider here, we almost never use /v1/users. We almost always use /v1/users/extended.
An advantage of /v1/users/extended is filtering by base role, which as Brian and Stephen mentioned is constant across schools. E.g., to get students, teachers, and non-teaching staff, you would filter by base role IDs 14, 15, and 332, respectively.
/v1/users/extended also has properties that we typically need when making these calls, while /v1/users is limited, as you saw.
1 -
Thanks, @Eric Eskildsen.
I started using it as recommended. I appreciate the insight.1
Categories
- All Categories
- 6 Blackbaud Community Help
- 206 bbcon®
- 1.4K Blackbaud Altru®
- 394 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 357 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 561 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 934 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.4K Blackbaud Raiser's Edge NXT®
- 3.6K SKY Developer
- 242 ResearchPoint™
- 117 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 238 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 28 PowerUp Challenges
- 3 (Open) 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
- 777 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)




