GET /reports/scorm/:activityId/stats

GET /reports/scorm/:activityId/stats

GET /api/reports/scorm/[activityId]/stats - Get aggregate statistics for a SCORM activity Verify authentication with Clerk Get user's profile to determine role and tenant Verify user has access (instructor or admin) Verify the activity exists and is SCORM type Role-based access: instructors can only see their own courses Get all activity progress for this SCORM activity Calculate aggregate statistics Calculate average score Calculate average time spent (from tracking_data) Calculate average completion time (time from started_at to completed_at) Convert to seconds

Endpoint

GET /reports/scorm/:activityId/stats

Authentication

This endpoint requires authentication. Include your authentication token in the request headers.

Path Parameters

ParameterTypeDescription
activityIdstringPath parameter

Error Responses

Status CodeError CodeDescription
401HTTP_401Unauthorized
404HTTP_404Not Found
403HTTP_403Forbidden
404HTTP_404Not Found
400HTTP_400Bad Request
403HTTP_403Forbidden
500HTTP_500Internal Server Error
500HTTP_500Internal Server Error

Example Request

curl -X GET "https://api.allurelms.com/reports/scorm/activityId-value/stats" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"