Skip to main content
This page applies to integrations assigned the direct Caliper metrics contract. Send an envelope to POST /caliper/event on your Caliper base URL. These event types are not accepted by the Partner Events API at /events/1.0.

Envelope

Each event requires id, type, profile, actor, action, object, and eventTime. Use profile: "TimebackProfile" and an event ID in urn:uuid: form. Use the standard Caliper @context value; the schema supplies it when absent.

User and activity context

Allowed roles are student, teacher, admin, and guide. Allowed subjects are Reading, Language, Vocabulary, Social Studies, Writing, Handwriting, Science, FastMath, Math, None, and Other. Use the student’s Timeback user URL and the course URL assigned to your integration. The schema permits a course without an ID, but downstream course resolution can require it. For activity events destined for the TimebackProfile analytics worker, set object.process to true. It is a processing instruction, not a completion percentage. Confirm your assigned consumer before applying it to another platform.

ActivityEvent

Set type to ActivityEvent and action to Completed. generated requires an ID URL, type TimebackActivityMetricsCollection, and an items array. Each item contains a numeric value; item and collection extensions are optional. The schema does not infer question counts, compute correctness, or verify a mastery decision. Supply values that match the agreed measurement rule for your app. action: "Completed" describes an activity. It does not mean that the course is complete.

TimeSpentEvent

Set type to TimeSpentEvent and action to SpentTime. generated requires an ID URL, type TimebackTimeSpentMetricsCollection, and an items array. Send nonnegative durations that match the measured interval. The current schema enforces the upper duration bound; it does not enforce a lower bound, timestamp ordering, or equality between duration and timestamp difference. Validate these conditions in your producer. Time measurement is separate from XP measurement. Replaying an interval under a new event identity can add time again in downstream processing. Preserve the event identity for a transport retry and retain your own record of sent intervals.

Example envelope

This synthetic example records an activity and five minutes of active time. Replace its IDs, addresses, sensor, and timestamps with the values assigned to your integration.

Validate and confirm

Use POST /caliper/event/validate with the same envelope to check its schema without storing it. On success, the validator returns 200 with status: "success" and message: "Request payload is valid". Ingestion returns 200 after validation and queuing. Retain its jobId. For the Caliper service, GET /jobs/{jobId}/status exposes queue state and the worker’s returnValue. Check result status and errors as well as the queue state. A completed queue job does not prove that every downstream subscriber succeeded. Do not replace an event payload by resending a changed payload under the same event ID. The Caliper service keeps the first stored event content for that ID. Corrections need the correction procedure agreed for the integration.