Enrollments
API endpoints for getting or creating enrollments
Get all enrollments
List all enrollments
GET
https://your-platform-url.com/api/so2/v1/enrollments
Get all course enrollments for your instance
Headers
Access-Control-Request-Headers*
string
authorization
Authorization*
string
Bearer <auth_token>
Content-Type*
string
application/json
Get enrollments by course
List enrollments by course
GET
https://your-platform-url.com/api/so2/v1/enrollments?course_id={course_id}
Get course enrollments for a given course
Query Parameters
course_id
string
the course_id course-v1:org+num+session
Headers
Access-Control-Request-Headers*
string
authorization
Authorization*
string
Bearer <auth_token>
Content-Type*
string
application/json
Get enrollments by username
List enrollments by username
GET
https://your-platform-url.com/api/so2/v1/enrollments?username={username}
Get course enrollments for a given username
Query Parameters
username
string
Headers
Access-Control-Request-Headers*
string
authorization
Authorization*
string
Bearer <auth_token>
Content-Type*
string
application/json
Get enrollments by days
List enrollments by period
GET
https://your-platform-url.com/api/so2/v1/enrollments?days={days}
Get course enrollments for the last past days
Query Parameters
days
integer
Headers
Access-Control-Request-Headers*
string
authorization
Authorization*
string
Bearer <auth_token>
Content-Type*
string
application/json
Bulk enroll or unenroll users
Bulk enroll
POST
https://your-platform-url.com/api/bulk_enroll/v1/bulk_enroll/
This endpoint allows you enroll or unenroll users to one or several courses. Permissions needed : Be a course admin for the courses you want to enroll users to.
Headers
Access-Control-Request-Headers
string
Authorization
string
Bearer <auth_token>
Content-Type
string
application/json
Request Body
auto_enroll*
Boolean
true
email_students*
Boolean
true or false, set if you want to send email to notify users for enrollments
action*
String
enroll or unenroll
courses*
String
course_id separated with comma
cohorts*
String
cohorts name separated with comma
identifiers*
String
user email separated with comma
Dernière mise à jour