List enrollments

Enrollments on one course with learner, group and completion status; filter by group, status and creation date.

GET https://cotlet.dev/api/v1/learnupon/courses/{course_id}/enrollments

read

Returns the enrollments of one course as the course Enrollments page shows them, a page at a time; pass next_cursor back as cursor. status filters Not Started or In Progress. group_id keeps one group. created_after keeps enrollments made on or after a date. Each row has the enrollment_id that set_enrollment_complete takes.

Parameters

Parameters: list_enrollments
NameTypeDescription
course_id string required string Course id from list_courses.
group_id string string Only learners in this group.
status enum enum not_started or in_progress. Leave out for all.
created_after date date Only enrollments created on or after this date.
cursor string string Next page cursor from the previous call.

Request

cURL
curl https://cotlet.dev/api/v1/learnupon/courses/course_8c41d2/enrollments \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("learnupon", "list_enrollments", {"course_id":"course_8c41d2"})
Node.js
const result = await cotlet.call('learnupon', 'list_enrollments', {"course_id":"course_8c41d2"});
CLI
cotlet call learnupon list_enrollments --data '{"course_id":"course_8c41d2"}'

Example response

JSON

{
  "enrollments": [
    {
      "enrollment_id": "90417",
      "user_id": "51872",
      "name": "Maria Nowak",
      "group": "Onboarding",
      "status": "In Progress"
    },
    {
      "enrollment_id": "90433",
      "user_id": "51890",
      "name": "Tom Reyes",
      "group": "Onboarding",
      "status": "Not Started"
    }
  ],
  "next_cursor": null
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.