Skip to main content

Analytics API

The Analytics API provides read access to aggregated learning activity data derived from processed Caliper events. Use these endpoints to retrieve weekly facts, daily activity metrics, and enrollment-level progress. All endpoints require Authorization: Bearer <token> and scope events.readonly.

Base prefix: https://api.alpha-1edtech.ai/analytics/1.0


GET /analytics/1.0/facts/weekly​

Returns individual processed facts for a student within the week containing the given date. Each fact represents one processed learning event (activity completion or time-spent measurement).

Either email or studentId must be provided.

Scope: events.readonly

Query params​

NameDescriptionRequired
emailStudent email address (provide email or studentId)no
studentIdStudent sourcedId (provide email or studentId)no
weekDateDate within the target week (YYYY-MM-DD or ISO datetime)yes
timezoneIANA timezone for date bucketing (default UTC)no

Response​

200 OK:

{
"startDate": "2026-01-12",
"endDate": "2026-01-18",
"facts": [...]
}

Each fact includes: id, email, date, datetime, userId, subject, app, courseId, courseName, enrollmentId, activityId, activityName, totalQuestions, correctQuestions, xpEarned, masteredUnits, activeSeconds, inactiveSeconds, wasteSeconds, eventType.

400 Bad Request — Missing required parameters.

Example​

curl "https://api.alpha-1edtech.ai/analytics/1.0/facts/weekly?studentId=22222222-2222-2222-2222-222222222222&weekDate=2026-01-15" \
-H "Authorization: Bearer <ACCESS_TOKEN>"

GET /analytics/1.0/activity​

Returns aggregated activity metrics for a student across a date range. Includes daily breakdowns by subject and by app.

Either email or studentId must be provided.

Scope: events.readonly

Query params​

NameDescriptionRequired
emailStudent email address (provide email or studentId)no
studentIdStudent sourcedId (provide email or studentId)no
startDateStart of the date range (YYYY-MM-DD)yes
endDateEnd of the date range (YYYY-MM-DD)yes
timezoneIANA timezone for date bucketing (default UTC)no

Response​

200 OK:

{
"studentId": "...",
"email": "...",
"startDate": "2026-01-01",
"endDate": "2026-01-31",
"daily": [
{ "date": "2026-01-01", "activeMinutes": 30, "activitiesCompleted": 5, "xpEarned": 150, "accuracy": 85 }
],
"bySubject": [
{ "subject": "Math", "activeMinutes": 200, "activitiesCompleted": 30, "xpEarned": 900 }
],
"byApp": [
{ "appName": "my-learning-app", "activeMinutes": 200, "activitiesCompleted": 30, "xpEarned": 900 }
],
"totals": { "activeMinutes": 200, "activitiesCompleted": 30, "xpEarned": 900, "accuracy": 85 }
}

400 Bad Request — Missing required parameters.

Example​

curl "https://api.alpha-1edtech.ai/analytics/1.0/activity?studentId=22222222-2222-2222-2222-222222222222&startDate=2026-01-01&endDate=2026-01-31" \
-H "Authorization: Bearer <ACCESS_TOKEN>"

GET /analytics/1.0/enrollment​

Returns analytics across the student's enrollments. Identify the student via ?studentId= or ?email=. Optionally scope with a date range.

Either email or studentId must be provided.

Scope: events.readonly

Query params​

NameDescriptionRequired
emailStudent email address (provide email or studentId)no
studentIdStudent sourcedId (provide email or studentId)no
startDateStart of the date range (YYYY-MM-DD)no
endDateEnd of the date range (YYYY-MM-DD)no
timezoneIANA timezone for date bucketing (default UTC)no

Response​

200 OK — Enrollment analytics object with fields: enrollmentId, studentId, courseId, startDate, endDate, progress (lessonsCompleted, unitsMastered, xpEarned, accuracy, activeMinutes), daily.

400 Bad Request — Missing required parameters.

Example​

curl "https://api.alpha-1edtech.ai/analytics/1.0/enrollment?studentId=22222222-2222-2222-2222-222222222222" \
-H "Authorization: Bearer <ACCESS_TOKEN>"

GET /analytics/1.0/enrollment/:enrollmentId​

Returns analytics metrics for a specific enrollment. Optionally scoped to a date range.

Scope: events.readonly

Path params​

NameDescription
enrollmentIdEnrollment UUID

Query params​

NameDescriptionRequired
startDateStart of the date range (YYYY-MM-DD)no
endDateEnd of the date range (YYYY-MM-DD)no
timezoneIANA timezone for date bucketing (default UTC)no

Response​

200 OK — Enrollment analytics object with fields: enrollmentId, studentId, courseId, startDate, endDate, progress (lessonsCompleted, unitsMastered, xpEarned, accuracy, activeMinutes), daily.

400 Bad Request — Missing enrollmentId.

Example​

curl "https://api.alpha-1edtech.ai/analytics/1.0/enrollment/66666666-6666-6666-6666-666666666666?startDate=2026-01-01&endDate=2026-01-31" \
-H "Authorization: Bearer <ACCESS_TOKEN>"