Skip to main content
Timeback provides API clients for direct access to all services in both TypeScript and Python. Use these when you need fine-grained control over API interactions or want to build custom integrations.

Available Clients

ClientDescriptionTypescriptPython
OneRosterRostering, enrollments, grades
EduBridgeAnalytics and resources
CaliperLearning event tracking
QTIAssessments and questions
PowerPathAdaptive learning paths
CASECompetencies and standards
CLRComprehensive Learner Records
MasteryTrackTest inventory and assignments
WebhooksWebhook management and filters

Installation

Install individual clients as needed:
npm install @timeback/oneroster
npm install @timeback/edubridge
npm install @timeback/caliper
npm install @timeback/qti
npm install @timeback/powerpath
npm install @timeback/case
npm install @timeback/clr
npm install @timeback/webhooks
npm install @timeback/masterytrack
Or install all via the unified client:
npm install @timeback/core

Authentication

All clients use OAuth 2.0 client credentials flow. There are two configuration modes: Connect to Timeback platforms with automatic URL resolution:
import { OneRosterClient } from '@timeback/oneroster'

const client = new OneRosterClient({
	env: 'staging', // or 'production'
	auth: {
		clientId: process.env.ONEROSTER_CLIENT_ID!,
		clientSecret: process.env.ONEROSTER_CLIENT_SECRET!,
	},
})

Explicit Mode

Connect to custom OneRoster APIs:
const client = new OneRosterClient({
	baseUrl: 'https://api.example.com',
	auth: {
		clientId: process.env.ONEROSTER_CLIENT_ID!,
		clientSecret: process.env.ONEROSTER_CLIENT_SECRET!,
		authUrl: 'https://auth.example.com/oauth2/token',
	},
})
Tokens are automatically managed:
  • Fetched on first request
  • Cached for subsequent requests
  • Refreshed when expired

SDK Integration

When using the full SDK, clients are available via timeback.api:
import { createTimeback } from '@timeback/sdk'

const timeback = await createTimeback({
	env: 'staging',
	api: {
		clientId: process.env.TIMEBACK_API_CLIENT_ID!,
		clientSecret: process.env.TIMEBACK_API_CLIENT_SECRET!,
	},
	identity: {
		/* ... */
	},
})

const { data: users } = await timeback.api.oneroster.users.list()
const enrollments = await timeback.api.edubridge.enrollments.list({ userId })
await timeback.api.caliper.events.sendActivity(sensorUrl, activityData)

Common Patterns

All clients follow consistent CRUD patterns:
client.users.list({ limit?, offset?, where? })
client.users.get(id)
client.users.exists(id)
client.users.create({ ...fields })
client.users.update(id, { ...fields })
client.users.upsert(id, { ...fields })
client.users.delete(id)
client.users.stream()
MethodReturnsDescription
list()PageResultList with pagination/filters
get()ResourceGet by ID
exists()booleanCheck if resource exists (lightweight HEAD)
create()CreateResponseCreate new resource
update()Resource | voidUpdate existing resource (throws if missing)
upsert()Resource | voidCreate or update resource
delete()voidDelete resource
stream()AsyncIterableStream all results efficiently
Return values for update() and upsert() are client-specific:
  • Most clients return the updated entity
  • Some APIs return no body on write, so the SDK returns void
  • In OneRoster specifically: rostering/resources return void, while gradebook/assessment return the updated entity

Environment Configuration

Configure clients via environment variables (when using environment mode, URLs are auto-resolved):
.env
# OneRoster
ONEROSTER_CLIENT_ID=your-client-id
ONEROSTER_CLIENT_SECRET=your-client-secret

# EduBridge
EDUBRIDGE_CLIENT_ID=your-client-id
EDUBRIDGE_CLIENT_SECRET=your-client-secret

# Caliper
CALIPER_CLIENT_ID=your-client-id
CALIPER_CLIENT_SECRET=your-client-secret

# QTI
QTI_CLIENT_ID=your-client-id
QTI_CLIENT_SECRET=your-client-secret

# CASE
CASE_CLIENT_ID=your-client-id
CASE_CLIENT_SECRET=your-client-secret

# CLR
CLR_CLIENT_ID=your-client-id
CLR_CLIENT_SECRET=your-client-secret

# MasteryTrack (uses API key + email, not OAuth)
MASTERYTRACK_API_KEY=your-api-key
MASTERYTRACK_EMAIL=your-registered-email

# Webhooks
WEBHOOKS_CLIENT_ID=your-client-id
WEBHOOKS_CLIENT_SECRET=your-client-secret

Client Guides

OneRoster

Rostering, enrollments, and gradebook

EduBridge

Analytics and resource management

Caliper

Learning analytics events

QTI

Assessments and questions

PowerPath

Adaptive learning paths

CASE

Competencies and standards

CLR

Comprehensive Learner Records

MasteryTrack

Test inventory and assignments

Webhooks

Webhook management and filters