Overview
The OneRoster client provides access to the OneRoster 1.2 API, supporting:- Rostering: Users, orgs, schools, courses, classes, enrollments
- Gradebook: Categories, line items, results, score scales
- Assessment: Assessment line items and results
- Resources: Learning resources linked to courses
Installation
Quick Start
Rostering
Users
Payload variables such asuserInput below must contain all required fields. User creation requires sourcedId, enabledUser, givenName, familyName, email, and a nonempty roles array; a top-level role is not the create contract. Python write methods accept one payload dictionary using API field names, not arbitrary keyword arguments.
exists(), update(), and upsert() are available on all writable OneRoster resources.update(id, data): strict (throws if the resource doesn’t exist)upsert(id, data): loose (creates the resource if it doesn’t exist)exists(id): lightweight existence check
Scoped User Operations
Access user-specific data using the callable pattern:Students & Teachers
Dedicated read-only resources for role-specific queries:Schools & Organizations
Courses & Classes
Enrollments
Terms & Academic Sessions
Demographics
Gradebook
Gradebook resources are top-level on the client:For gradebook + assessment resources, write methods return the entity:
update(id, data): strict (throws on 404), returns entityupsert(id, data): loose (creates/updates), returns entity
void.Resources
Pagination
Top-level paginated resourcelist() methods return PageResult<T> with { data, hasMore, total, nextOffset }.
Filtering
Use thewhere parameter to filter results:
Enrollment PUT requires a full enrollment payload. Use
patch(id, data) for a partial status/date/metadata change. A scoped user credential registration requires applicationName plus both username and password under credentials.Error Handling
Next Steps
EduBridge
Simplified analytics queries
Caliper
Learning event tracking
Types
OneRoster type definitions