Skip to main content

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

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 entity
  • upsert(id, data): loose (creates/updates), returns entity
For rostering + resources, write methods remain void.

Resources

Pagination

All list() methods return PageResult<T> with { data, hasMore, total, nextOffset }.

Filtering

Use the where parameter to filter results:

Error Handling

Next Steps

EduBridge

Simplified analytics queries

Caliper

Learning event tracking

Types

OneRoster type definitions