GET Get enrollment analytics
Retrieve comprehensive analytics and statistics for enrollments including completion rates, progress distributions, and time-series data
Retrieve comprehensive analytics and statistics for enrollments including completion rates, progress distributions, and time-series data
AuthorizationBearer <token>
Send API keys and access tokens as Authorization: Bearer .
In: header
Query Parameters
course_id?string
Filter analytics by specific course
Format
uuiduser_id?string
Filter analytics by specific user
Format
uuidperiod?string
Time period for analytics
Default
"30d"Value in
- "7d"
- "30d"
- "90d"
- "1y"
include_details?boolean
Include detailed time-series and top courses data
Default
falseResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/course-enrollments/analytics"{ "data": { "summary": { "total_enrollments": 0, "completed_enrollments": 0, "active_enrollments": 0, "withdrawn_enrollments": 0, "completion_rate": 0, "average_progress": 0, "avg_time_to_completion_days": 0 }, "distributions": { "status": { "enrolled": 0, "in_progress": 0, "completed": 0, "withdrawn": 0 }, "progress": { "0-25%": 0, "25-50%": 0, "50-75%": 0, "75-100%": 0 } }, "top_courses": [ { "course_id": "{course_id}", "title": "string", "category": "string", "enrollments": 0, "completed": 0, "completion_rate": 0, "avg_progress": 0 } ], "time_series": [ { "date": "2019-08-24", "enrollments": 0, "completions": 0 } ] }, "meta": { "period": "string", "start_date": "2019-08-24T14:15:22Z", "end_date": "2019-08-24T14:15:22Z", "course_id": "{course_id}", "user_id": "{user_id}", "include_details": true, "organization_id": "{organization_id}", "rls_validation": { "enforced": true, "organization_isolated": true } }}{ "error": "string", "code": "string", "message": "string"}{ "error": "string", "code": "string", "message": "string"}{ "error": "string", "code": "string", "message": "string"}{ "error": "string", "code": "string", "message": "string"}