LMS APIs#
The LMS currently has the following API Endpoints.
Note
Checkout How To Use the REST API to learn how to authenticate against these APIs
- GET /admin/enterprise/enterprisecatalogquery/{var}/preview/#
Render the response for a particular catalog query.
- Parameters:
var (string)
- Status Codes:
200 OK – No response body
- GET /api-admin/api/v1/api_access_request/#
Return API Access Requests in the form of a paginated list.
- Raises:
NotFound: Raised if user with username provided in GET parameters does not exist. PermissionDenied: Raised if username is provided in GET parameters but the requesting
user does not have access rights to filter results.
- Example:
GET: /api-admin/api/v1/api_access_request/ {
“count”: 1, “num_pages”: 1, “current_page”: 1, “results”: [
- {
“id”: 1, “created”: “2017-09-25T08:41:48.934364Z”, “modified”: “2017-09-25T08:42:04.185209Z”, “user”: 6, “status”: “denied”, “website”: “https://www.example.com/”, “reason”: “Example”, “company_name”: “Example Name”, “company_address”: “Silicon Valley”, “site”: 1, “contacted”: true
}
], “next”: null, “start”: 0, “previous”: null
}
- Query Parameters:
company_name (string)
contacted (boolean)
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
site__domain (string)
status (string) –
Status of this API access request
pending - Pending
denied - Denied
approved - Approved
user__username (string)
- Status Codes:
200 OK –
- GET /api/agreements/v1/agreement/#
Get all user agreements for this agreement type.
- Query Parameters:
agreement_type (array) – Agreement ID/Type
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
400 Bad Request – Bad Request
- GET /api/agreements/v1/agreement/{agreement_type}/#
Get the user agreement for this agreement type.
- Parameters:
agreement_type (string) – Agreement ID/Type
- Status Codes:
200 OK –
400 Bad Request – Bad Request
404 Not Found – Not Found
- GET /api/agreements/v1/agreement/{agreement_type}/text/#
Get the text of a user agreement by its type.
- Parameters:
agreement_type (string) – Agreement ID/Type
- Status Codes:
200 OK –
400 Bad Request – Bad Request
404 Not Found – Not Found
- GET /api/agreements/v1/agreement_record/{agreement_type}#
Get a user’s acknowledgement record for this agreement type.
- Parameters:
agreement_type (string) – Agreement ID/Type
- Status Codes:
200 OK –
400 Bad Request – Bad Request
404 Not Found – Not Found
- POST /api/agreements/v1/agreement_record/{agreement_type}#
Marks a user’s acknowledgement of this agreement type.
- Parameters:
agreement_type (string) – Agreement ID/Type
- Status Codes:
200 OK –
400 Bad Request – Bad Request
- GET /api/agreements/v1/integrity_signature/{course_id}#
In order to check whether the user has signed the integrity agreement for a given course.
- Should return the following:
username (str) course_id (str) created_at (str)
If a username is not given, it should default to the requesting user (or masqueraded user). Only staff should be able to access this endpoint for other users.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/agreements/v1/integrity_signature/{course_id}#
Create an integrity signature for the requesting user and course. If a signature already exists, returns the existing signature instead of creating a new one.
/api/agreements/v1/integrity_signature/{course_id}
- Example response:
- {
username: “janedoe”, course_id: “org.2/course_2/Run_2”, created_at: “2021-04-23T18:25:43.511Z”
}
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/agreements/v1/lti_pii_signature/{course_id}#
Create an LTI PII signature for the requesting user and course. If a signature already exists, returns the existing signature instead of creating a new one.
/api/agreements/v1/lti_pii_signature/{course_id}
- Example response:
- {
username: “janedoe”, course_id: “org.2/course_2/Run_2”, created_at: “2021-04-23T18:25:43.511Z”
}
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/authz/v1/assignments/#
Retrieve all user role assignments.
- Status Codes:
200 OK – No response body
- GET /api/authz/v1/orgs/#
API view for listing orgs This API is used on the filters functionality on the Admin Console.
Endpoints
GET: Retrieve all organizations
Query Parameters
search (Optional): Search term to filter organizations by name or short name
page (Optional): Page number for pagination
page_size (Optional): Number of items per page
Response Format
Returns a paginated list of organization objects, each containing:
id: The organization’s ID
name: The organization’s name
short_name: The organization’s short name
Results are limited to the orgs of the courses and libraries the requesting user has a role assignment in. Staff and superusers see every active org.
Authentication and Permissions
Requires authenticated user with either a content library or course view team permission.
Example Request
GET /api/authz/v1/orgs/?search=edx&page=1&page_size=10
Example Response:
{ "count": 1, "next": null, "previous": null, "results": [ { "id": 1, "created": "2026-04-02T19:30:36.779095Z", "modified": "2026-04-02T19:30:36.779095Z", "name": "OpenedX", "short_name": "OpenedX", "description": "", "logo": null, "active": true } ] }
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
search (string) – A search term.
- Status Codes:
200 OK –
- POST /api/authz/v1/permissions/validate/me#
Validate one or more permissions for the authenticated user.
- Status Codes:
200 OK – No response body
- GET /api/authz/v1/roles/#
Retrieve all roles and their permissions for a specific scope.
- Status Codes:
200 OK – No response body
- GET /api/authz/v1/roles/users/#
Retrieve all users with role assignments within a specific scope.
- Status Codes:
200 OK – No response body
- PUT /api/authz/v1/roles/users/#
Assign multiple users to a specific role within one or more scopes.
- Status Codes:
200 OK – No response body
- DELETE /api/authz/v1/roles/users/#
Remove multiple users from a specific role within a scope.
- Status Codes:
204 No Content – No response body
- GET /api/authz/v1/scopes/#
API view for listing scopes This API is used on the filters and assign roles functionality on the Admin Console.
Endpoints
GET: Retrieve all scopes
Query Parameters
search (Optional): Search term to filter scopes by display name
org (Optional): Filter scopes by org
orgs (Optional): Filter scopes by multiple orgs (comma separated list of orgs)
page (Optional): Page number for pagination
page_size (Optional): Number of items per page
scope_type (Optional): Filter scopes by type. Supported values are course and library.
- management_permission_only (Optional): Filter scopes either by only the ones to which the user has “manage team”
permissions (if true), or just “view team” permissions.
Response Format
Returns a paginated list of scope objects, each containing:
external_key: The scope external key
display_name: The scope’s name
org: The organization serialized object
Authentication and Permissions
Requires authenticated user with either a content library or course view team permission.
Example Request
GET /api/authz/v1/scopes/?search=edx&page=1&page_size=10
Example Response:
{ "count": 1, "next": null, "previous": null, "results": [ { "external_key": "course-v1:OpenedX+DemoX+DemoCourse", "display_name": "Open edX Demo Course", "org": { "id": 1, "created": "2026-04-02T19:30:36.779095Z", "modified": "2026-04-02T19:30:36.779095Z", "name": "OpenedX", "short_name": "OpenedX", "description": "", "logo": null, "active": true } }, ] }
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/authz/v1/users/#
Retrieve all users that have at least one assignment according to the filtering fields.
- Status Codes:
200 OK – No response body
- GET /api/authz/v1/users/{username}/assignments/#
Retrieve all user role assignments.
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- POST /api/authz/v1/users/validate/#
Validates the provided usernames or emails correspond to existing users.
- Status Codes:
200 OK – No response body
- GET /api/authz/v1/waffle-flag-states/#
Retrieve the enablement state of the course-authoring waffle flag across different scopes.
- Status Codes:
200 OK – No response body
- GET /api/bookmarks/v1/bookmarks/#
Get a paginated list of bookmarks for a user.
The list can be filtered by passing parameter “course_id=<course_id>” to only include bookmarks from a particular course.
The bookmarks are always sorted in descending order by creation date.
Each page in the list contains 10 bookmarks by default. The page size can be altered by passing parameter “page_size=<page_size>”.
To include the optional fields pass the values in “fields” parameter as a comma separated list. Possible values are:
“display_name”
“path”
Example Requests
GET /api/bookmarks/v1/bookmarks/?course_id={course_id1}&fields=display_name,path
- Query Parameters:
course_id (string) – The id of the course to limit the list
fields (string) – The fields to return: display_name, path.
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/bookmarks/v1/bookmarks/#
Create a new bookmark for a user.
The POST request only needs to contain one parameter “usage_id”.
Http400 is returned if the format of the request is not correct, the usage_id is invalid or a block corresponding to the usage_id could not be found.
Example Requests
POST /api/bookmarks/v1/bookmarks/ Request data: {“usage_id”: <usage-id>}
- Status Codes:
- GET /api/bookmarks/v1/bookmarks/{username},{usage_id}/#
Get a specific bookmark for a user.
Example Requests
GET /api/bookmarks/v1/bookmarks/{username},{usage_id}?fields=display_name,path
- Parameters:
usage_id (string)
username (string)
- Status Codes:
200 OK –
- DELETE /api/bookmarks/v1/bookmarks/{username},{usage_id}/#
DELETE /api/bookmarks/v1/bookmarks/{username},{usage_id}
- Parameters:
usage_id (string)
username (string)
- Status Codes:
204 No Content – No response body
- GET /api/certificates/v0/certificates/{username}/#
Get a paginated list of certificates for a user.
Use Case
Get the list of viewable course certificates for a specific user.
Example Request
GET /api/certificates/v0/certificates/{username}
GET Response Values
If the request for information about the user’s certificates is successful, an HTTP 200 “OK” response is returned.
The HTTP 200 response contains a list of dicts with the following keys/values.
username: A string representation of an user’s username passed in the request.
course_id: A string representation of a Course ID.
course_display_name: A string representation of the Course name.
course_organization: A string representation of the organization associated with the Course.
- certificate_type: A string representation of the certificate type.
Can be honor|verified|professional
created_date: Date/time the certificate was created, in ISO-8661 format.
status: A string representation of the certificate status.
is_passing: True if the certificate has a passing status, False if not.
download_url: A string representation of the certificate url.
grade: A string representation of a float for the user’s course grade.
Example GET Response
- [{
“username”: “bob”, “course_id”: “edX/DemoX/Demo_Course”, “certificate_type”: “verified”, “created_date”: “2015-12-03T13:14:28+0000”, “status”: “downloadable”, “is_passing”: true, “download_url”: “http://www.example.com/cert.pdf”, “grade”: “0.98”
}]
- Parameters:
username (string) – The users to get certificates for
- Status Codes:
200 OK – No response body
- GET /api/certificates/v0/certificates/{username}/courses/{course_id}/#
Retrieves certificate information for a user in a specified course run.
- Args:
request (Request): Django request object. username (string): URI element specifying the user’s username. course_id (string): URI element specifying the course location.
- Return:
A JSON serialized representation of the certificate.
- Parameters:
course_id (string)
username (string)
- Status Codes:
200 OK – No response body
- POST /api/change_email_settings#
Modify logged-in user’s setting for receiving emails from a course.
- Status Codes:
200 OK – No response body
- GET /api/cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}#
Endpoint to get either one or all cohorts.
- Parameters:
cohort_id (string)
course_key_string (string)
- Status Codes:
200 OK – No response body
- POST /api/cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}#
Endpoint to create a new cohort, must not include cohort_id.
- Parameters:
cohort_id (string)
course_key_string (string)
- Status Codes:
200 OK – No response body
- PATCH /api/cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}#
Endpoint to update a cohort name, assignment type, and/or content group association.
- Parameters:
cohort_id (string)
course_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}/users/{username}#
Lists the users in a specific cohort.
- Parameters:
cohort_id (string)
course_key_string (string)
username (string)
- Status Codes:
200 OK –
- POST /api/cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}/users/{username}#
Add given users to the cohort.
- Parameters:
cohort_id (string)
course_key_string (string)
username (string)
- Status Codes:
200 OK –
- DELETE /api/cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}/users/{username}#
Removes and user from a specific cohort.
Note: It’s better to use the post method to move users between cohorts.
- Parameters:
cohort_id (string)
course_key_string (string)
username (string)
- Status Codes:
204 No Content – No response body
- POST /api/cohorts/v1/courses/{course_key_string}/users#
View method that accepts an uploaded file (using key “uploaded-file”) containing cohort assignments for users. This method spawns a celery task to do the assignments, and a CSV file with results is provided via data downloads.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/cohorts/v1/settings/{course_key_string}#
Endpoint to fetch the course cohort settings.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- PUT /api/cohorts/v1/settings/{course_key_string}#
Endpoint to set the course cohort settings.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/cohorts/v2/courses/{course_id}/group_configurations#
List all content groups for a course.
- Parameters:
course_id (string) – The course key (e.g., course-v1:org+course+run)
- Status Codes:
200 OK – Successfully retrieved content groups
400 Bad Request – Invalid course key
401 Unauthorized – Authentication required
403 Forbidden – User does not have permission to access this course
404 Not Found – Course not found
- GET /api/cohorts/v2/courses/{course_id}/group_configurations/{configuration_id}#
Retrieve a specific content group configuration.
- Parameters:
configuration_id (integer) – The ID of the content group configuration
course_id (string) – The course key
- Status Codes:
200 OK – Content group configuration details
400 Bad Request – Invalid course key
401 Unauthorized – Authentication required
403 Forbidden – User does not have permission to access this course
404 Not Found – Content group configuration not found
- GET /api/commerce/v0/baskets/{basket_id}/order/#
HTTP handler.
- Parameters:
basket_id (string)
- Status Codes:
200 OK – No response body
- GET /api/commerce/v1/courses/{course_id}/#
Retrieve, update, or create courses/modes.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- PUT /api/commerce/v1/courses/{course_id}/#
Retrieve, update, or create courses/modes.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- PATCH /api/commerce/v1/courses/{course_id}/#
Retrieve, update, or create courses/modes.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- GET /api/commerce/v1/orders/{number}/#
HTTP handler.
- Parameters:
number (string)
- Status Codes:
200 OK – No response body
- POST /api/completion/v1/completion-batch#
Inserts a batch of completions.
REST Endpoint Format: ``` {
“username”: “username”, “course_key”: “course-key”, “blocks”: {
“block_key1”: 0.0, “block_key2”: 1.0, “block_key3”: 1.0,
}
}#
Returns
A Response object, with an appropriate status code.
If successful, status code is 200. ``` {
“detail” : _(“ok”)
}#
Otherwise, a 400 or 404 may be returned, and the “detail” content will explain the error.
- status 200:
No response body
- GET /api/completion/v1/subsection-completion/{username}/{course_key}/{subsection_id}#
Returns completion for a (user, subsection, course).
- Parameters:
course_key (string)
subsection_id (string)
username (string)
- Status Codes:
200 OK – No response body
- GET /api/course_experience/v1/course_deadlines_info/{course_key_string}#
Use Cases
Request course deadline info for mobile
Example Requests
GET api/course_experience/v1/course_deadlines_info/{course_key}
Response Values
Body consists of the following fields:
- dates_banner_info: (obj)
missed_deadlines: (bool) Whether the user has missed any graded content deadlines for the given course. missed_gated_content: (bool) Whether the user has missed any gated content for the given course. content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. verified_upgrade_link: (str) The URL to ecommerce IDA for purchasing the verified upgrade.
Returns
200 on success with above fields.
401 if the user is not authenticated.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- POST /api/course_experience/v1/reset_all_course_deadlines/#
Set the start_date of a schedule to today for all enrolled courses
- Request Parameters:
- research_event_data: any data that should be included in the research tracking event
Example: sending the location of where the reset deadlines banner (i.e. outline-tab)
- Returns:
success_course_keys: list of course keys for which deadlines were successfully reset failed_course_keys: list of course keys for which deadlines could not be reset
- Status Codes:
200 OK – No response body
- POST /api/course_experience/v1/reset_course_deadlines#
Set the start_date of a schedule to today, which in turn will adjust due dates for sequentials belonging to a self paced course
- Request Parameters:
course_key: course key research_event_data: any data that should be included in the research tracking event
Example: sending the location of where the reset deadlines banner (i.e. outline-tab)
IMPORTANT NOTE: If updates are happening to the logic here, ALSO UPDATE the reset_course_deadlines function in common/djangoapps/util/views.py as well.
- Status Codes:
200 OK – No response body
- GET /api/course_home/course_metadata/{course_key_string}#
Use Cases
Request Course metadata details for the Course Home MFE that every page needs.
Example Requests
GET api/course_home/v1/course_metadata/{course_key}
Response Values
Body consists of the following fields:
course_id: (str) The Course’s id (Course Run key) username: (str) The requesting (or masqueraded) user. Returns None for an
unauthenticated user.
is_enrolled: (bool) Indicates if the user is enrolled in the course is_self_paced: (bool) Indicates if the course is self paced is_staff: (bool) Indicates if the user is staff original_user_is_staff: (bool) Indicates if the original user has staff access
Used for when masquerading to distinguish between the original requesting user and the user being masqueraded as.
number: (str) The Course’s number org: (str) The Course’s organization tabs: List of Course Tabs to display. They are serialized as:
tab_id: (str) The tab’s id title: (str) The title of the tab to display url: (str) The url to view the tab
title: (str) The Course’s display title celebrations: (dict) a dict of celebration data user_timezone: (str) The timezone of the given user can_view_certificate: Flag to determine whether or not the learner can view their course certificate.
Returns
200 on success with above fields.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/course_home/dates/{course_key_string}#
Use Cases
Request details for the Dates Tab
Example Requests
GET api/course_home/v1/dates/{course_key}
Response Values
Body consists of the following fields:
- course_date_blocks: List of serialized DateSummary objects. Each serialization has the following fields:
- complete: (bool) Meant to only be used by assignments. Indicates completeness for an
assignment.
date: (datetime) The date time corresponding for the event date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) description: (str) The description for the date event learner_has_access: (bool) Indicates if the learner has access to the date event link: (str) An absolute link to content related to the date event
(ex. verified link or link to assignment)
title: (str) The title of the date event
- dates_banner_info: (obj)
content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. missed_deadlines: (bool) Indicates whether the user missed any graded content deadlines missed_gated_content: (bool) Indicates whether the user missed gated content verified_upgrade_link: (str) The link for upgrading to the Verified track in a course
has_ended: (bool) Indicates whether course has ended learner_is_full_access: (bool) Indicates if the user is verified in the course user_timezone: (str) The user’s preferred timezone
Returns
200 on success with above fields.
401 if the user is not authenticated.
403 if the user does not have access to the course.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
Get the visible course blocks (from course to vertical types) for the given course.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/course_home/outline/{course_key_string}#
Use Cases
Request details for the Outline Tab
Example Requests
GET api/course_home/v1/outline/{course_key}
Response Values
Body consists of two possible shapes.
For a good 200 response, the response will include:
- access_expiration: An object detailing when access to this course will expire
expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can’t upgrade anymore) upgrade_url: (str) Upgrade link (or None if can’t upgrade anymore)
- course_blocks:
- blocks: List of serialized Course Block objects. Each serialization has the following fields:
id: (str) The usage ID of the block. type: (str) The type of block. Possible values the names of any
XBlock type in the system, including custom blocks. Examples are course, chapter, sequential, vertical, html, problem, video, and discussion.
display_name: (str) The display name of the block. lms_web_url: (str) The URL to the navigational container of the
xBlock on the web LMS.
- children: (list) If the block has child blocks, a list of IDs of
the child blocks.
resume_block: (bool) Whether the block is the resume block has_scheduled_content: (bool) Whether the block has more content scheduled for the future
- course_goals:
- selected_goal:
days_per_week: (int) The number of days the learner wants to learn per week subscribed_to_reminders: (bool) Whether the learner wants email reminders about their goal
weekly_learning_goal_enabled: Flag indicating if this feature is enabled for this call
- course_tools: List of serialized Course Tool objects. Each serialization has the following fields:
analytics_id: (str) The unique id given to the tool. title: (str) The display title of the tool. url: (str) The link to access the tool.
- dates_banner_info: (obj)
content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. missed_deadlines: (bool) Whether the user has missed any graded content deadlines for the given course. missed_gated_content: (bool) Whether the user has missed any gated content for the given course. verified_upgrade_link: (str) The URL to ecommerce IDA for purchasing the verified upgrade.
- dates_widget:
- course_date_blocks: List of serialized Course Dates objects. Each serialization has the following fields:
complete: (bool) Meant to only be used by assignments. Indicates completeness for an assignment. date: (datetime) The date time corresponding for the event date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) description: (str) The description for the date event learner_has_access: (bool) Indicates if the learner has access to the date event link: (str) An absolute link to content related to the date event
(ex. verified link or link to assignment)
title: (str) The title of the date event
dates_tab_link: (str) The URL to the Dates Tab user_timezone: (str) The timezone of the given user
- enroll_alert:
can_enroll: (bool) Whether the user can enroll in the given course extra_text: (str)
enrollment_mode: (str) Current enrollment mode. Null if the user is not enrolled. handouts_html: (str) Raw HTML for the handouts section of the course info has_ended: (bool) Indicates whether course has ended offer: An object detailing upgrade discount information
code: (str) Checkout code expiration_date: (str) Expiration of offer, in ISO 8601 notation original_price: (str) Full upgrade price without checkout code; includes currency symbol discounted_price: (str) Upgrade price with checkout code; includes currency symbol percentage: (int) Amount of discount upgrade_url: (str) Checkout URL
- resume_course:
has_visited_course: (bool) Whether the user has ever visited the course url: (str) The display name of the course block to resume
welcome_message_html: (str) Raw HTML for the course updates banner user_has_passing_grade: (bool) Whether the user currently is passing the course
If the learner does not have access to the course for a specific reason and should be redirected this view will return a 403 and the following data:
url: (str) The URL to which the user should be redirected error_code: (str) A system identifier for the reason the user is being redirected developer_message: (str) A message explaining why the user is being redirected,
intended for developer debugging.
user_message: (str) A message explaining why the user is being redirected, intended to be shown to the user.
Returns
200 on success.
403 if the user does not currently have access to the course and should be redirected.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/course_home/progress/{course_key_string}#
Use Cases
Request details for the Progress Tab
Example Requests
GET api/course_home/v1/progress/{course_key} GET api/course_home/v1/progress/{course_key}/{student_id}/
Response Values
Body consists of the following fields:
- access_expiration: An object detailing when access to this course will expire
expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can’t upgrade anymore) upgrade_url: (str) Upgrade link (or None if can’t upgrade anymore)
- certificate_data: Object containing information about the user’s certificate status
- cert_status: (str) the status of a user’s certificate (full list of statuses are defined in
lms/djangoapps/certificates/models.py)
cert_web_view_url: (str) the url to view the certificate download_url: (str) the url to download the certificate
- completion_summary: Object containing unit completion counts with the following fields:
complete_count: (float) number of complete units incomplete_count: (float) number of incomplete units locked_count: (float) number of units where contains_gated_content is True
- course_grade: Object containing the following fields:
is_passing: (bool) whether the user’s grade is above the passing grade cutoff letter_grade: (str) the user’s letter grade based on the set grade range.
If user is passing, value may be ‘A’, ‘B’, ‘C’, ‘D’, ‘Pass’, otherwise none
percent: (float) the user’s total graded percent in the course
- credit_course_requirements: Object containing credit course requirements with the following fields:
- eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be
“eligible”, “not_eligible”, or “partial_eligible”
- requirements: List of requirements that must be fulfilled to be eligible to receive credit. See
get_credit_requirement_status for details on the fields
end: (date) end date of the course enrollment_mode: (str) a str representing the enrollment the user has (‘audit’, ‘verified’, …) grading_policy:
- assignment_policies: List of serialized assignment grading policy objects, each has the following fields:
- num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final
grade
short_label: (str) the abbreviated name given to the assignment type type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade
- grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they
range from just ‘Pass’, to a combination of ‘A’, ‘B’, ‘C’, and ‘D’. If a letter grade is present, ‘Pass’ is not included.
has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future section_scores: List of serialized Chapters. Each Chapter has the following fields:
display_name: (str) a str of what the name of the Chapter is for displaying on the site subsections: List of serialized Subsections, each has the following fields:
assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) block_key: (str) the key of the given subsection block display_name: (str) a str of what the name of the Subsection is for displaying on the site due: (str or None) the due date of the subsection in ISO 8601 format, or None if no due date is set has_graded_assignment: (bool) whether or not the Subsection is a graded assignment learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) num_points_earned: (int) the amount of points the user has earned for the given subsection num_points_possible: (int) the total amount of points possible for the given subsection override: Optional object if grade has been overridden by proctor or grading change
system: (str) either GRADING or PROCTORING reason: (str) a comment on the grading override
- percent_graded: (float) the percentage of total points the user has received a grade for in a given
subsection
- problem_scores: List of objects that represent individual problem scores with the following fields:
earned: (float) number of earned points possible: (float) number of possible points
- show_correctness: (str) a str representing whether to show the problem/practice scores based on due date
- (‘always’, ‘never’, ‘past_due’, values defined in
xmodule/modulestore/inheritance.py)
show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer
accessible to the learner due to a hide_after_due course team setting
studio_url: (str) a str of the link to the grading in studio for the course user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course username: (str) username of the student whose progress information is being displayed. verification_data: an object containing
link: (str) the link to either start or retry ID verification status: (str) the status of the ID verification status_date: (str) the date time string of when the ID verification status was set
Returns
200 on success with above fields.
401 if the user is not authenticated or not enrolled.
403 if the user does not have access to the course.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/course_home/progress/{course_key_string}/{student_id}#
Use Cases
Request details for the Progress Tab
Example Requests
GET api/course_home/v1/progress/{course_key} GET api/course_home/v1/progress/{course_key}/{student_id}/
Response Values
Body consists of the following fields:
- access_expiration: An object detailing when access to this course will expire
expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can’t upgrade anymore) upgrade_url: (str) Upgrade link (or None if can’t upgrade anymore)
- certificate_data: Object containing information about the user’s certificate status
- cert_status: (str) the status of a user’s certificate (full list of statuses are defined in
lms/djangoapps/certificates/models.py)
cert_web_view_url: (str) the url to view the certificate download_url: (str) the url to download the certificate
- completion_summary: Object containing unit completion counts with the following fields:
complete_count: (float) number of complete units incomplete_count: (float) number of incomplete units locked_count: (float) number of units where contains_gated_content is True
- course_grade: Object containing the following fields:
is_passing: (bool) whether the user’s grade is above the passing grade cutoff letter_grade: (str) the user’s letter grade based on the set grade range.
If user is passing, value may be ‘A’, ‘B’, ‘C’, ‘D’, ‘Pass’, otherwise none
percent: (float) the user’s total graded percent in the course
- credit_course_requirements: Object containing credit course requirements with the following fields:
- eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be
“eligible”, “not_eligible”, or “partial_eligible”
- requirements: List of requirements that must be fulfilled to be eligible to receive credit. See
get_credit_requirement_status for details on the fields
end: (date) end date of the course enrollment_mode: (str) a str representing the enrollment the user has (‘audit’, ‘verified’, …) grading_policy:
- assignment_policies: List of serialized assignment grading policy objects, each has the following fields:
- num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final
grade
short_label: (str) the abbreviated name given to the assignment type type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade
- grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they
range from just ‘Pass’, to a combination of ‘A’, ‘B’, ‘C’, and ‘D’. If a letter grade is present, ‘Pass’ is not included.
has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future section_scores: List of serialized Chapters. Each Chapter has the following fields:
display_name: (str) a str of what the name of the Chapter is for displaying on the site subsections: List of serialized Subsections, each has the following fields:
assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) block_key: (str) the key of the given subsection block display_name: (str) a str of what the name of the Subsection is for displaying on the site due: (str or None) the due date of the subsection in ISO 8601 format, or None if no due date is set has_graded_assignment: (bool) whether or not the Subsection is a graded assignment learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) num_points_earned: (int) the amount of points the user has earned for the given subsection num_points_possible: (int) the total amount of points possible for the given subsection override: Optional object if grade has been overridden by proctor or grading change
system: (str) either GRADING or PROCTORING reason: (str) a comment on the grading override
- percent_graded: (float) the percentage of total points the user has received a grade for in a given
subsection
- problem_scores: List of objects that represent individual problem scores with the following fields:
earned: (float) number of earned points possible: (float) number of possible points
- show_correctness: (str) a str representing whether to show the problem/practice scores based on due date
- (‘always’, ‘never’, ‘past_due’, values defined in
xmodule/modulestore/inheritance.py)
show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer
accessible to the learner due to a hide_after_due course team setting
studio_url: (str) a str of the link to the grading in studio for the course user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course username: (str) username of the student whose progress information is being displayed. verification_data: an object containing
link: (str) the link to either start or retry ID verification status: (str) the status of the ID verification status_date: (str) the date time string of when the ID verification status was set
Returns
200 on success with above fields.
401 if the user is not authenticated or not enrolled.
403 if the user does not have access to the course.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
student_id (string)
- Status Codes:
200 OK –
- POST /api/course_home/unsubscribe_from_course_goal/{token}#
API calls to unsubscribe from course goal reminders.
Note that this does not require authentication - this view may be hit from an email on a different device than normal or whatever. We should still be able to unsubscribe the user. Instead, we use a token in the email to validate that they have permission to unsubscribe.
This endpoint is very tightly scoped (only unsubscribe: no subscribing, no PII) because it is unauthenticated.
- Example Requests
POST api/course_home/v1/unsubscribe_from_course_goal/{token}
- Example Response Data
{‘course_title’: ‘Cats & Dogs In Canadian Media’}
Returns a 404 response if the token was not found. Otherwise, returns some basic course info. But no PII.
- Parameters:
token (string)
- Status Codes:
200 OK – No response body
- GET /api/course_home/v1/course_metadata/{course_key_string}#
Use Cases
Request Course metadata details for the Course Home MFE that every page needs.
Example Requests
GET api/course_home/v1/course_metadata/{course_key}
Response Values
Body consists of the following fields:
course_id: (str) The Course’s id (Course Run key) username: (str) The requesting (or masqueraded) user. Returns None for an
unauthenticated user.
is_enrolled: (bool) Indicates if the user is enrolled in the course is_self_paced: (bool) Indicates if the course is self paced is_staff: (bool) Indicates if the user is staff original_user_is_staff: (bool) Indicates if the original user has staff access
Used for when masquerading to distinguish between the original requesting user and the user being masqueraded as.
number: (str) The Course’s number org: (str) The Course’s organization tabs: List of Course Tabs to display. They are serialized as:
tab_id: (str) The tab’s id title: (str) The title of the tab to display url: (str) The url to view the tab
title: (str) The Course’s display title celebrations: (dict) a dict of celebration data user_timezone: (str) The timezone of the given user can_view_certificate: Flag to determine whether or not the learner can view their course certificate.
Returns
200 on success with above fields.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/course_home/v1/dates/{course_key_string}#
Use Cases
Request details for the Dates Tab
Example Requests
GET api/course_home/v1/dates/{course_key}
Response Values
Body consists of the following fields:
- course_date_blocks: List of serialized DateSummary objects. Each serialization has the following fields:
- complete: (bool) Meant to only be used by assignments. Indicates completeness for an
assignment.
date: (datetime) The date time corresponding for the event date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) description: (str) The description for the date event learner_has_access: (bool) Indicates if the learner has access to the date event link: (str) An absolute link to content related to the date event
(ex. verified link or link to assignment)
title: (str) The title of the date event
- dates_banner_info: (obj)
content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. missed_deadlines: (bool) Indicates whether the user missed any graded content deadlines missed_gated_content: (bool) Indicates whether the user missed gated content verified_upgrade_link: (str) The link for upgrading to the Verified track in a course
has_ended: (bool) Indicates whether course has ended learner_is_full_access: (bool) Indicates if the user is verified in the course user_timezone: (str) The user’s preferred timezone
Returns
200 on success with above fields.
401 if the user is not authenticated.
403 if the user does not have access to the course.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
Get the visible course blocks (from course to vertical types) for the given course.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/course_home/v1/outline/{course_key_string}#
Use Cases
Request details for the Outline Tab
Example Requests
GET api/course_home/v1/outline/{course_key}
Response Values
Body consists of two possible shapes.
For a good 200 response, the response will include:
- access_expiration: An object detailing when access to this course will expire
expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can’t upgrade anymore) upgrade_url: (str) Upgrade link (or None if can’t upgrade anymore)
- course_blocks:
- blocks: List of serialized Course Block objects. Each serialization has the following fields:
id: (str) The usage ID of the block. type: (str) The type of block. Possible values the names of any
XBlock type in the system, including custom blocks. Examples are course, chapter, sequential, vertical, html, problem, video, and discussion.
display_name: (str) The display name of the block. lms_web_url: (str) The URL to the navigational container of the
xBlock on the web LMS.
- children: (list) If the block has child blocks, a list of IDs of
the child blocks.
resume_block: (bool) Whether the block is the resume block has_scheduled_content: (bool) Whether the block has more content scheduled for the future
- course_goals:
- selected_goal:
days_per_week: (int) The number of days the learner wants to learn per week subscribed_to_reminders: (bool) Whether the learner wants email reminders about their goal
weekly_learning_goal_enabled: Flag indicating if this feature is enabled for this call
- course_tools: List of serialized Course Tool objects. Each serialization has the following fields:
analytics_id: (str) The unique id given to the tool. title: (str) The display title of the tool. url: (str) The link to access the tool.
- dates_banner_info: (obj)
content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. missed_deadlines: (bool) Whether the user has missed any graded content deadlines for the given course. missed_gated_content: (bool) Whether the user has missed any gated content for the given course. verified_upgrade_link: (str) The URL to ecommerce IDA for purchasing the verified upgrade.
- dates_widget:
- course_date_blocks: List of serialized Course Dates objects. Each serialization has the following fields:
complete: (bool) Meant to only be used by assignments. Indicates completeness for an assignment. date: (datetime) The date time corresponding for the event date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) description: (str) The description for the date event learner_has_access: (bool) Indicates if the learner has access to the date event link: (str) An absolute link to content related to the date event
(ex. verified link or link to assignment)
title: (str) The title of the date event
dates_tab_link: (str) The URL to the Dates Tab user_timezone: (str) The timezone of the given user
- enroll_alert:
can_enroll: (bool) Whether the user can enroll in the given course extra_text: (str)
enrollment_mode: (str) Current enrollment mode. Null if the user is not enrolled. handouts_html: (str) Raw HTML for the handouts section of the course info has_ended: (bool) Indicates whether course has ended offer: An object detailing upgrade discount information
code: (str) Checkout code expiration_date: (str) Expiration of offer, in ISO 8601 notation original_price: (str) Full upgrade price without checkout code; includes currency symbol discounted_price: (str) Upgrade price with checkout code; includes currency symbol percentage: (int) Amount of discount upgrade_url: (str) Checkout URL
- resume_course:
has_visited_course: (bool) Whether the user has ever visited the course url: (str) The display name of the course block to resume
welcome_message_html: (str) Raw HTML for the course updates banner user_has_passing_grade: (bool) Whether the user currently is passing the course
If the learner does not have access to the course for a specific reason and should be redirected this view will return a 403 and the following data:
url: (str) The URL to which the user should be redirected error_code: (str) A system identifier for the reason the user is being redirected developer_message: (str) A message explaining why the user is being redirected,
intended for developer debugging.
user_message: (str) A message explaining why the user is being redirected, intended to be shown to the user.
Returns
200 on success.
403 if the user does not currently have access to the course and should be redirected.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/course_home/v1/progress/{course_key_string}#
Use Cases
Request details for the Progress Tab
Example Requests
GET api/course_home/v1/progress/{course_key} GET api/course_home/v1/progress/{course_key}/{student_id}/
Response Values
Body consists of the following fields:
- access_expiration: An object detailing when access to this course will expire
expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can’t upgrade anymore) upgrade_url: (str) Upgrade link (or None if can’t upgrade anymore)
- certificate_data: Object containing information about the user’s certificate status
- cert_status: (str) the status of a user’s certificate (full list of statuses are defined in
lms/djangoapps/certificates/models.py)
cert_web_view_url: (str) the url to view the certificate download_url: (str) the url to download the certificate
- completion_summary: Object containing unit completion counts with the following fields:
complete_count: (float) number of complete units incomplete_count: (float) number of incomplete units locked_count: (float) number of units where contains_gated_content is True
- course_grade: Object containing the following fields:
is_passing: (bool) whether the user’s grade is above the passing grade cutoff letter_grade: (str) the user’s letter grade based on the set grade range.
If user is passing, value may be ‘A’, ‘B’, ‘C’, ‘D’, ‘Pass’, otherwise none
percent: (float) the user’s total graded percent in the course
- credit_course_requirements: Object containing credit course requirements with the following fields:
- eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be
“eligible”, “not_eligible”, or “partial_eligible”
- requirements: List of requirements that must be fulfilled to be eligible to receive credit. See
get_credit_requirement_status for details on the fields
end: (date) end date of the course enrollment_mode: (str) a str representing the enrollment the user has (‘audit’, ‘verified’, …) grading_policy:
- assignment_policies: List of serialized assignment grading policy objects, each has the following fields:
- num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final
grade
short_label: (str) the abbreviated name given to the assignment type type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade
- grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they
range from just ‘Pass’, to a combination of ‘A’, ‘B’, ‘C’, and ‘D’. If a letter grade is present, ‘Pass’ is not included.
has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future section_scores: List of serialized Chapters. Each Chapter has the following fields:
display_name: (str) a str of what the name of the Chapter is for displaying on the site subsections: List of serialized Subsections, each has the following fields:
assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) block_key: (str) the key of the given subsection block display_name: (str) a str of what the name of the Subsection is for displaying on the site due: (str or None) the due date of the subsection in ISO 8601 format, or None if no due date is set has_graded_assignment: (bool) whether or not the Subsection is a graded assignment learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) num_points_earned: (int) the amount of points the user has earned for the given subsection num_points_possible: (int) the total amount of points possible for the given subsection override: Optional object if grade has been overridden by proctor or grading change
system: (str) either GRADING or PROCTORING reason: (str) a comment on the grading override
- percent_graded: (float) the percentage of total points the user has received a grade for in a given
subsection
- problem_scores: List of objects that represent individual problem scores with the following fields:
earned: (float) number of earned points possible: (float) number of possible points
- show_correctness: (str) a str representing whether to show the problem/practice scores based on due date
- (‘always’, ‘never’, ‘past_due’, values defined in
xmodule/modulestore/inheritance.py)
show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer
accessible to the learner due to a hide_after_due course team setting
studio_url: (str) a str of the link to the grading in studio for the course user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course username: (str) username of the student whose progress information is being displayed. verification_data: an object containing
link: (str) the link to either start or retry ID verification status: (str) the status of the ID verification status_date: (str) the date time string of when the ID verification status was set
Returns
200 on success with above fields.
401 if the user is not authenticated or not enrolled.
403 if the user does not have access to the course.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/course_home/v1/progress/{course_key_string}/{student_id}#
Use Cases
Request details for the Progress Tab
Example Requests
GET api/course_home/v1/progress/{course_key} GET api/course_home/v1/progress/{course_key}/{student_id}/
Response Values
Body consists of the following fields:
- access_expiration: An object detailing when access to this course will expire
expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can’t upgrade anymore) upgrade_url: (str) Upgrade link (or None if can’t upgrade anymore)
- certificate_data: Object containing information about the user’s certificate status
- cert_status: (str) the status of a user’s certificate (full list of statuses are defined in
lms/djangoapps/certificates/models.py)
cert_web_view_url: (str) the url to view the certificate download_url: (str) the url to download the certificate
- completion_summary: Object containing unit completion counts with the following fields:
complete_count: (float) number of complete units incomplete_count: (float) number of incomplete units locked_count: (float) number of units where contains_gated_content is True
- course_grade: Object containing the following fields:
is_passing: (bool) whether the user’s grade is above the passing grade cutoff letter_grade: (str) the user’s letter grade based on the set grade range.
If user is passing, value may be ‘A’, ‘B’, ‘C’, ‘D’, ‘Pass’, otherwise none
percent: (float) the user’s total graded percent in the course
- credit_course_requirements: Object containing credit course requirements with the following fields:
- eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be
“eligible”, “not_eligible”, or “partial_eligible”
- requirements: List of requirements that must be fulfilled to be eligible to receive credit. See
get_credit_requirement_status for details on the fields
end: (date) end date of the course enrollment_mode: (str) a str representing the enrollment the user has (‘audit’, ‘verified’, …) grading_policy:
- assignment_policies: List of serialized assignment grading policy objects, each has the following fields:
- num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final
grade
short_label: (str) the abbreviated name given to the assignment type type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade
- grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they
range from just ‘Pass’, to a combination of ‘A’, ‘B’, ‘C’, and ‘D’. If a letter grade is present, ‘Pass’ is not included.
has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future section_scores: List of serialized Chapters. Each Chapter has the following fields:
display_name: (str) a str of what the name of the Chapter is for displaying on the site subsections: List of serialized Subsections, each has the following fields:
assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) block_key: (str) the key of the given subsection block display_name: (str) a str of what the name of the Subsection is for displaying on the site due: (str or None) the due date of the subsection in ISO 8601 format, or None if no due date is set has_graded_assignment: (bool) whether or not the Subsection is a graded assignment learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) num_points_earned: (int) the amount of points the user has earned for the given subsection num_points_possible: (int) the total amount of points possible for the given subsection override: Optional object if grade has been overridden by proctor or grading change
system: (str) either GRADING or PROCTORING reason: (str) a comment on the grading override
- percent_graded: (float) the percentage of total points the user has received a grade for in a given
subsection
- problem_scores: List of objects that represent individual problem scores with the following fields:
earned: (float) number of earned points possible: (float) number of possible points
- show_correctness: (str) a str representing whether to show the problem/practice scores based on due date
- (‘always’, ‘never’, ‘past_due’, values defined in
xmodule/modulestore/inheritance.py)
show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer
accessible to the learner due to a hide_after_due course team setting
studio_url: (str) a str of the link to the grading in studio for the course user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course username: (str) username of the student whose progress information is being displayed. verification_data: an object containing
link: (str) the link to either start or retry ID verification status: (str) the status of the ID verification status_date: (str) the date time string of when the ID verification status was set
Returns
200 on success with above fields.
401 if the user is not authenticated or not enrolled.
403 if the user does not have access to the course.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
student_id (string)
- Status Codes:
200 OK –
- POST /api/course_home/v1/unsubscribe_from_course_goal/{token}#
API calls to unsubscribe from course goal reminders.
Note that this does not require authentication - this view may be hit from an email on a different device than normal or whatever. We should still be able to unsubscribe the user. Instead, we use a token in the email to validate that they have permission to unsubscribe.
This endpoint is very tightly scoped (only unsubscribe: no subscribing, no PII) because it is unauthenticated.
- Example Requests
POST api/course_home/v1/unsubscribe_from_course_goal/{token}
- Example Response Data
{‘course_title’: ‘Cats & Dogs In Canadian Media’}
Returns a 404 response if the token was not found. Otherwise, returns some basic course info. But no PII.
- Parameters:
token (string)
- Status Codes:
200 OK – No response body
- GET /api/course_live/course/{course_id}/#
Handle HTTP/GET requests
- Parameters:
course_id (string) – The course for which to get provider list
- Status Codes:
200 OK –
401 Unauthorized – The requester is not authenticated.
403 Forbidden – The requester cannot access the specified course.
404 Not Found – The requested course does not exist.
- POST /api/course_live/course/{course_id}/#
Handle HTTP/POST requests
- Parameters:
course_id (string) – The course for which to get provider list
lti_1p1_client_key (string) – The LTI provider’s client key
lti_1p1_client_secret (string) – The LTI provider’s client secretL
lti_1p1_launch_url (string) – The LTI provider’s launch URL
provider_type (string) – The LTI provider’s launch URL
- Query Parameters:
lti_config (object) – The lti_config object with required additional parameters
- Status Codes:
200 OK –
400 Bad Request – Required parameters are missing.
401 Unauthorized – The requester is not authenticated.
403 Forbidden – The requester cannot access the specified course.
404 Not Found – The requested course does not exist.
- GET /api/course_live/iframe/{course_id}/#
Handle HTTP/GET requests
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/course_live/providers/{course_id}/#
A view for retrieving Program live IFrame .
Path:
api/course_live/providers/{course_id}/Accepts: [GET]
GET#
- Returns
200: Returns list of providers with active provider,
401: The requester is not authenticated.
403: The requester cannot access the specified course.
404: The requested course does not exist.
Response
In the case of a 200 response code, the response will be available live providers.
Example
- {
- “providers”: {
“active”: “zoom”, “available”: {
- ‘zoom’: {
‘name’: ‘Zoom LTI PRO’, ‘features’: []
}
}
}
}
- param string course_id:
- status 200:
No response body
- GET /api/course_modes/v1/courses/{course_id}/#
View to list or create course modes for a course.
Use Case
List all course modes for a course, or create a new course mode.
Example Requests
GET /api/course_modes/v1/courses/{course_id}/
Returns a list of all existing course modes for a course.
POST /api/course_modes/v1/courses/{course_id}/
Creates a new course mode in a course.
Response Values
For each HTTP verb below, an HTTP 404 “Not Found” response is returned if the requested course id does not exist.
GET: If the request is successful, an HTTP 200 “OK” response is returned along with a list of course mode dictionaries within a course. The details are contained in a JSON dictionary as follows:
course_id: The course identifier.
mode_slug: The short name for the course mode.
mode_display_name: The verbose name for the course mode.
min_price: The minimum price for which a user can enroll in this mode.
currency: The currency of the listed prices.
expiration_datetime: The date and time after which users cannot enroll in the course in this mode (not required for POST).
expiration_datetime_is_explicit: Whether the expiration_datetime field was explicitly set (not required for POST).
description: A description of this mode (not required for POST).
sku: The SKU for this mode (for ecommerce purposes, not required for POST).
bulk_sku: The bulk SKU for this mode (for ecommerce purposes, not required for POST).
POST: If the request is successful, an HTTP 201 “Created” response is returned.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /api/course_modes/v1/courses/{course_id}/#
View to list or create course modes for a course.
Use Case
List all course modes for a course, or create a new course mode.
Example Requests
GET /api/course_modes/v1/courses/{course_id}/
Returns a list of all existing course modes for a course.
POST /api/course_modes/v1/courses/{course_id}/
Creates a new course mode in a course.
Response Values
For each HTTP verb below, an HTTP 404 “Not Found” response is returned if the requested course id does not exist.
GET: If the request is successful, an HTTP 200 “OK” response is returned along with a list of course mode dictionaries within a course. The details are contained in a JSON dictionary as follows:
course_id: The course identifier.
mode_slug: The short name for the course mode.
mode_display_name: The verbose name for the course mode.
min_price: The minimum price for which a user can enroll in this mode.
currency: The currency of the listed prices.
expiration_datetime: The date and time after which users cannot enroll in the course in this mode (not required for POST).
expiration_datetime_is_explicit: Whether the expiration_datetime field was explicitly set (not required for POST).
description: A description of this mode (not required for POST).
sku: The SKU for this mode (for ecommerce purposes, not required for POST).
bulk_sku: The bulk SKU for this mode (for ecommerce purposes, not required for POST).
POST: If the request is successful, an HTTP 201 “Created” response is returned.
- Parameters:
course_id (string)
- Status Codes:
- GET /api/course_modes/v1/courses/{course_id}/{mode_slug}#
View to retrieve, update, or delete a specific course mode for a course.
Use Case
Get or update course mode details for a specific course mode on a course. Or you may delete a specific course mode from a course.
Example Requests
GET /api/course_modes/v1/courses/{course_id}/{mode_slug}
Returns details on an existing course mode for a course.
PATCH /api/course_modes/v1/courses/{course_id}/{mode_slug}
Updates (via merge) details of an existing course mode for a course.
DELETE /api/course_modes/v1/courses/{course_id}/{mode_slug}
Deletes an existing course mode for a course.
Response Values
For each HTTP verb below, an HTTP 404 “Not Found” response is returned if the requested course id does not exist, or the mode slug does not exist within the course.
GET: If the request is successful, an HTTP 200 “OK” response is returned along with a details for a single course mode within a course. The details are contained in a JSON dictionary as follows:
course_id: The course identifier.
mode_slug: The short name for the course mode.
mode_display_name: The verbose name for the course mode.
min_price: The minimum price for which a user can enroll in this mode.
currency: The currency of the listed prices.
expiration_datetime: The date and time after which users cannot enroll in the course in this mode (not required for PATCH).
expiration_datetime_is_explicit: Whether the expiration_datetime field was explicitly set (not required for PATCH).
description: A description of this mode (not required for PATCH).
sku: The SKU for this mode (for ecommerce purposes, not required for PATCH).
bulk_sku: The bulk SKU for this mode (for ecommerce purposes, not required for PATCH).
PATCH: If the request is successful, an HTTP 204 “No Content” response is returned. If “application/merge-patch+json” is not the specified content type, a 415 “Unsupported Media Type” response is returned.
DELETE: If the request is successful, an HTTP 204 “No Content” response is returned.
- Parameters:
course_id (string)
mode_slug (string)
- Status Codes:
200 OK –
- PATCH /api/course_modes/v1/courses/{course_id}/{mode_slug}#
Performs a partial update of a CourseMode instance.
- Parameters:
course_id (string)
mode_slug (string)
- Status Codes:
200 OK –
- DELETE /api/course_modes/v1/courses/{course_id}/{mode_slug}#
View to retrieve, update, or delete a specific course mode for a course.
Use Case
Get or update course mode details for a specific course mode on a course. Or you may delete a specific course mode from a course.
Example Requests
GET /api/course_modes/v1/courses/{course_id}/{mode_slug}
Returns details on an existing course mode for a course.
PATCH /api/course_modes/v1/courses/{course_id}/{mode_slug}
Updates (via merge) details of an existing course mode for a course.
DELETE /api/course_modes/v1/courses/{course_id}/{mode_slug}
Deletes an existing course mode for a course.
Response Values
For each HTTP verb below, an HTTP 404 “Not Found” response is returned if the requested course id does not exist, or the mode slug does not exist within the course.
GET: If the request is successful, an HTTP 200 “OK” response is returned along with a details for a single course mode within a course. The details are contained in a JSON dictionary as follows:
course_id: The course identifier.
mode_slug: The short name for the course mode.
mode_display_name: The verbose name for the course mode.
min_price: The minimum price for which a user can enroll in this mode.
currency: The currency of the listed prices.
expiration_datetime: The date and time after which users cannot enroll in the course in this mode (not required for PATCH).
expiration_datetime_is_explicit: Whether the expiration_datetime field was explicitly set (not required for PATCH).
description: A description of this mode (not required for PATCH).
sku: The SKU for this mode (for ecommerce purposes, not required for PATCH).
bulk_sku: The bulk SKU for this mode (for ecommerce purposes, not required for PATCH).
PATCH: If the request is successful, an HTTP 204 “No Content” response is returned. If “application/merge-patch+json” is not the specified content type, a 415 “Unsupported Media Type” response is returned.
DELETE: If the request is successful, an HTTP 204 “No Content” response is returned.
- Parameters:
course_id (string)
mode_slug (string)
- Status Codes:
204 No Content – No response body
- GET /api/courses/v1/block_metadata/{usage_key_string}#
Use Case
Returns the block metadata. Data like index_dictionary related to a block should be fetched using this API, because they are too large for the cache used by the course blocks/transformers API.
Example requests:
- GET /api/courses/v1/block_metadata/<usage_id>/?
&include=index_dictionary
Parameters:
“include”: a comma-separated list of keys to include. Valid keys are “index_dictionary”.
Response Values
A dictionary containing: * id (string): Block usage_key_str. * type (string) Block type. * index_dictionary: (dict) The index_dictionary JSON data
(usually this is the text content of the block, for search indexing or other purposes) for this block. Returned only if the “index_dictionary” is included in the “include” parameter.
- Parameters:
usage_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/courses/v1/blocks/#
Use Case
Returns the blocks in the course according to the requesting user’s access level.
Example requests:
GET /api/courses/v1/blocks/?course_id=<course_id> GET /api/courses/v1/blocks/?course_id=<course_id>
&username=anjali &depth=all &requested_fields=graded,format,student_view_multi_device,lti_url &block_counts=video &student_view_data=video &block_types_filter=problem,html
Parameters:
This view redirects to /api/courses/v1/blocks/<root_usage_key>/ for the root usage key of the course specified by course_id. The view accepts all parameters accepted by
BlocksView, plus the following required parametercourse_id: (string, required) The ID of the course whose block data we want to return
Response Values
Responses are identical to those returned by
BlocksViewwhen passed the root_usage_key of the requested course.If the course_id is not supplied, a 400: Bad Request is returned, with a message indicating that course_id is required.
If an invalid course_id is supplied, a 400: Bad Request is returned, with a message indicating that the course_id is not valid.
- Status Codes:
200 OK – No response body
- GET /api/courses/v1/blocks/{usage_key_string}#
Use Case
Returns the blocks within the requested block tree according to the requesting user’s access level.
Example requests:
GET /api/courses/v1/blocks/<root_block_usage_id>/?depth=all GET /api/courses/v1/blocks/<usage_id>/?
username=anjali &depth=all &requested_fields=graded,format,student_view_multi_device,lti_url,due &block_counts=video &student_view_data=video &block_types_filter=problem,html
Parameters:
all_blocks: (boolean) Provide a value of “true” to return all blocks. Returns all blocks only if the requesting user has course staff permissions. Blocks that are visible only to specific learners (for example, based on group membership or randomized content) are all included. If all_blocks is not specified, you must specify the username for the user whose course blocks are requested.
username: (string) Required, unless
all_blocksis specified. Specify the username for the user whose course blocks are requested. A blank/empty username can be used to request the blocks accessible to anonymous users (for public courses). Only users with course staff permissions can specify other users’ usernames. If a username is specified, results include blocks that are visible to that user, including those based on group or cohort membership or randomized content assigned to that user.- Example: username=anjali
username=’’ username
student_view_data: (list) Indicates for which block types to return student_view_data.
Example: student_view_data=video
block_counts: (list) Indicates for which block types to return the aggregate count of the blocks.
Example: block_counts=video,problem
requested_fields: (list) Indicates which additional fields to return for each block. For a list of available fields see under Response Values -> blocks, below.
The following fields are always returned: id, type, display_name
Example: requested_fields=graded,format,student_view_multi_device
depth: (integer or all) Indicates how deep to traverse into the blocks hierarchy. A value of all means the entire hierarchy.
Default is 0
Example: depth=all
nav_depth: (integer)
WARNING: nav_depth is not supported, and may be removed at any time.
Indicates how far deep to traverse into the course hierarchy before bundling all the descendants.
Default is 3 since typical navigational views of the course show a maximum of chapter->sequential->vertical.
Example: nav_depth=3
return_type (string) Indicates in what data type to return the blocks.
Default is dict. Supported values are: dict, list
Example: return_type=dict
block_types_filter: (list) Requested types of blocks used to filter the final result of returned blocks. Possible values include sequential, vertical, html, problem, video, and discussion.
Example: block_types_filter=vertical,html
Response Values
The following fields are returned with a successful response.
root: The ID of the root node of the requested course block structure.
blocks: A dictionary or list, based on the value of the “return_type” parameter. Maps block usage IDs to a collection of information about each block. Each block contains the following fields.
id: (string) The usage ID of the block.
type: (string) The type of block. Possible values the names of any XBlock type in the system, including custom blocks. Examples are course, chapter, sequential, vertical, html, problem, video, and discussion.
display_name: (string) The display name of the block.
children: (list) If the block has child blocks, a list of IDs of the child blocks. Returned only if “children” is included in the “requested_fields” parameter.
completion: (float or None) The level of completion of the block. Its value can vary between 0.0 and 1.0 or be equal to None if block is not completable. Returned only if “completion” is included in the “requested_fields” parameter.
block_counts: (dict) For each block type specified in the block_counts parameter to the endpoint, the aggregate number of blocks of that type for this block and all of its descendants.
graded (boolean) Whether or not the block or any of its descendants is graded. Returned only if “graded” is included in the “requested_fields” parameter.
format: (string) The assignment type of the block. Possible values can be “Homework”, “Lab”, “Midterm Exam”, and “Final Exam”. Returned only if “format” is included in the “requested_fields” parameter.
student_view_data: (dict) The JSON data for this block. Returned only if the “student_view_data” input parameter contains this block’s type.
student_view_url: (string) The URL to retrieve the HTML rendering of this block’s student view. The HTML could include CSS and Javascript code. This field can be used in combination with the student_view_multi_device field to decide whether to display this content to the user.
This URL can be used as a fallback if the student_view_data for this block type is not supported by the client or the block.
student_view_multi_device: (boolean) Whether or not the HTML of the student view that is rendered at “student_view_url” supports responsive web layouts, touch-based inputs, and interactive state management for a variety of device sizes and types, including mobile and touch devices. Returned only if “student_view_multi_device” is included in the “requested_fields” parameter.
lms_web_url: (string) The URL to the navigational container of the xBlock on the web. This URL can be used as a further fallback if the student_view_url and the student_view_data fields are not supported. Will direct to either the “New” (micro-frontend) or “Legacy” (Django-template-rendered) frontend experience depending on which experience is active.
legacy_web_url: (string) Like lms_web_url, but always directs to the “Legacy” frontend experience. Should only be used for transitional purposes; will be removed as part of DEPR-109.
lti_url: The block URL for an LTI consumer. Returned only if the “ENABLE_LTI_PROVIDER” Django settign is set to “True”.
due: The due date of the block. Returned only if “due” is included in the “requested_fields” parameter.
show_correctness: Whether to show scores/correctness to learners for the current sequence or problem. Returned only if “show_correctness” is included in the “requested_fields” parameter.
Additional XBlock fields can be included in the response if they are configured via the COURSE_BLOCKS_API_EXTRA_FIELDS Django setting and requested via the “requested_fields” parameter.
- Parameters:
usage_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/courses/v1/course_ids/#
Use Cases
Request a list of course IDs for all courses the specified user can access based on the provided parameters.
Example Requests
GET /api/courses/v1/courses_ids/
Response Values
Body comprises a list of course ids and pagination details.
Parameters
- username (optional):
The username of the specified user whose visible courses we want to see.
- role (required):
Course ids are filtered such that only those for which the user has the specified role are returned. Role can be “staff” or “instructor”. Case-insensitive.
Returns
200 on success, with a list of course ids and pagination details
400 if an invalid parameter was sent or the username was not provided for an authenticated request.
403 if a user who does not have permission to masquerade as another user who specifies a username other than their own.
404 if the specified user does not exist, or the requesting user does not have permission to view their courses.
Example response:
- {
- “results”:
- [
“course-v1:edX+DemoX+Demo_Course”
],
- “pagination”: {
“previous”: null, “num_pages”: 1, “next”: null, “count”: 1
}
}
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/courses/v1/courses/#
Use Cases
Request information on all courses visible to the specified user.
Example Requests
GET /api/courses/v1/courses/ POST /api/courses/v1/courses/
Response Values
Body comprises a list of objects as returned by CourseDetailView.
Parameters
- search_term (optional):
Search term to filter courses (used by ElasticSearch).
- username (optional):
The username of the specified user whose visible courses we want to see. The username is not required only if the API is requested by an Anonymous user.
- org (optional):
If specified, visible CourseOverview objects are filtered such that only those belonging to the organization with the provided org code (e.g., “HarvardX”) are returned. Case-insensitive.
- permissions (optional):
If specified, it filters visible CourseOverview objects by checking if each permission specified is granted for the username. Notice that Staff users are always granted permission to list any course.
- active_only (optional):
If this boolean is specified, only the courses that have not ended or do not have any end date are returned. This is different from search_term because this filtering is done on CourseOverview and not ElasticSearch.
- course_keys (optional):
If specified, it fetches the CourseOverview objects for the the specified course keys
- mobile_search (bool):
Optional parameter that limits the number of returned courses to MOBILE_SEARCH_COURSE_LIMIT.
Returns
200 on success, with a list of course discovery objects as returned by CourseDetailView.
400 if an invalid parameter was sent or the username was not provided for an authenticated request.
403 if a user who does not have permission to masquerade as another user specifies a username other than their own.
404 if the specified user does not exist, or the requesting user does not have permission to view their courses.
Example response:
- [
- {
“blocks_url”: “/api/courses/v1/blocks/?course_id=edX%2Fexample%2F2012_Fall”, “media”: {
- “course_image”: {
“uri”: “/c4x/edX/example/asset/just_a_test.jpg”, “name”: “Course Image”
}
}, “description”: “An example course.”, “end”: “2015-09-19T18:00:00Z”, “enrollment_end”: “2015-07-15T00:00:00Z”, “enrollment_start”: “2015-06-15T00:00:00Z”, “course_id”: “edX/example/2012_Fall”, “name”: “Example Course”, “number”: “example”, “org”: “edX”, “start”: “2015-07-17T12:00:00Z”, “start_display”: “July 17, 2015”, “start_type”: “timestamp”
}
]
Note
The POST /api/courses/v1/courses/ reads request.body for parameters, allowing for larger input than the query string.
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/courses/v1/courses/{course_key_string}#
Use Cases
Request details for a course
Example Requests
GET /api/courses/v1/courses/{course_key}/
Response Values
Body consists of the following fields:
- effort: A textual description of the weekly hours of effort expected
in the course.
end: Date the course ends, in ISO 8601 notation
enrollment_end: Date enrollment ends, in ISO 8601 notation
enrollment_start: Date enrollment begins, in ISO 8601 notation
- id: A unique identifier of the course; a serialized representation
of the opaque key identifying the course.
- media: An object that contains named media items. Included here:
course_image: An image to show for the course. Represented as an object with the following fields:
uri: The location of the image
name: Name of the course
number: Catalog number of the course
org: Name of the organization that owns the course
- overview: A possibly verbose HTML textual description of the course.
Note: this field is only included in the Course Detail view, not the Course List view.
short_description: A textual description of the course
start: Date the course begins, in ISO 8601 notation
start_display: Readably formatted start of the course
- start_type: Hint describing how start_display is set. One of:
“string”: manually set by the course author
“timestamp”: generated from the start timestamp
“empty”: no start date is specified
pacing: Course pacing. Possible values: instructor, self
- certificate_available_date (optional): Date the certificate will be available,
in ISO 8601 notation if the certificates.auto_certificate_generation waffle switch is enabled
Deprecated fields:
blocks_url: Used to fetch the course blocks
course_id: Course key (use ‘id’ instead)
Parameters:
- username (optional):
The username of the specified user for whom the course data is being accessed. The username is not only required if the API is requested by an Anonymous user.
Returns
200 on success with above fields.
400 if an invalid parameter was sent or the username was not provided for an authenticated request.
403 if a user who does not have permission to masquerade as another user specifies a username other than their own.
404 if the course is not available or cannot be seen.
Example response:
- {
“blocks_url”: “/api/courses/v1/blocks/?course_id=edX%2Fexample%2F2012_Fall”, “media”: {
- “course_image”: {
“uri”: “/c4x/edX/example/asset/just_a_test.jpg”, “name”: “Course Image”
}
}, “description”: “An example course.”, “end”: “2015-09-19T18:00:00Z”, “enrollment_end”: “2015-07-15T00:00:00Z”, “enrollment_start”: “2015-06-15T00:00:00Z”, “course_id”: “edX/example/2012_Fall”, “name”: “Example Course”, “number”: “example”, “org”: “edX”, “overview: “<p>A verbose description of the course.</p>” “start”: “2015-07-17T12:00:00Z”, “start_display”: “July 17, 2015”, “start_type”: “timestamp”, “pacing”: “instructor”, “certificate_available_date”: “2015-08-14T00:00:00Z”
}
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/courses/v2/block_metadata/{usage_key_string}#
Use Case
Returns the block metadata. Data like index_dictionary related to a block should be fetched using this API, because they are too large for the cache used by the course blocks/transformers API.
Example requests:
- GET /api/courses/v1/block_metadata/<usage_id>/?
&include=index_dictionary
Parameters:
“include”: a comma-separated list of keys to include. Valid keys are “index_dictionary”.
Response Values
A dictionary containing: * id (string): Block usage_key_str. * type (string) Block type. * index_dictionary: (dict) The index_dictionary JSON data
(usually this is the text content of the block, for search indexing or other purposes) for this block. Returned only if the “index_dictionary” is included in the “include” parameter.
- Parameters:
usage_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/courses/v2/blocks/#
Use Case
Returns the blocks in the course according to the requesting user’s access level.
Example requests:
GET /api/courses/v1/blocks/?course_id=<course_id> GET /api/courses/v1/blocks/?course_id=<course_id>
&username=anjali &depth=all &requested_fields=graded,format,student_view_multi_device,lti_url &block_counts=video &student_view_data=video &block_types_filter=problem,html
Parameters:
This view redirects to /api/courses/v1/blocks/<root_usage_key>/ for the root usage key of the course specified by course_id. The view accepts all parameters accepted by
BlocksView, plus the following required parametercourse_id: (string, required) The ID of the course whose block data we want to return
Response Values
Responses are identical to those returned by
BlocksViewwhen passed the root_usage_key of the requested course.If the course_id is not supplied, a 400: Bad Request is returned, with a message indicating that course_id is required.
If an invalid course_id is supplied, a 400: Bad Request is returned, with a message indicating that the course_id is not valid.
- Status Codes:
200 OK – No response body
- GET /api/courses/v2/blocks/{usage_key_string}#
Use Case
Returns the blocks within the requested block tree according to the requesting user’s access level.
Example requests:
GET /api/courses/v1/blocks/<root_block_usage_id>/?depth=all GET /api/courses/v1/blocks/<usage_id>/?
username=anjali &depth=all &requested_fields=graded,format,student_view_multi_device,lti_url,due &block_counts=video &student_view_data=video &block_types_filter=problem,html
Parameters:
all_blocks: (boolean) Provide a value of “true” to return all blocks. Returns all blocks only if the requesting user has course staff permissions. Blocks that are visible only to specific learners (for example, based on group membership or randomized content) are all included. If all_blocks is not specified, you must specify the username for the user whose course blocks are requested.
username: (string) Required, unless
all_blocksis specified. Specify the username for the user whose course blocks are requested. A blank/empty username can be used to request the blocks accessible to anonymous users (for public courses). Only users with course staff permissions can specify other users’ usernames. If a username is specified, results include blocks that are visible to that user, including those based on group or cohort membership or randomized content assigned to that user.- Example: username=anjali
username=’’ username
student_view_data: (list) Indicates for which block types to return student_view_data.
Example: student_view_data=video
block_counts: (list) Indicates for which block types to return the aggregate count of the blocks.
Example: block_counts=video,problem
requested_fields: (list) Indicates which additional fields to return for each block. For a list of available fields see under Response Values -> blocks, below.
The following fields are always returned: id, type, display_name
Example: requested_fields=graded,format,student_view_multi_device
depth: (integer or all) Indicates how deep to traverse into the blocks hierarchy. A value of all means the entire hierarchy.
Default is 0
Example: depth=all
nav_depth: (integer)
WARNING: nav_depth is not supported, and may be removed at any time.
Indicates how far deep to traverse into the course hierarchy before bundling all the descendants.
Default is 3 since typical navigational views of the course show a maximum of chapter->sequential->vertical.
Example: nav_depth=3
return_type (string) Indicates in what data type to return the blocks.
Default is dict. Supported values are: dict, list
Example: return_type=dict
block_types_filter: (list) Requested types of blocks used to filter the final result of returned blocks. Possible values include sequential, vertical, html, problem, video, and discussion.
Example: block_types_filter=vertical,html
Response Values
The following fields are returned with a successful response.
root: The ID of the root node of the requested course block structure.
blocks: A dictionary or list, based on the value of the “return_type” parameter. Maps block usage IDs to a collection of information about each block. Each block contains the following fields.
id: (string) The usage ID of the block.
type: (string) The type of block. Possible values the names of any XBlock type in the system, including custom blocks. Examples are course, chapter, sequential, vertical, html, problem, video, and discussion.
display_name: (string) The display name of the block.
children: (list) If the block has child blocks, a list of IDs of the child blocks. Returned only if “children” is included in the “requested_fields” parameter.
completion: (float or None) The level of completion of the block. Its value can vary between 0.0 and 1.0 or be equal to None if block is not completable. Returned only if “completion” is included in the “requested_fields” parameter.
block_counts: (dict) For each block type specified in the block_counts parameter to the endpoint, the aggregate number of blocks of that type for this block and all of its descendants.
graded (boolean) Whether or not the block or any of its descendants is graded. Returned only if “graded” is included in the “requested_fields” parameter.
format: (string) The assignment type of the block. Possible values can be “Homework”, “Lab”, “Midterm Exam”, and “Final Exam”. Returned only if “format” is included in the “requested_fields” parameter.
student_view_data: (dict) The JSON data for this block. Returned only if the “student_view_data” input parameter contains this block’s type.
student_view_url: (string) The URL to retrieve the HTML rendering of this block’s student view. The HTML could include CSS and Javascript code. This field can be used in combination with the student_view_multi_device field to decide whether to display this content to the user.
This URL can be used as a fallback if the student_view_data for this block type is not supported by the client or the block.
student_view_multi_device: (boolean) Whether or not the HTML of the student view that is rendered at “student_view_url” supports responsive web layouts, touch-based inputs, and interactive state management for a variety of device sizes and types, including mobile and touch devices. Returned only if “student_view_multi_device” is included in the “requested_fields” parameter.
lms_web_url: (string) The URL to the navigational container of the xBlock on the web. This URL can be used as a further fallback if the student_view_url and the student_view_data fields are not supported. Will direct to either the “New” (micro-frontend) or “Legacy” (Django-template-rendered) frontend experience depending on which experience is active.
legacy_web_url: (string) Like lms_web_url, but always directs to the “Legacy” frontend experience. Should only be used for transitional purposes; will be removed as part of DEPR-109.
lti_url: The block URL for an LTI consumer. Returned only if the “ENABLE_LTI_PROVIDER” Django settign is set to “True”.
due: The due date of the block. Returned only if “due” is included in the “requested_fields” parameter.
show_correctness: Whether to show scores/correctness to learners for the current sequence or problem. Returned only if “show_correctness” is included in the “requested_fields” parameter.
Additional XBlock fields can be included in the response if they are configured via the COURSE_BLOCKS_API_EXTRA_FIELDS Django setting and requested via the “requested_fields” parameter.
- Parameters:
usage_key_string (string)
- Status Codes:
200 OK – No response body
- POST /api/courseware/celebration/{course_key_string}#
Handle a POST request.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/courseware/course/{course_key_string}#
Use Cases
Request details for a course
Example Requests
GET /api/courseware/course/{course_key}
Response Values
Body consists of the following fields:
- access_expiration: An object detailing when access to this course will expire
expiration_date: (str) When the access expires, in ISO 8601 notation
masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user
upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can’t upgrade anymore)
upgrade_url: (str) Upgrade linke (or None if can’t upgrade anymore)
- celebrations: An object detailing which celebrations to render
- first_section: (bool) If the first section celebration should render
Note: Also uses information from frontend so this value is not final
streak_length_to_celebrate: (int) The streak length to celebrate for the learner
streak_discount_enabled: (bool) If the frontend should render an upgrade discount for hitting the streak
weekly_goal: (bool) If the weekly goal celebration should render
- course_goals:
- selected_goal:
days_per_week: (int) The number of days the learner wants to learn per week
subscribed_to_reminders: (bool) Whether the learner wants email reminders about their goal
weekly_learning_goal_enabled: Flag indicating if this feature is enabled for this call
- effort: A textual description of the weekly hours of effort expected
in the course.
end: Date the course ends, in ISO 8601 notation
- enrollment: Enrollment status of authenticated user
mode: audit, verified, etc
is_active: boolean
enrollment_end: Date enrollment ends, in ISO 8601 notation
enrollment_start: Date enrollment begins, in ISO 8601 notation
- entrance_exam_data: An object containing information about the course’s entrance exam
entrance_exam_current_score: (float) The users current score on the entrance exam
entrance_exam_enabled: (bool) If the course has an entrance exam
entrance_exam_id: (str) The block id for the entrance exam if enabled. Will be a section (chapter)
- entrance_exam_minimum_score_pct: (float) The minimum score a user must receive on the entrance exam
to unlock the remainder of the course. Returned as a float (i.e. 0.7 for 70%)
entrance_exam_passed: (bool) Indicates if the entrance exam has been passed
- id: A unique identifier of the course; a serialized representation
of the opaque key identifying the course.
language: The language code for the course
- media: An object that contains named media items. Included here:
course_image: An image to show for the course. Represented as an object with the following fields:
uri: The location of the image
name: Name of the course
- offer: An object detailing upgrade discount information
code: (str) Checkout code
expiration_date: (str) Expiration of offer, in ISO 8601 notation
original_price: (str) Full upgrade price without checkout code; includes currency symbol
discounted_price: (str) Upgrade price with checkout code; includes currency symbol
percentage: (int) Amount of discount
upgrade_url: (str) Checkout URL
org: Name of the organization that owns the course
- related_programs: A list of objects that contains program data related to the given course including:
- progress: An object containing program progress:
- complete: (int) Number of complete courses in the program (a course is completed if the user has
earned a certificate for any of the nested course runs)
- in_progress: (int) Number of courses in the program that are in progress (a course is in progress if
the user has enrolled in any of the nested course runs)
not_started: (int) Number of courses in the program that have not been started
slug: (str) The program type
title: (str) The title of the program
url: (str) The link to the program’s landing page
uuid: (str) A unique identifier of the program
short_description: A textual description of the course
start: Date the course begins, in ISO 8601 notation
start_display: Readably formatted start of the course
- start_type: Hint describing how start_display is set. One of:
“string”: manually set by the course author
“timestamp”: generated from the start timestamp
“empty”: no start date is specified
pacing: Course pacing. Possible values: instructor, self
user_timezone: User’s chosen timezone setting (or null for browser default)
- user_has_passing_grade: Whether or not the effective user’s grade is equal to or above the courses minimum
passing grade
course_exit_page_is_active: Flag for the learning mfe on whether or not the course exit page should display
certificate_data: data regarding the effective user’s certificate for the given course
- verify_identity_url: URL for a learner to verify their identity. Only returned for learners enrolled in a
verified mode. Will update to reverify URL if necessary.
- verification_status: The verification status of the effective user in the course. Possible values:
‘none’: No verification has been created for the user
‘expired’: The verification has expired
‘approved’: The verification has been approved
‘pending’: The verification is pending
‘must_reverify’: The user must reverify their identity
linkedin_add_to_profile_url: URL to add the effective user’s certificate to a LinkedIn Profile.
user_needs_integrity_signature: Whether the user needs to sign the integrity agreement for the course
learning_assistant_enabled: Whether the Xpert Learning Assistant is enabled for the requesting user
show_courseware_link: Whether the courseware link should be shown in the course details page
is_course_full: Whether the course is full
can_enroll: Whether the user can enroll in the course
invitation_only: Whether the course is invitation only
is_shib_course: Whether the course is a Shibboleth course
allow_anonymous: Whether the course allows anonymous access
ecommerce_checkout: Whether the course has an ecommerce checkout
- single_paid_mode: An object representing the single paid mode for the course, if it exists
sku: (str) The SKU for the single paid mode
name: (str) The name of the single paid mode
min_price: (str) The minimum price for the single paid mode, formatted with the currency symbol
description: (str) The description of the single paid mode
ecommerce_checkout_link: The ecommerce checkout link for the course, if it exists
course_image_urls: A list of course image URLs
start_date_is_still_default: Whether the course start date is still the default value
advertised_start: The advertised start date of the course
course_price: The course price, formatted with the currency symbol
pre_requisite_courses: A list of pre-requisite courses for the course
about_sidebar_html: The HTML content for the course about section, if enabled
display_number_with_default: The course number with the org name, if set
display_org_with_default: The org name with the course number, if set
content_type_gating_enabled: Whether the content type gating is enabled for the course
show_calculator: Whether the calculator should be shown in the course details page
can_access_proctored_exams: Whether the user is eligible to access proctored exams
- notes: An object containing note settings for the course
enabled: Boolean indicating whether edxnotes feature is enabled for the course
visible: Boolean indicating whether notes are visible in the course
marketing_url: The marketing URL for the course
overview: The overview HTML content for the course
license: The license for the course
Parameters:
- requested_fields (optional) comma separated list:
If set, then only those fields will be returned.
username (optional) username to masquerade as (if requesting user is staff)
Returns
200 on success with above fields.
400 if an invalid parameter was sent or the username was not provided for an authenticated request.
403 if a user who does not have permission to masquerade as another user specifies a username other than their own.
404 if the course is not available or cannot be seen.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK –
- GET /api/courseware/resume/{course_key_string}#
Return response to a GET request.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/courseware/sequence/{usage_key_string}#
Return response to a GET request.
- Parameters:
usage_key_string (string)
- Status Codes:
200 OK – No response body
- POST /api/credit/v1/courses/#
CreditCourse endpoints.
- Status Codes:
- GET /api/credit/v1/courses/{course_key}/#
CreditCourse endpoints.
- Parameters:
course_key (string)
- Status Codes:
200 OK –
- PUT /api/credit/v1/courses/{course_key}/#
Create/update course modes for a course.
- Parameters:
course_key (string)
- Status Codes:
200 OK –
- PATCH /api/credit/v1/courses/{course_key}/#
CreditCourse endpoints.
- Parameters:
course_key (string)
- Status Codes:
200 OK –
- GET /api/credit/v1/eligibility/#
Returns eligibility for a user-course combination.
- Status Codes:
200 OK –
- GET /api/credit/v1/providers/{provider_id}/#
Credit provider endpoints.
- Parameters:
provider_id (string)
- Status Codes:
200 OK –
- POST /api/credit/v1/providers/{provider_id}/callback/#
POST handler.
- Parameters:
provider_id (string)
- Status Codes:
200 OK – No response body
- POST /api/credit/v1/providers/{provider_id}/request/#
POST handler.
- Parameters:
provider_id (string)
- Status Codes:
200 OK – No response body
- GET /api/dashboard/v0/programs/#
For a learner, get list of enrolled programs with progress. If an enterprise UUID ias provided, filter out all non-enterprise enrollments for the learner.
Example Request
GET /api/dashboard/v1/programs/{enterprise_uuid}/
Parameters
enterprise_uuid: UUID of an enterprise customer.
Example Response
- [
- {
“uuid”: “ff41a5eb-2a73-4933-8e80-a1c66068ed2c”, “title”: “Demonstration Program”, “type”: “MicroMasters”, “banner_image”: {
- “large”: {
“url”: “http://example.com/images/foo.large.jpg”, “width”: 1440, “height”: 480
}, “medium”: {
“url”: “http://example.com/images/foo.medium.jpg”, “width”: 726, “height”: 242
}, “small”: {
“url”: “http://example.com/images/foo.small.jpg”, “width”: 435, “height”: 145
}, “x-small”: {
“url”: “http://example.com/images/foo.x-small.jpg”, “width”: 348, “height”: 116
}
}, “authoring_organizations”: [
- {
“key”: “example”
}
], “progress”: {
“uuid”: “ff41a5eb-2a73-4933-8e80-a1c66068ed2c”, “completed”: 0, “in_progress”: 0, “not_started”: 2
}
}
]
- Status Codes:
200 OK – No response body
- GET /api/dashboard/v0/programs/{enterprise_uuid}/#
For a learner, get list of enrolled programs with progress. If an enterprise UUID ias provided, filter out all non-enterprise enrollments for the learner.
Example Request
GET /api/dashboard/v1/programs/{enterprise_uuid}/
Parameters
enterprise_uuid: UUID of an enterprise customer.
Example Response
- [
- {
“uuid”: “ff41a5eb-2a73-4933-8e80-a1c66068ed2c”, “title”: “Demonstration Program”, “type”: “MicroMasters”, “banner_image”: {
- “large”: {
“url”: “http://example.com/images/foo.large.jpg”, “width”: 1440, “height”: 480
}, “medium”: {
“url”: “http://example.com/images/foo.medium.jpg”, “width”: 726, “height”: 242
}, “small”: {
“url”: “http://example.com/images/foo.small.jpg”, “width”: 435, “height”: 145
}, “x-small”: {
“url”: “http://example.com/images/foo.x-small.jpg”, “width”: 348, “height”: 116
}
}, “authoring_organizations”: [
- {
“key”: “example”
}
], “progress”: {
“uuid”: “ff41a5eb-2a73-4933-8e80-a1c66068ed2c”, “completed”: 0, “in_progress”: 0, “not_started”: 2
}
}
]
- Parameters:
enterprise_uuid (string)
- Status Codes:
200 OK – No response body
- GET /api/dashboard/v0/programs/{program_uuid}/progress_details/#
Retrieves progress details of a learner in a specified program.
Example Request
GET api/dashboard/v1/programs/{program_uuid}/progress_details/
Parameters
program_uuid: A string representation of the uuid of the program.
Response Values
If the request for information about the program is successful, an HTTP 200 “OK” response is returned.
The HTTP 200 response has the following values.
urls: Urls to enroll/purchase a course or view program record.
program_data: Holds meta information about the program.
course_data: Learner’s progress details for all courses in the program (in-progress/remaining/completed).
- certificate_data: Details about learner’s certificates status for all courses in the program and the
program itself.
industry_pathways: Industry pathways for the program, comes under additional credit opportunities.
credit_pathways: Credit pathways for the program, comes under additional credit opportunities.
Example Response
- {
- “urls”: {
“program_listing_url”: “/dashboard/programs/”, “track_selection_url”: “/course_modes/choose/”, “commerce_api_url”: “/api/commerce/v1/baskets/”, “buy_button_url”: “http://example.com/basket/add/?”, “program_record_url”: “https://example.com/records/programs/8675309”
}, “program_data”: {
“uuid”: “a156a6e2-de91-4ce7-947a-888943e6b12a”, “title”: “Demonstration Program”, “subtitle”: “”, “type”: “MicroMasters”, “status”: “active”, “marketing_slug”: “demo-program”, “marketing_url”: “micromasters/demo-program”, “authoring_organizations”: [], “card_image_url”: “http://example.com/asset-v1:DemoX+Demo_Course.jpg”, “is_program_eligible_for_one_click_purchase”: false, “pathway_ids”: [
1, 2
], “is_learner_eligible_for_one_click_purchase”: false, “skus”: [“AUD90210”],
}, “course_data”: {
“uuid”: “a156a6e2-de91-4ce7-947a-888943e6b12a”, “completed”: [], “in_progress”: [], “not_started”: [
- {
“key”: “example+DemoX”, “uuid”: “fe1a9ad4-a452-45cd-80e5-9babd3d43f96”, “title”: “Demonstration Course”, “course_runs”: [], “entitlements”: [], “owners”: [], “image”: “”, “short_description”: “”, “type”: “457f07ec-a78f-45b4-ba09-5fb176520d8a”,
}
],
}, “certificate_data”: [{
“type”: “course”, “title”: “Demo Course”, ‘url’: “/certificates/8675309”,
}], “industry_pathways”: [
- {
“id”: 2, “uuid”: “1b8fadf1-f6aa-4282-94e3-325b922a027f”, “name”: “Demo Industry Pathway”, “org_name”: “example”, “email”: “example@example.com”, “description”: “Sample demo industry pathway”, “destination_url”: “http://example.edu/online/pathways/example-methods”, “pathway_type”: “industry”, “program_uuids”: [
“a156a6e2-de91-4ce7-947a-888943e6b12a”
]
}
], “credit_pathways”: [
- {
“id”: 1, “uuid”: “86b9701a-61e6-48a2-92eb-70a824521c1f”, “name”: “Demo Credit Pathway”, “org_name”: “example”, “email”: “example@example.com”, “description”: “Sample demo credit pathway!”, “destination_url”: “http://example.edu/online/pathways/example-thinking”, “pathway_type”: “credit”, “program_uuids”: [
“a156a6e2-de91-4ce7-947a-888943e6b12a”
]
}
]
}
- Parameters:
program_uuid (string)
- Status Codes:
200 OK – No response body
- GET /api/discounts/course/{course_key_string}#
Return the discount percent, if the user has appropriate permissions.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/discounts/user/{user_id}/course/{course_key_string}#
Return the discount percent, if the user has appropriate permissions.
- Parameters:
course_key_string (string)
user_id (string)
- Status Codes:
200 OK – No response body
- POST /api/discussion/v1/accounts/replace_username#
Implements the username replacement endpoint
- Status Codes:
200 OK – No response body
- POST /api/discussion/v1/accounts/retire_forum/#
Implements the retirement endpoint.
- Status Codes:
200 OK – No response body
- POST /api/discussion/v1/bulk_delete_user_posts/{course_id}#
Implements the delete user posts endpoint.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/discussion/v1/comments/#
Implements the GET method for the list endpoint as described in the class docstring.
This endpoint implements two distinct usage contexts.
When username is provided, the course_id parameter is required, and thread_id is ignored. The behavior is to retrieve all of the user’s non-anonymous comments from the specified course, outside of the context of a forum thread. In this context, endorsement information is unavailable.
When username is not provided, thread_id is required, and course_id is ignored, since the thread already belongs to a course. In this context, all information relevant to usage in the discussions forum is available.
- Status Codes:
200 OK – No response body
- POST /api/discussion/v1/comments/#
Implements the POST method for the list endpoint as described in the class docstring.
- Status Codes:
201 Created – No response body
- GET /api/discussion/v1/comments/{comment_id}/#
Implements the GET method for comments against response ID
- Parameters:
comment_id (string)
- Status Codes:
200 OK – No response body
- PATCH /api/discussion/v1/comments/{comment_id}/#
Implements the PATCH method for the instance endpoint as described in the class docstring.
- Parameters:
comment_id (string)
- Status Codes:
200 OK – No response body
- DELETE /api/discussion/v1/comments/{comment_id}/#
Implements the DELETE method for the instance endpoint as described in the class docstring
- Parameters:
comment_id (string)
- Status Codes:
204 No Content – No response body
- GET /api/discussion/v1/course_topics/{course_id}#
Implements the GET method as described in the class docstring.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/discussion/v1/courses/{course_id}#
Retrieve general discussion metadata for a course.
Example Requests:
GET /api/discussion/v1/courses/course-v1:ExampleX+Subject101+2015
- Parameters:
course_id (string) – Course ID
- Status Codes:
200 OK –
401 Unauthorized – The requester is not authenticated.
403 Forbidden – The requester cannot access the specified course.
404 Not Found – The requested course does not exist.
- GET /api/discussion/v1/courses/{course_id}/learner/#
Implements the GET method as described in the class docstring.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/discussion/v1/courses/{course_id}/roles/{rolename}/#
Implement a handler for the GET method.
- Parameters:
course_id (string)
rolename (string)
- Status Codes:
200 OK – No response body
- POST /api/discussion/v1/courses/{course_id}/roles/{rolename}/#
Implement a handler for the POST method.
- Parameters:
course_id (string)
rolename (string)
- Status Codes:
200 OK – No response body
- GET /api/discussion/v1/courses/{course_id}/settings#
Implement a handler for the GET method.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- PATCH /api/discussion/v1/courses/{course_id}/settings#
Implement a handler for the PATCH method.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/discussion/v1/courses/{course_id}/upload#
Handles a file upload.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/discussion/v1/courses/{course_key_string}/activity_stats#
Implements the GET method as described in the class docstring.
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- GET /api/discussion/v1/threads/#
Implements the GET method for the list endpoint as described in the class docstring.
- Status Codes:
200 OK – No response body
- POST /api/discussion/v1/threads/#
Implements the POST method for the list endpoint as described in the class docstring.
- Status Codes:
201 Created – No response body
- GET /api/discussion/v1/threads/{thread_id}/#
Implements the GET method for thread ID
- Parameters:
thread_id (string)
- Status Codes:
200 OK – No response body
- PATCH /api/discussion/v1/threads/{thread_id}/#
Implements the PATCH method for the instance endpoint as described in the class docstring.
- Parameters:
thread_id (string)
- Status Codes:
200 OK – No response body
- DELETE /api/discussion/v1/threads/{thread_id}/#
Implements the DELETE method for the instance endpoint as described in the class docstring
- Parameters:
thread_id (string)
- Status Codes:
204 No Content – No response body
- GET /api/discussion/v2/course_topics/{course_id}#
Use Cases
Retrieve the topic listing for a course.
Example Requests:
- GET /api/discussion/v2/course_topics/course-v1:ExampleX+Subject101+2015
?topic_id={topic_id_1, topid_id_2}&order_by=course_structure
- Parameters:
course_id (string) – Course ID
- Query Parameters:
order_by (string) – Sort ordering for topics
topic_id (string) – Comma-separated list of topic ids to filter
- Status Codes:
200 OK –
401 Unauthorized – The requester is not authenticated.
403 Forbidden – The requester cannot access the specified course.
404 Not Found – The requested course does not exist.
- GET /api/discussion/v2/courses/{course_id}#
Retrieve general discussion metadata for a course.
- Example Requests:
GET /api/discussion/v2/courses/course-v1:ExampleX+Subject101+2015
- Parameters:
course_id (string) – Course ID
- Status Codes:
200 OK –
401 Unauthorized – The requester is not authenticated.
403 Forbidden – The requester cannot access the specified course.
404 Not Found – The requested course does not exist.
- GET /api/discussion/v3/course_topics/{course_id}#
Use Cases
Retrieve the topic listing for a course.
Example Requests:
GET /api/discussion/v3/course_topics/course-v1:ExampleX+Subject101+2015
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/proctoring_review_callback/#
Post callback handler
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/instructor/{course_id}#
Redirect to dashboard for a given course and optional exam_id
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/instructor/{course_id}/{exam_id}#
Redirect to dashboard for a given course and optional exam_id
- Parameters:
course_id (string)
exam_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/{course_id}/allowance#
HTTP GET handler. Get all allowances for a course. Course and Global staff can view both timed and proctored exam allowances.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/{course_id}/allowance#
HTTP GET handler. Adds or updates Allowance
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- DELETE /api/edx_proctoring/v1/proctored_exam/{course_id}/allowance#
HTTP DELETE handler. Removes Allowance.
- Parameters:
course_id (string)
- Status Codes:
204 No Content – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/{course_id}/bulk_allowance#
HTTP PUT handler. Adds or updates Allowances for many exams and students
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/{course_id}/grouped/allowance#
HTTP GET Handler.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/active_attempt#
HTTP GET handler. Returns active attempt
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/active_exams_for_user#
Returns the get_active_exams_for_user
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/allowance#
HTTP GET handler. Get all allowances for a course. Course and Global staff can view both timed and proctored exam allowances.
- Status Codes:
200 OK – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/allowance#
HTTP GET handler. Adds or updates Allowance
- Status Codes:
200 OK – No response body
- DELETE /api/edx_proctoring/v1/proctored_exam/allowance#
HTTP DELETE handler. Removes Allowance.
- Status Codes:
204 No Content – No response body
- GET /api/edx_proctoring/v1/proctored_exam/attempt#
HTTP GET Handler. Returns the status of the exam attempt.
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/v1/proctored_exam/attempt#
HTTP POST handler. To create an exam attempt.
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/attempt/{attempt_id}#
HTTP GET Handler. Returns the status of the exam attempt.
- Parameters:
attempt_id (integer)
- Status Codes:
200 OK – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/attempt/{attempt_id}#
HTTP PUT handler to update exam attempt status based on an action.
- Parameters:
request: The request object. attempt_id: The attempt ID of the proctored exam attempt whose status should be changed.
- Returns:
A Response object containing the exam_attempt_id.
- Parameters:
attempt_id (integer)
- Status Codes:
200 OK – No response body
- DELETE /api/edx_proctoring/v1/proctored_exam/attempt/{attempt_id}#
HTTP DELETE handler. Removes an exam attempt.
- Parameters:
attempt_id (integer)
- Status Codes:
204 No Content – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/attempt/{attempt_id}/review_status#
Update the is_status_acknowledged flag for the specific attempt
- Parameters:
attempt_id (integer)
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/v1/proctored_exam/attempt/{external_id}/ready#
Post callback handler
- Parameters:
external_id (string)
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/v1/proctored_exam/attempt/{external_id}/reviewed#
Called when 3rd party proctoring service has finished its review of an attempt.
- Parameters:
external_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/attempt/course_id/{course_id}#
HTTP GET handler. Returns exam with attempt and active attempt
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/attempt/grouped/course_id/{course_id}#
HTTP GET Handler.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/attempt/grouped/course_id/{course_id}/search/{search_by}#
HTTP GET Handler.
- Parameters:
course_id (string)
search_by (string)
- Status Codes:
200 OK – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/bulk_allowance#
HTTP PUT handler. Adds or updates Allowances for many exams and students
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/exam#
- HTTP GET handler.
- Scenarios:
by exam_id: calls get_exam_by_id() by course_id, content_id: get_exam_by_content_id()
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/v1/proctored_exam/exam#
Http POST handler. Creates an exam.
- Status Codes:
200 OK – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/exam#
HTTP PUT handler. To update an exam. calls the update_exam
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/exam/course_id/{course_id}#
- HTTP GET handler.
- Scenarios:
by exam_id: calls get_exam_by_id() by course_id, content_id: get_exam_by_content_id()
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/v1/proctored_exam/exam/course_id/{course_id}#
Http POST handler. Creates an exam.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/exam/course_id/{course_id}#
HTTP PUT handler. To update an exam. calls the update_exam
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/exam/course_id/{course_id}/content_id/{content_id}#
- HTTP GET handler.
- Scenarios:
by exam_id: calls get_exam_by_id() by course_id, content_id: get_exam_by_content_id()
- Parameters:
content_id (string)
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/v1/proctored_exam/exam/course_id/{course_id}/content_id/{content_id}#
Http POST handler. Creates an exam.
- Parameters:
content_id (string)
course_id (string)
- Status Codes:
200 OK – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/exam/course_id/{course_id}/content_id/{content_id}#
HTTP PUT handler. To update an exam. calls the update_exam
- Parameters:
content_id (string)
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/exam/exam_id/{exam_id}#
- HTTP GET handler.
- Scenarios:
by exam_id: calls get_exam_by_id() by course_id, content_id: get_exam_by_content_id()
- Parameters:
exam_id (integer)
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/v1/proctored_exam/exam/exam_id/{exam_id}#
Http POST handler. Creates an exam.
- Parameters:
exam_id (integer)
- Status Codes:
200 OK – No response body
- PUT /api/edx_proctoring/v1/proctored_exam/exam/exam_id/{exam_id}#
HTTP PUT handler. To update an exam. calls the update_exam
- Parameters:
exam_id (integer)
- Status Codes:
200 OK – No response body
- DELETE /api/edx_proctoring/v1/proctored_exam/exam_id/{exam_id}/user_id/{user_id}/reset_attempts#
HTTP DELETE handler, deletes all attempts for a given exam and username
- Parameters:
exam_id (string)
user_id (string)
- Status Codes:
204 No Content – No response body
- PATCH /api/edx_proctoring/v1/proctored_exam/exam_registration/course_id/{course_id}#
Create or update a list of all active exams. Exams not included in the registration payload will be deactivated
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/review_policy/exam_id/{exam_id}/#
HTTP GET handler. Returns review policy for proctored exam.
- Parameters:
exam_id (integer)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/proctored_exam/settings/exam_id/{exam_id}/#
HTTP GET handler. Returns proctoring_settings and exam_proctoring_backend config for proctored exam.
- Parameters:
exam_id (integer)
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/v1/retire_backend_user/{user_id}/#
Deletes all user data for the particular user_id from all configured backends
- Parameters:
user_id (string)
- Status Codes:
200 OK – No response body
- POST /api/edx_proctoring/v1/retire_user/{user_id}/#
Obfuscates all PII for a given user_id
- Parameters:
user_id (string)
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/user_onboarding/status#
HTTP GET handler. Returns the learner’s onboarding status.
- Status Codes:
200 OK – No response body
- GET /api/edx_proctoring/v1/user_onboarding/status/course_id/{course_id}#
HTTP GET handler.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/edxnotes/v1/retire_user/#
Implements the retirement endpoint.
- Status Codes:
200 OK – No response body
- GET /api/enrollment/v1/course/{course_id}#
Read enrollment information for a particular course.
HTTP Endpoint for retrieving course level enrollment information.
- Args:
- request (Request): To get current course enrollment information, a GET request will return
information for the specified course.
- course_id (str): URI element specifying the course location. Enrollment information will be
returned.
- Return:
A JSON serialized representation of the course enrollment details.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/enrollment/v1/enrollment#
Gets a list of all course enrollments for a user.
Returns a list for the currently logged in user, or for the user named by the ‘user’ GET parameter. If the username does not match that of the currently logged in user, only courses for which the currently logged in user has the Staff or Admin role are listed. As a result, a course team member can find out which of their own courses a particular learner is enrolled in.
Only the Staff or Admin role (granted on the Django administrative console as the staff or instructor permission) in individual courses gives the requesting user access to enrollment data. Permissions granted at the organizational level do not give a user access to enrollment data for all of that organization’s courses.
Users who have the global staff permission can access all enrollment data for all courses.
- Status Codes:
200 OK – No response body
- POST /api/enrollment/v1/enrollment#
Enrolls the currently logged-in user in a course.
Server-to-server calls may deactivate or modify the mode of existing enrollments. All other requests go through add_enrollment(), which allows creation of new and reactivation of old enrollments.
- Status Codes:
200 OK – No response body
- GET /api/enrollment/v1/enrollment/{course_id}#
Create, read, or update enrollment information for a user.
HTTP Endpoint for all CRUD operations for a user course enrollment. Allows creation, reading, and updates of the current enrollment for a particular course.
- Args:
- request (Request): To get current course enrollment information, a GET request will return
information for the current user and the specified course.
- course_id (str): URI element specifying the course location. Enrollment information will be
returned, created, or updated for this particular course.
username (str): The username associated with this enrollment request.
- Return:
A JSON serialized representation of the course enrollment.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/enrollment/v1/enrollment/{username},{course_id}#
Create, read, or update enrollment information for a user.
HTTP Endpoint for all CRUD operations for a user course enrollment. Allows creation, reading, and updates of the current enrollment for a particular course.
- Args:
- request (Request): To get current course enrollment information, a GET request will return
information for the current user and the specified course.
- course_id (str): URI element specifying the course location. Enrollment information will be
returned, created, or updated for this particular course.
username (str): The username associated with this enrollment request.
- Return:
A JSON serialized representation of the course enrollment.
- Parameters:
course_id (string)
username (string)
- Status Codes:
200 OK – No response body
- GET /api/enrollment/v1/enrollment_allowed/#
Returns the enrollments allowed for a given user email.
Example Requests
GET /api/enrollment/v1/enrollment_allowed?email=user@example.com
Parameters
email (optional, string, _query_params_) - defaults to the calling user if not provided.
Responses - 200: Success. - 403: Forbidden, you need to be staff.
- Status Codes:
200 OK –
- POST /api/enrollment/v1/enrollment_allowed/#
Creates an enrollment allowed for a given user email and course id.
Example Request
POST /api/enrollment/v1/enrollment_allowed/
Note: The URL for this request must finish with /
Example request data: ``` {
“email”: “user@example.com”, “course_id”: “course-v1:edX+DemoX+Demo_Course”, “auto_enroll”: true
}#
Parameters
email (required, string, _body_)
course_id (required, string, _body_)
auto_enroll (optional, bool: default=false, _body_)
Responses - 400: Bad request, missing data. - 403: Forbidden, you need to be staff. - 409: Conflict, enrollment allowed already exists.
- status 200:
- DELETE /api/enrollment/v1/enrollment_allowed/#
Deletes an enrollment allowed for a given user email and course id.
Example Request
DELETE /api/enrollment/v1/enrollment_allowed/
Note: The URL for this request must finish with /
Example request data: ``` {
“email”: “user@example.com”, “course_id”: “course-v1:edX+DemoX+Demo_Course”
}#
Parameters
email (required, string, _body_)
course_id (required, string, _body_)
Responses - 204: Enrollment allowed deleted. - 400: Bad request, missing data. - 403: Forbidden, you need to be staff. - 404: Not found, the course enrollment allowed doesn’t exists.
- status 204:
No response body
- GET /api/enrollment/v1/enrollments/#
Use Cases
Get a list of all course enrollments, optionally filtered by a course ID or list of usernames.
Example Requests
GET /api/enrollment/v1/enrollments
GET /api/enrollment/v1/enrollments?course_id={course_id}
GET /api/enrollment/v1/enrollments?course_ids={course_id},{course_id},{course_id}
GET /api/enrollment/v1/enrollments?username={username},{username},{username}
GET /api/enrollment/v1/enrollments?course_id={course_id}&username={username}
GET /api/enrollment/v1/enrollments?email={email},{email}
Query Parameters for GET
course_id: Filters the result to course enrollments for the course corresponding to the given course ID. The value must be URL encoded. Optional.
course_ids: List of comma-separated course IDs. Filters the result to course enrollments for the courses corresponding to the given course IDs. Course IDs could be course run IDs or course IDs. The value must be URL encoded. Optional.
username: List of comma-separated usernames. Filters the result to the course enrollments of the given users. Optional.
email: List of comma-separated emails. Filters the result to the course enrollments of the given users. Optional.
page_size: Number of results to return per page. Optional.
page: Page number to retrieve. Optional.
Response Values
If the request for information about the course enrollments is successful, an HTTP 200 “OK” response is returned.
The HTTP 200 response has the following values.
results: A list of the course enrollments matching the request.
created: Date and time when the course enrollment was created.
mode: Mode for the course enrollment.
is_active: Whether the course enrollment is active or not.
user: Username of the user in the course enrollment.
course_id: Course ID of the course in the course enrollment.
next: The URL to the next page of results, or null if this is the last page.
previous: The URL to the next page of results, or null if this is the first page.
If the user is not logged in, a 401 error is returned.
If the user is not global staff, a 403 error is returned.
If the specified course_id is not valid or any of the specified usernames are not valid, a 400 error is returned.
If the specified course_id does not correspond to a valid course or if all the specified usernames do not correspond to valid users, an HTTP 200 “OK” response is returned with an empty ‘results’ field.
- Query Parameters:
cursor (string) – The pagination cursor value.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/enrollment/v1/roles/#
Gets a list of all roles for the currently logged-in user, filtered by course_id if supplied
- Status Codes:
200 OK – No response body
- POST /api/enrollment/v1/unenroll/#
Unenrolls the specified user from all courses.
- Status Codes:
200 OK – No response body
- GET /api/enrollment/v2/course/{course_id}#
Get enrollment details for a course
Returns the course schedule and supported enrollment modes. No authentication required. Use ?include_expired=1 to include expired enrollment modes.
- Parameters:
course_id (string) – Course ID (e.g. course-v1:org+course+run).
- Query Parameters:
include_expired (string) – If ‘1’, include expired enrollment modes in the response.
- Status Codes:
200 OK – Course enrollment details retrieved successfully.
400 Bad Request – Invalid request data or parameters.
404 Not Found – The requested resource does not exist.
- GET /api/enrollment/v2/courses/{course_id}/#
Get enrollment details for a course
Returns the course schedule and supported enrollment modes. No authentication required. Use ?include_expired=1 to include expired enrollment modes.
- Parameters:
course_id (string) – Course ID (e.g. course-v1:org+course+run).
- Query Parameters:
include_expired (string) – If ‘1’, include expired enrollment modes in the response.
- Status Codes:
200 OK – Course enrollment details retrieved successfully.
400 Bad Request – Invalid request data or parameters.
404 Not Found – The requested resource does not exist.
- GET /api/enrollment/v2/enrollment/#
List enrollments for a user (paginated)
Returns a paginated list of enrollments for the currently logged-in user, or for the user named by the ‘user’ query parameter. Staff/admin/api-key access is required to view another user’s enrollments — otherwise the list is filtered to courses the requester staffs. Supports the ADR 0036
?view=minimalpreset (see parameter description).- Query Parameters:
page (string) – Page number to retrieve. Default 1.
page_size (string) – Items per page (default 10, max 100).
user (string) – Username of the user whose enrollments to list.
view (string) – ADR 0036 response preset.
minimalcollapses the embeddedcourse_detailssub-object on each enrollment to a singlecourse_idstring (dropscourse_modesand other heavy course-detail fields). Omit the parameter to receive the full response.
- Status Codes:
200 OK – Paginated enrollment list. The schema below is the full default shape; when
?view=minimalis supplied each enrollment’scourse_detailsis collapsed to a singlecourse_idstring (ADR 0036).401 Unauthorized – The requester is not authenticated.
- POST /api/enrollment/v2/enrollment/#
Create or update an enrollment
Enrolls a user in a course. Server-to-server calls may deactivate or modify the mode of existing enrollments; all other requests create or reactivate enrollments. The request body must include course_details.course_id.
- Status Codes:
200 OK – Enrollment created, reactivated, or updated successfully.
400 Bad Request – Invalid request data or parameters.
403 Forbidden – The requester does not have permission for this operation.
404 Not Found – The requested resource does not exist.
- GET /api/enrollment/v2/enrollment/{course_id}#
Retrieve a user’s enrollment in a course
Returns the current user’s enrollment for the specified course, or the named user’s enrollment when invoked with the {username},{course_id} URL form (server-to-server or staff only).
- Parameters:
course_id (string) – Course ID (e.g. course-v1:org+course+run).
username (string) – Username of the user.
- Status Codes:
200 OK – Enrollment retrieved successfully (or empty body if no enrollment).
400 Bad Request – Invalid request data or parameters.
404 Not Found – The requested resource does not exist.
- GET /api/enrollment/v2/enrollment/{username},{course_id}#
Retrieve a user’s enrollment in a course
Returns the current user’s enrollment for the specified course, or the named user’s enrollment when invoked with the {username},{course_id} URL form (server-to-server or staff only).
- Parameters:
course_id (string) – Course ID (e.g. course-v1:org+course+run).
username (string) – Username of the user.
- Status Codes:
200 OK – Enrollment retrieved successfully (or empty body if no enrollment).
400 Bad Request – Invalid request data or parameters.
404 Not Found – The requested resource does not exist.
- GET /api/enrollment/v2/enrollment/enrollment_allowed/#
Manage CourseEnrollmentAllowed records (admin-only)
GET lists allowed enrollments for an email; POST creates a new one; DELETE removes an existing one by email + course_id. Admin-only.
- Query Parameters:
email (string) – Email to query (GET only). Defaults to the requester’s email.
- Status Codes:
200 OK – GET success — list of allowed enrollments for the email.
201 Created – POST success — allowed enrollment created.
204 No Content – DELETE success — allowed enrollment deleted.
400 Bad Request – Invalid request data or parameters.
403 Forbidden – The requester does not have permission for this operation.
404 Not Found – DELETE: allowed enrollment not found.
409 Conflict – POST: allowed enrollment already exists.
- POST /api/enrollment/v2/enrollment/enrollment_allowed/#
Manage CourseEnrollmentAllowed records (admin-only)
GET lists allowed enrollments for an email; POST creates a new one; DELETE removes an existing one by email + course_id. Admin-only.
- Query Parameters:
email (string) – Email to query (GET only). Defaults to the requester’s email.
- Status Codes:
200 OK – GET success — list of allowed enrollments for the email.
201 Created – POST success — allowed enrollment created.
204 No Content – DELETE success — allowed enrollment deleted.
400 Bad Request – Invalid request data or parameters.
403 Forbidden – The requester does not have permission for this operation.
404 Not Found – DELETE: allowed enrollment not found.
409 Conflict – POST: allowed enrollment already exists.
- DELETE /api/enrollment/v2/enrollment/enrollment_allowed/#
Manage CourseEnrollmentAllowed records (admin-only)
GET lists allowed enrollments for an email; POST creates a new one; DELETE removes an existing one by email + course_id. Admin-only.
- Query Parameters:
email (string) – Email to query (GET only). Defaults to the requester’s email.
- Status Codes:
200 OK – GET success — list of allowed enrollments for the email.
201 Created – POST success — allowed enrollment created.
204 No Content – DELETE success — allowed enrollment deleted.
400 Bad Request – Invalid request data or parameters.
403 Forbidden – The requester does not have permission for this operation.
404 Not Found – DELETE: allowed enrollment not found.
409 Conflict – POST: allowed enrollment already exists.
- POST /api/enrollment/v2/enrollment/unenroll/#
Unenroll a user from all courses (retirement)
Privileged retirement-pipeline use only. Unenrolls the named user from every active enrollment. The request must be made by a service user with CanRetireUser permission, not the user being unenrolled.
- Status Codes:
200 OK – List of courses from which the user was unenrolled.
204 No Content – User has no active enrollments.
400 Bad Request – Invalid request data or parameters.
404 Not Found – The requested resource does not exist.
- GET /api/enrollment/v2/enrollments#
List all course enrollments (admin-only, paginated)
Admin-only paginated list of CourseEnrollment records, optionally filtered by course_key, course_keys, username, or email, and optionally ordered.
- Query Parameters:
course_id (string) – Deprecated alias for ‘course_key’ (ADR 0033). Use ‘course_key’ instead.
course_ids (string) – Deprecated alias for ‘course_keys’ (ADR 0033). Use ‘course_keys’ instead.
course_key (string) – Filter to enrollments for this course (OEP-68).
course_keys (string) – Comma-separated list of course keys (OEP-68).
email (string) – Comma-separated list of emails.
ordering (string) – Order results by one of: created, -created, id, -id (ADR 0033 §3).
page (string) – Page number to retrieve. Default 1.
page_size (string) – Items per page (default 10, max 100).
username (string) – Comma-separated list of usernames.
- Status Codes:
200 OK – Paginated list of course enrollments.
400 Bad Request – Invalid request data or parameters.
401 Unauthorized – The requester is not authenticated.
403 Forbidden – The requester does not have permission for this operation.
- GET /api/enrollment/v2/enrollments/#
List all course enrollments (admin-only, paginated)
Admin-only paginated list of CourseEnrollment records, optionally filtered by course_key, course_keys, username, or email, and optionally ordered.
- Query Parameters:
course_id (string) – Deprecated alias for ‘course_key’ (ADR 0033). Use ‘course_key’ instead.
course_ids (string) – Deprecated alias for ‘course_keys’ (ADR 0033). Use ‘course_keys’ instead.
course_key (string) – Filter to enrollments for this course (OEP-68).
course_keys (string) – Comma-separated list of course keys (OEP-68).
email (string) – Comma-separated list of emails.
ordering (string) – Order results by one of: created, -created, id, -id (ADR 0033 §3).
page (string) – Page number to retrieve. Default 1.
page_size (string) – Items per page (default 10, max 100).
username (string) – Comma-separated list of usernames.
- Status Codes:
200 OK – Paginated list of course enrollments.
400 Bad Request – Invalid request data or parameters.
401 Unauthorized – The requester is not authenticated.
403 Forbidden – The requester does not have permission for this operation.
- GET /api/enrollment/v2/enrollments/{username},{course_id}/#
Retrieve a user’s enrollment in a course
Returns the current user’s enrollment for the specified course, or the named user’s enrollment when invoked with the {username},{course_id} URL form (server-to-server or staff only).
- Parameters:
course_id (string) – Course ID (e.g. course-v1:org+course+run).
username (string) – Username of the user.
- Status Codes:
200 OK – Enrollment retrieved successfully (or empty body if no enrollment).
400 Bad Request – Invalid request data or parameters.
404 Not Found – The requested resource does not exist.
- GET /api/enrollment/v2/roles/#
List the current user’s course roles
Returns the list of course-level roles held by the currently logged-in user, plus an is_staff flag. Optionally filters by course_key (or course_id, deprecated).
- Query Parameters:
course_id (string) – Deprecated alias for ‘course_key’ (ADR 0033). Use ‘course_key’ instead.
course_key (string) – If provided, only roles for this course are returned (OEP-68).
- Status Codes:
200 OK – Roles retrieved successfully.
400 Bad Request – Invalid request data or parameters.
- GET /api/entitlements/v1/entitlements/#
Override the list method to expire records that are past the policy and requested via the API before returning those records.
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/entitlements/v1/entitlements/#
ViewSet for the Entitlements API.
- Status Codes:
- GET /api/entitlements/v1/entitlements/{uuid}/#
Override the retrieve method to expire a record that is past the policy and is requested via the API before returning that record.
- Parameters:
uuid (string)
- Status Codes:
200 OK –
- PUT /api/entitlements/v1/entitlements/{uuid}/#
ViewSet for the Entitlements API.
- Parameters:
uuid (string)
- Status Codes:
200 OK –
- PATCH /api/entitlements/v1/entitlements/{uuid}/#
ViewSet for the Entitlements API.
- Parameters:
uuid (string)
- Status Codes:
200 OK –
- DELETE /api/entitlements/v1/entitlements/{uuid}/#
ViewSet for the Entitlements API.
- Parameters:
uuid (string)
- Status Codes:
204 No Content – No response body
- POST /api/entitlements/v1/entitlements/{uuid}/enrollments#
On POST this method will be called and will handle enrolling a user in the provided course_run_id from the data. This is called on a specific entitlement UUID so the course_run_id has to correspond to the Course that is assigned to the Entitlement.
When this API is called for a user who is already enrolled in a run that User will be unenrolled from their current run and enrolled in the new run if it is available.
- Parameters:
uuid (string)
- Status Codes:
201 Created – No response body
- DELETE /api/entitlements/v1/entitlements/{uuid}/enrollments#
On DELETE call to this API we will unenroll the course enrollment for the provided uuid
If is_refund parameter is provided then unenroll the user, set Entitlement expiration, and issue a refund
- Parameters:
uuid (string)
- Status Codes:
204 No Content – No response body
- GET /api/experiments/v0/custom/REV-934/#
Return the if the course should be upsold in the mobile app, if the user has appropriate permissions.
- Status Codes:
200 OK – No response body
- GET /api/experiments/v0/custom/userMetadata/{username},{course_id}#
Return user-metadata for the given course and user
- Parameters:
course_id (string)
username (string)
- Status Codes:
200 OK – No response body
- GET /api/experiments/v0/data/#
- Query Parameters:
experiment_id (integer)
key (string)
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/experiments/v0/data/#
- Status Codes:
- GET /api/experiments/v0/data/{id}/#
- Parameters:
id (integer) – A unique integer value identifying this Experiment Data.
- Status Codes:
200 OK –
- PUT /api/experiments/v0/data/{id}/#
- Parameters:
id (integer) – A unique integer value identifying this Experiment Data.
- Status Codes:
200 OK –
- PATCH /api/experiments/v0/data/{id}/#
- Parameters:
id (integer) – A unique integer value identifying this Experiment Data.
- Status Codes:
200 OK –
- DELETE /api/experiments/v0/data/{id}/#
- Parameters:
id (integer) – A unique integer value identifying this Experiment Data.
- Status Codes:
204 No Content – No response body
- GET /api/experiments/v0/key-value/#
- Query Parameters:
experiment_id (integer)
key (string)
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/experiments/v0/key-value/#
- Status Codes:
- GET /api/experiments/v0/key-value/{id}/#
- Parameters:
id (integer) – A unique integer value identifying this Experiment Key-Value Pair.
- Status Codes:
200 OK –
- PUT /api/experiments/v0/key-value/{id}/#
- Parameters:
id (integer) – A unique integer value identifying this Experiment Key-Value Pair.
- Status Codes:
200 OK –
- PATCH /api/experiments/v0/key-value/{id}/#
- Parameters:
id (integer) – A unique integer value identifying this Experiment Key-Value Pair.
- Status Codes:
200 OK –
- DELETE /api/experiments/v0/key-value/{id}/#
- Parameters:
id (integer) – A unique integer value identifying this Experiment Key-Value Pair.
- Status Codes:
204 No Content – No response body
- GET /api/frontend_site_config/v1/#
Return frontend site configuration.
Usage
GET /api/frontend_site_config/v1/
GET Response Values ``` {
“siteName”: “My Open edX Site”, “baseUrl”: “https://apps.example.com”, “lmsBaseUrl”: “https://courses.example.com”, “loginUrl”: “https://courses.example.com/login”, “logoutUrl”: “https://courses.example.com/logout”, …
}#
- status 200:
No response body
- GET /api/grades/v1/courses/#
Gets a course progress status. Args:
request (Request): Django request object. course_id (string): URI element specifying the course location.
Can also be passed as a GET parameter instead.
- Return:
A JSON serialized representation of the requesting user’s current grade status.
- Status Codes:
200 OK – No response body
- GET /api/grades/v1/courses/{course_id}/#
Gets a course progress status. Args:
request (Request): Django request object. course_id (string): URI element specifying the course location.
Can also be passed as a GET parameter instead.
- Return:
A JSON serialized representation of the requesting user’s current grade status.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/grades/v1/gradebook/{course_id}/#
Checks for course author access for the given course by the requesting user. Calls the view function if has access, otherwise raises a 403.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/grades/v1/gradebook/{course_id}/bulk-update#
Checks for course author access for the given course by the requesting user. Calls the view function if has access, otherwise raises a 403.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/grades/v1/gradebook/{course_id}/grading-info#
Checks for course author access for the given course by the requesting user. Calls the view function if has access, otherwise raises a 403.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/grades/v1/policy/courses/{course_id}/#
Use Case
Get the course grading policy.
Example requests:
GET /api/grades/v1/policy/courses/{course_id}/
Response Values
assignment_type: The type of the assignment, as configured by course staff. For example, course staff might make the assignment types Homework, Quiz, and Exam.
count: The number of assignments of the type.
dropped: Number of assignments of the type that are dropped.
weight: The weight, or effect, of the assignment type on the learner’s final grade.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/grades/v1/section_grades_breakdown/#
Use Cases
Get a list of all grades for all sections, optionally filtered by a course ID or list of usernames.
Example Requests
GET /api/grades/v1/section_grades_breakdown
GET /api/grades/v1/section_grades_breakdown?course_id={course_id}
GET /api/grades/v1/section_grades_breakdown?username={username},{username},{username}
GET /api/grades/v1/section_grades_breakdown?course_id={course_id}&username={username}
Query Parameters for GET
- course_id: Filters the result to course grade status for the course corresponding to the
given course ID. The value must be URL encoded. Optional.
- username: List of comma-separated usernames. Filters the result to the course grade status
of the given users. Optional.
page_size: Number of results to return per page. Optional.
Response Values
If the request for information about the course grade status is successful, an HTTP 200 “OK” response is returned.
The HTTP 200 response has the following values.
results: A list of the course grading status matching the request.
course_id: Course ID of the course in the course grading status.
user: Username of the user in the course enrollment.
passed: Boolean flag for user passing the course.
current_grade: An integer representing the current grade of the course.
section_breakdown: A summary of each course section’s grade.
- A dictionary in the section_breakdown list has the following keys:
percent: A float percentage for the section.
label: A short string identifying the section. Preferably fixed-length. E.g. “HW 3”.
detail: A string explanation of the score. E.g. “Homework 1 - Ohms Law - 83% (5/6)”
category: A string identifying the category.
- prominent: A boolean value indicating that this section should be displayed as more prominent
than other items.
- next: The URL to the next page of results, or null if this is the
last page.
- previous: The URL to the next page of results, or null if this
is the first page.
If the user is not logged in, a 401 error is returned.
If the user is not global staff, a 403 error is returned.
If the specified course_id is not valid or any of the specified usernames are not valid, a 400 error is returned.
If the specified course_id does not correspond to a valid course or if all the specified usernames do not correspond to valid users, an HTTP 200 “OK” response is returned with an empty ‘results’ field.
- Status Codes:
200 OK – No response body
- GET /api/grades/v1/submission_history/{course_id}/#
Get submission history details. This submission history is related to only ProblemBlock and it doesn’t support LegacyLibraryContentBlock or ContentLibraries as of now.
Usecases:
Users with GlobalStaff status can retrieve everyone’s submission history.
Example Requests:
GET /api/grades/v1/submission_history/{course_id} GET /api/grades/v1/submission_history/{course_id}/?username={username}
Query Parameters for GET
course_id: Course id to retrieve submission history.
username: Single username for which this view will retrieve the submission history details.
Response Values:
If there’s an error while getting the submission history an empty response will be returned. The submission history response has the following attributes:
- Results: A list of submission history:
course_id: Course id
course_name: Course name
user: Username
- problems: List of problems
location: problem location
name: problem’s display name
- submission_history: List of submission history
state: State of submission.
grade: Grade.
max_grade: Maximum possible grade.
data: problem’s data.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/grades/v1/subsection/{subsection_id}/#
Returns subection grade data, override grade data and a history of changes made to a specific users specific subsection grade.
- Args:
subsection_id: String representation of a usage_key, which is an opaque key of a persistant subection grade. user_id: An integer represenation of a user
- Parameters:
subsection_id (string)
- Status Codes:
200 OK – No response body
- GET /api/instructor/v1/reports/{course_id}#
List report CSV files that are available for download for this course.
Use Cases
Lists reports available for download
Example Requests:
GET /api/instructor/v1/reports/{course_id}
- “downloads”: [
- {
“url”: “https://1.mock.url”, “link”: “<a href=”https://1.mock.url”>mock_file_name_1</a>”, “name”: “mock_file_name_1”
}
]
}#
The report name will depend on the type of report generated. For example a problem responses report for an entire course might be called:
edX_DemoX_Demo_Course_student_state_from_block-v1_edX+DemoX+Demo_Course+type@course+block@course_2021-04-30-0918.csv
- param string course_id:
ID for the course whose reports need to be listed.
- query string report_name:
Filter results to only return details of for the report with the specified name.
- status 200:
- status 401:
The requesting user is not authenticated.
- status 403:
The requesting user lacks access to the course.
- status 404:
The requested course does not exist.
- POST /api/instructor/v1/reports/{course_id}/generate/problem_responses#
Initiate generation of a CSV file containing all student answers to a given problem.
Example requests
- POST /api/instructor/v1/reports/{course_id}/generate/problem_responses {
- “problem_locations”: [
“{usage_key1}”, “{usage_key2}”, “{usage_key3}”
]
} POST /api/instructor/v1/reports/{course_id}/generate/problem_responses {
“problem_locations”: [“{usage_key}”], “problem_types_filter”: [“problem”]
}
POST Parameters
A POST request can include the following parameters:
problem_location: A list of usage keys for the blocks to include in the report. If the location is a block that contains other blocks, (such as the course, section, subsection, or unit blocks) then all blocks under that block will be included in the report.
problem_types_filter: Optional. A comma-separated list of block types to include in the report. If set, only blocks of the specified types will be included in the report.
To get data on all the poll and survey blocks in a course, you could POST the usage key of the course for problem_location, and “poll, survey” as the value for problem_types_filter.
Example Response: If initiation is successful (or generation task is already running): ```json {
“status”: “The problem responses report is being created. …”, “task_id”: “4e49522f-31d9-431a-9cff-dd2a2bf4c85a”
}#
Responds with BadRequest if any of the provided problem locations are faulty.
- param string course_id:
ID of the course for which report is to be generate.
- status 200:
- status 400:
The provided parameters were invalid. Make sure you’ve provided at least one valid usage key for problem_locations.
- status 401:
The requesting user is not authenticated.
- status 403:
The requesting user lacks access to the course.
- GET /api/instructor/v1/tasks/{course_id}#
List instructor tasks filtered by course_id.
Use Cases
Lists currently running instructor tasks
- Parameters
With no arguments, lists running tasks.
problem_location_str lists task history for problem
- problem_location_str and unique_student_identifier lists task
history for problem AND student (intersection)
Example Requests:
GET /courses/{course_id}/instructor/api/v0/tasks
- {
- “tasks”: [
- {
“status”: “Incomplete”, “task_type”: “grade_problems”, “task_id”: “2519ff31-22d9-4a62-91e2-55495895b355”, “created”: “2019-01-15T18:00:15.902470+00:00”, “task_input”: “{}”, “duration_sec”: “unknown”, “task_message”: “No status information available”, “requester”: “staff”, “task_state”: “PROGRESS”
}
]
}
- Parameters:
course_id (string) – ID for the course whose tasks need to be listed.
- Query Parameters:
problem_location_str (string) – Filter instructor tasks to this problem location.
unique_student_identifier (string) – Filter tasks to a singe problem and a single student. Must be used in combination with problem_location_str.
- Status Codes:
200 OK –
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks access to the course.
404 Not Found – The requested course does not exist.
- GET /api/instructor/v2/courses/{course_id}#
Retrieve comprehensive course information including metadata, enrollment statistics, dashboard configuration, and user permissions.
Use Cases
Retrieve comprehensive course metadata including enrollment counts, dashboard configuration, permissions, and navigation sections.
Example Requests
GET /api/instructor/v2/courses/{course_id}
Response Values
- {
“course_id”: “course-v1:edX+DemoX+Demo_Course”, “display_name”: “Demonstration Course”, “org”: “edX”, “course_number”: “DemoX”, “enrollment_start”: “2013-02-05T00:00:00Z”, “enrollment_end”: null, “start”: “2013-02-05T05:00:00Z”, “end”: “2024-12-31T23:59:59Z”, “pacing”: “instructor”, “has_started”: true, “has_ended”: false, “total_enrollment”: 150, “enrollment_counts”: {
“total”: 150, “audit”: 100, “verified”: 40, “honor”: 10
}, “num_sections”: 12, “grade_cutoffs”: “A is 0.9, B is 0.8, C is 0.7, D is 0.6”, “course_errors”: [], “studio_url”: “https://studio.example.com/course/course-v1:edX+DemoX+2024”, # May be null if user does not have access: “admin_console_url”: “http://apps.local.openedx.io:2025/admin-console/authz”, “permissions”: {
“admin”: false, “instructor”: true, “finance_admin”: false, “sales_admin”: false, “staff”: true, “forum_admin”: true, “data_researcher”: false
}, “tabs”: [
- {
“tab_id”: “courseware”, “title”: “Course”, “url”: “INSTRUCTOR_MICROFRONTEND_URL/courses/course-v1:edX+DemoX+2024/courseware”
}, {
“tab_id”: “progress”, “title”: “Progress”, “url”: “INSTRUCTOR_MICROFRONTEND_URL/courses/course-v1:edX+DemoX+2024/progress”
},
], “disable_buttons”: false, “analytics_dashboard_message”: “To gain insights into student enrollment and participation…”
}
Parameters
course_key: Course key for the course.
Returns
200: OK - Returns course metadata
401: Unauthorized - User is not authenticated
403: Forbidden - User lacks instructor permissions
404: Not Found - Course does not exist
- Parameters:
course_id (string) – Course key for the course.
- Status Codes:
200 OK –
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – The requested course does not exist.
- POST /api/instructor/v2/courses/{course_id}/{problem}/grading/attempts/reset#
Reset problem attempts for one or all learners.
- Parameters:
course_id (string) – Course key for the course.
problem (string) – Problem block usage key.
- Query Parameters:
learner (string) – Optional: Learner username or email. If omitted, resets all learners (async).
- Status Codes:
200 OK –
400 Bad Request – Invalid parameters provided.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks permission.
404 Not Found – Learner not found.
- PUT /api/instructor/v2/courses/{course_id}/{problem}/grading/scores#
Override a learner’s score.
- Parameters:
course_id (string) – Course key for the course.
problem (string) – Problem block usage key.
- Query Parameters:
learner (string) – Learner username or email (required).
- Status Codes:
400 Bad Request – Invalid parameters or invalid score.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks permission.
404 Not Found – Learner not found.
- POST /api/instructor/v2/courses/{course_id}/{problem}/grading/scores/rescore#
Rescore problem submissions.
- Parameters:
course_id (string) – Course key for the course.
problem (string) – Problem block usage key.
- Query Parameters:
learner (string) – Optional: Learner username or email. If omitted, rescores all learners.
only_if_higher (string) – Optional: If ‘true’, only update scores that are higher than current. May be provided as a query parameter or in the request body (JSON boolean or string).
- Status Codes:
400 Bad Request – Invalid parameters provided.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks permission.
404 Not Found – Learner not found.
- DELETE /api/instructor/v2/courses/{course_id}/{problem}/grading/state#
Delete learner problem state.
- Parameters:
course_id (string) – Course key for the course.
problem (string) – Problem block usage key.
- Query Parameters:
learner (string) – Learner username or email (required).
- Status Codes:
200 OK –
400 Bad Request – Invalid parameters or missing learner.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks permission.
404 Not Found – Learner not found.
- POST /api/instructor/v2/courses/{course_id}/beta_testers/modify#
Add or remove one or more beta testers for the course.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
400 Bad Request – Invalid parameters
403 Forbidden – User does not have permission
- GET /api/instructor/v2/courses/{course_id}/certificates/config#
Retrieve certificate configuration.
- Parameters:
course_id (string) – Course key for the course.
- Status Codes:
200 OK – Returns certificate configuration.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – The requested course does not exist.
- POST /api/instructor/v2/courses/{course_id}/certificates/exceptions#
Grant certificate exceptions (add to allowlist).
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- DELETE /api/instructor/v2/courses/{course_id}/certificates/exceptions#
Remove certificate exception (remove from allowlist).
- Parameters:
course_id (string)
- Status Codes:
204 No Content – No response body
- POST /api/instructor/v2/courses/{course_id}/certificates/exceptions/bulk#
Grant certificate exceptions via CSV upload.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/instructor/v2/courses/{course_id}/certificates/generation_history#
View to retrieve certificate generation history for a course.
Example Requests
GET /api/instructor/v2/courses/{course_id}/certificates/generation_history GET /api/instructor/v2/courses/{course_id}/certificates/generation_history?page=2
Response Values
- {
“count”: 25, “next”: “http://example.com/api/instructor/v2/courses/…/certificates/generation_history?page=2”, “previous”: null, “results”: [
- {
“task_name”: “Regenerated”, “date”: “January 15, 2024”, “details”: “audit not passing states”
}, {
“task_name”: “Generated”, “date”: “January 10, 2024”, “details”: “For exceptions”
]
}
Parameters
course_id: Course key for the course page (optional): Page number for pagination page_size (optional): Number of results per page
Returns
200: OK - Returns paginated list of certificate generation history
401: Unauthorized - User is not authenticated
403: Forbidden - User lacks instructor permissions
404: Not Found - Course does not exist
- Parameters:
course_id (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/instructor/v2/courses/{course_id}/certificates/invalidations#
Invalidate certificates.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- DELETE /api/instructor/v2/courses/{course_id}/certificates/invalidations#
Re-validate certificate (remove invalidation).
- Parameters:
course_id (string)
- Status Codes:
204 No Content – No response body
- GET /api/instructor/v2/courses/{course_id}/certificates/issued#
View to retrieve issued certificates for a course with allowlist and invalidation details.
Example Requests
GET /api/instructor/v2/courses/{course_id}/certificates/issued GET /api/instructor/v2/courses/{course_id}/certificates/issued?search=username GET /api/instructor/v2/courses/{course_id}/certificates/issued?filter=received GET /api/instructor/v2/courses/{course_id}/certificates/issued?page=2&page_size=50
Response Values
- {
“count”: 100, “next”: “http://example.com/api/instructor/v2/courses/…/certificates/issued?page=2”, “previous”: null, “results”: [
- {
“username”: “student1”, “email”: “student1@example.com”, “enrollment_track”: “verified”, “certificate_status”: “downloadable”, “special_case”: “Exception”, “exception_granted”: “January 15, 2024”, “exception_notes”: “Medical emergency”, “invalidated_by”: null, “invalidation_date”: null
]
}
Parameters
course_id: Course key for the course search (optional): Filter by username or email filter (optional): Filter certificates by category:
“all”: All Learners (default)
“received”: Received (downloadable certificates)
“not_received”: Not Received (not passing, unavailable)
“audit_passing”: Audit - Passing
“audit_not_passing”: Audit - Not Passing
“error”: Error State
“granted_exceptions”: Granted Exceptions (allowlisted)
“invalidated”: Invalidated
page (optional): Page number for pagination page_size (optional): Number of results per page
Returns
200: OK - Returns paginated list of issued certificates
401: Unauthorized - User is not authenticated
403: Forbidden - User lacks instructor permissions
404: Not Found - Course does not exist
- Parameters:
course_id (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/instructor/v2/courses/{course_id}/certificates/regenerate#
Initiate certificate regeneration for a course.
- Parameters:
course_id (string) – Course key for the course.
- Status Codes:
200 OK – Certificate regeneration task started successfully
400 Bad Request – Invalid parameters provided.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – The requested course does not exist.
- POST /api/instructor/v2/courses/{course_id}/certificates/toggle_generation#
Toggle certificate generation for a course.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/instructor/v2/courses/{course_id}/change_due_date#
Grants a due date extension to a learner for a particular unit.
- params:
blockId (str): The URL related to the block that needs the due date update. due_datetime (str): The new due date and time for the block. email_or_username (str): The email or username of the learner whose access is being modified.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- GET /api/instructor/v2/courses/{course_id}/enrollments#
List all active enrollments for a course with optional search, filtering, and pagination.
Example Requests
GET /api/instructor/v2/courses/{course_id}/enrollments GET /api/instructor/v2/courses/{course_id}/enrollments?search=john GET /api/instructor/v2/courses/{course_id}/enrollments?is_beta_tester=true GET /api/instructor/v2/courses/{course_id}/enrollments?page=2&page_size=50
Response Values
- {
“course_id”: “course-v1:edX+DemoX+Demo_Course”, “count”: 150, “num_pages”: 15, “current_page”: 1, “start”: 0, “next”: “http://example.com/api/instructor/v2/courses/…/enrollments?page=2”, “previous”: null, “results”: [
- {
“username”: “learner1”, “full_name”: “Jane Doe”, “email”: “jane@example.com”, “mode”: “audit”, “is_beta_tester”: false
]
}
Parameters
course_id: Course key for the course. search (optional): Filter by username, email, first name, or last name. is_beta_tester (optional): Filter by beta tester status (true/false). page (optional): Page number for pagination. page_size (optional): Number of results per page (default: 10, max: 100).
Returns
200: OK - Returns paginated list of active enrollments
401: Unauthorized - User is not authenticated
403: Forbidden - User lacks instructor permissions
- Parameters:
course_id (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/instructor/v2/courses/{course_id}/enrollments/modify#
Enroll or unenroll one or more learners in the course.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
400 Bad Request – Invalid parameters
403 Forbidden – User does not have permission
- GET /api/instructor/v2/courses/{course_id}/graded_subsections#
Retrieves a list of graded subsections (units with due dates) within a specified course.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/instructor/v2/courses/{course_id}/grading-config#
Retrieve the grading configuration for a course as an HTML summary.
- Parameters:
course_id (string) – Course key for the course.
- Status Codes:
200 OK – HTML-formatted grading configuration summary
400 Bad Request – Invalid parameters provided.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – Course does not exist.
- GET /api/instructor/v2/courses/{course_id}/instructor_tasks#
List instructor tasks for a course.
- Parameters:
course_id (string) – Course key for the course.
- Query Parameters:
problem_location_str (string) – Optional: Filter tasks to a specific problem location.
unique_student_identifier (string) – Optional: Filter tasks to a specific student (requires problem_location_str).
- Status Codes:
200 OK –
400 Bad Request – Invalid parameters provided.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – The requested course does not exist.
- GET /api/instructor/v2/courses/{course_id}/learners/{email_or_username}#
Retrieve comprehensive learner information including profile, enrollment status, progress URLs, and current grading data.
- Parameters:
course_id (string) – Course key for the course.
email_or_username (string) – Learner’s username or email address
- Status Codes:
200 OK – Learner information retrieved successfully
400 Bad Request – Invalid parameters provided.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – Learner not found or course does not exist.
- GET /api/instructor/v2/courses/{course_id}/ora#
Return a list of all ORAs for the specified course.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- GET /api/instructor/v2/courses/{course_id}/ora_summary#
Return a summary of ORAs for the specified course.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- GET /api/instructor/v2/courses/{course_id}/problems/{location}#
Retrieve problem metadata including display name, location in course hierarchy, and usage key.
- Parameters:
course_id (string) – Course key for the course.
location (string) – Problem block usage key
- Status Codes:
200 OK – Problem information retrieved successfully
400 Bad Request – Invalid parameters provided.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – Problem not found or course does not exist.
- GET /api/instructor/v2/courses/{course_id}/proctoring_settings#
Retrieve proctoring configuration for the course.
- Parameters:
course_id (string) – Course key for the course.
- Status Codes:
200 OK –
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks access.
404 Not Found – Course not found.
- PATCH /api/instructor/v2/courses/{course_id}/proctoring_settings#
Update proctoring settings for the course.
- Parameters:
course_id (string) – Course key for the course.
- Status Codes:
200 OK –
400 Bad Request – Invalid parameters.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks access.
404 Not Found – Course not found.
- GET /api/instructor/v2/courses/{course_id}/reports#
List all available report downloads for a course.
- Parameters:
course_id (string) – Course key for the course.
- Status Codes:
200 OK – Returns list of available report downloads.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – The requested course does not exist.
- POST /api/instructor/v2/courses/{course_id}/reports/{report_type}/generate#
Generate a specific type of report for a course.
- Parameters:
course_id (string) – Course key for the course.
report_type (string) – Type of report to generate. Valid values: enrolled_students, pending_enrollments, pending_activations, anonymized_student_ids, grade, problem_grade, problem_responses, ora2_summary, ora2_data, ora2_submission_files, issued_certificates
- Status Codes:
200 OK – Report generation task has been submitted successfully.
400 Bad Request – The requested task is already running or invalid report type.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – The requested course does not exist.
- GET /api/instructor/v2/courses/{course_id}/special_exams#
List all proctored/timed exams in the course.
- Parameters:
course_id (string) – Course key for the course.
- Status Codes:
200 OK –
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks access.
- GET /api/instructor/v2/courses/{course_id}/special_exams/{exam_id}#
Retrieve details for a specific special exam.
- Parameters:
course_id (string) – Course key for the course.
exam_id (string) – Exam identifier.
- Status Codes:
200 OK –
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks access.
404 Not Found – Exam not found.
- POST /api/instructor/v2/courses/{course_id}/special_exams/{exam_id}/allowance#
Grant an allowance for a student on a proctored exam.
- Parameters:
course_id (string) – Course key for the course.
exam_id (string) – Exam identifier.
- Status Codes:
200 OK – Allowance granted successfully.
400 Bad Request – Invalid parameters.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks access.
404 Not Found – Exam not found.
- DELETE /api/instructor/v2/courses/{course_id}/special_exams/{exam_id}/allowance#
Remove allowances for one or more students on a proctored exam.
- Parameters:
course_id (string) – Course key for the course.
exam_id (string) – Exam identifier.
- Status Codes:
200 OK – Allowance removed successfully.
400 Bad Request – Invalid parameters.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks access.
404 Not Found – Exam not found.
- GET /api/instructor/v2/courses/{course_id}/special_exams/{exam_id}/attempts#
List all attempts for a specific proctored exam.
Example Request
GET /api/instructor/v2/courses/{course_id}/special_exams/{exam_id}/attempts
- Parameters:
course_id (string)
exam_id (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/instructor/v2/courses/{course_id}/special_exams/{exam_id}/reset/{username}#
Reset a student’s proctored exam attempt.
- Parameters:
course_id (string) – Course key for the course.
exam_id (string) – Exam identifier.
username (string) – Student’s username.
- Status Codes:
200 OK – Attempt reset successfully.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks access.
404 Not Found – Exam or user not found.
- GET /api/instructor/v2/courses/{course_id}/special_exams/allowances#
List or bulk-create exam allowances for a course.
Example Requests
GET /api/instructor/v2/courses/{course_id}/special_exams/allowances GET /api/instructor/v2/courses/{course_id}/special_exams/allowances?search=student1 GET /api/instructor/v2/courses/{course_id}/special_exams/allowances?ordering=-value POST /api/instructor/v2/courses/{course_id}/special_exams/allowances
Query Parameters
search (optional): Filter by username or email. ordering (optional): Sort by field. Prefix with ‘-’ for descending.
Valid values: username, email, exam_name, allowance_type, value.
page (optional): Page number for pagination. page_size (optional): Number of results per page.
- Parameters:
course_id (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/instructor/v2/courses/{course_id}/special_exams/allowances#
Bulk-create allowances across multiple exams and users.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- GET /api/instructor/v2/courses/{course_id}/special_exams/attempts#
List all exam attempts across all exams in a course with optional search, sorting, and pagination.
Example Requests
GET /api/instructor/v2/courses/{course_id}/special_exams/attempts GET /api/instructor/v2/courses/{course_id}/special_exams/attempts?search=student1 GET /api/instructor/v2/courses/{course_id}/special_exams/attempts?ordering=-started_at GET /api/instructor/v2/courses/{course_id}/special_exams/attempts?page=2&page_size=50
Query Parameters
search (optional): Filter by username or email. ordering (optional): Sort by field. Prefix with ‘-’ for descending.
Valid values: username, exam_name, time_limit, type, started_at, completed_at, status.
page (optional): Page number for pagination. page_size (optional): Number of results per page.
- Parameters:
course_id (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/instructor/v2/courses/{course_id}/tasks/{task_id}#
Check the status of a background task.
- Parameters:
course_id (string) – Course key for the course.
task_id (string) – Task identifier returned from async operation
- Status Codes:
200 OK – Task status retrieved successfully
400 Bad Request – Invalid parameters provided.
401 Unauthorized – The requesting user is not authenticated.
403 Forbidden – The requesting user lacks instructor access to the course.
404 Not Found – Task not found.
- GET /api/instructor/v2/courses/{course_id}/team#
List course team members, optionally filtered by role and identity.
If no role is specified, returns members across all course and forum roles. The optional
email_or_usernamequery param performs a case-insensitive substring match against username and email.Results are paginated via
pageandpage_size.- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/instructor/v2/courses/{course_id}/team#
Grant or revoke a course role for one or more users.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- DELETE /api/instructor/v2/courses/{course_id}/team/{email_or_username}#
Revoke one or more course roles from a user.
- Parameters:
course_id (string)
email_or_username (string)
- Status Codes:
204 No Content – No response body
- GET /api/instructor/v2/courses/{course_id}/team/roles#
Return the list of available course team roles for this course.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/instructor/v2/courses/{course_id}/unit_extensions#
Retrieve a paginated list of due date extensions for units in a course.
Example Requests
GET /api/instructor/v2/courses/{course_id}/unit_extensions GET /api/instructor/v2/courses/{course_id}/unit_extensions?page=2 GET /api/instructor/v2/courses/{course_id}/unit_extensions?page_size=50 GET /api/instructor/v2/courses/{course_id}/unit_extensions?email_or_username=john GET /api/instructor/v2/courses/{course_id}/unit_extensions?block_id=block-v1:org@problem+block@unit1
Response Values
- {
“count”: 150, “next”: “http://example.com/api/instructor/v2/courses/course-v1:org+course+run/unit_extensions?page=2”, “previous”: null, “results”: [
- {
“username”: “student1”, “full_name”: “John Doe”, “email”: “john.doe@example.com”, “unit_title”: “Unit 1: Introduction”, “unit_location”: “block-v1:org+course+run+type@problem+block@unit1”, “extended_due_date”: “2023-12-25T23:59:59Z”
]
}
Parameters
course_id: Course key for the course. page (optional): Page number for pagination. page_size (optional): Number of results per page.
Returns
200: OK - Returns paginated list of unit extensions
401: Unauthorized - User is not authenticated
403: Forbidden - User lacks instructor permissions
404: Not Found - Course does not exist
- Parameters:
course_id (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/instructor_task/v1/schedules/{course_id}/bulk_email/#
Read only view to list all scheduled bulk email messages for a course-run.
Path: GET api/instructor_task/v1/schedules/{course_id}/bulk_email
- Returns:
- 200: OK - Contains a list of all scheduled bulk email instructor tasks that haven’t been executed yet. This
data also includes information about the and course email instance associated with each task.
403: User does not have the required role to view this data.
- Parameters:
course_id (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- PUT /api/instructor_task/v1/schedules/{course_id}/bulk_email/{schedule_id}#
- A view that supports the modification of instructor task schedules. It provides the ability to:
Delete an instructor task schedule
Update an instructor task schedule and/or update the course email associated with the scheduled task.
Path: DELETE or PATCH api/instructor_task/v1/schedules/{course_id}/bulk_email/{task_schedule_id}
- Returns:
200: The schedule or email content was updated successfully.
204: No Content - Deleting the schedule was successful.
400: Bad request - Updating the email content or schedule failed due to bad data in the request.
403: User does not have permission to modify the object specified.
404: Requested schedule object could not be found and thus could not be modified or removed.
- Parameters:
course_id (string)
schedule_id (string)
- Status Codes:
200 OK –
- PATCH /api/instructor_task/v1/schedules/{course_id}/bulk_email/{schedule_id}#
- A view that supports the modification of instructor task schedules. It provides the ability to:
Delete an instructor task schedule
Update an instructor task schedule and/or update the course email associated with the scheduled task.
Path: DELETE or PATCH api/instructor_task/v1/schedules/{course_id}/bulk_email/{task_schedule_id}
- Returns:
200: The schedule or email content was updated successfully.
204: No Content - Deleting the schedule was successful.
400: Bad request - Updating the email content or schedule failed due to bad data in the request.
403: User does not have permission to modify the object specified.
404: Requested schedule object could not be found and thus could not be modified or removed.
- Parameters:
course_id (string)
schedule_id (string)
- Status Codes:
200 OK –
- DELETE /api/instructor_task/v1/schedules/{course_id}/bulk_email/{schedule_id}#
- A view that supports the modification of instructor task schedules. It provides the ability to:
Delete an instructor task schedule
Update an instructor task schedule and/or update the course email associated with the scheduled task.
Path: DELETE or PATCH api/instructor_task/v1/schedules/{course_id}/bulk_email/{task_schedule_id}
- Returns:
200: The schedule or email content was updated successfully.
204: No Content - Deleting the schedule was successful.
400: Bad request - Updating the email content or schedule failed due to bad data in the request.
403: User does not have permission to modify the object specified.
404: Requested schedule object could not be found and thus could not be modified or removed.
- Parameters:
course_id (string)
schedule_id (string)
- Status Codes:
204 No Content – No response body
- GET /api/learner_home/init/#
Get masquerade user and proxy to init request
- Status Codes:
200 OK – No response body
- GET /api/learner_home/mock/init/#
Returns static JSON authored in MOCK_DATA_FILE
- Status Codes:
200 OK – No response body
- GET /api/learner_home/v1/programs/#
For a learner, get list of enrolled programs with progress. If an enterprise UUID ias provided, filter out all non-enterprise enrollments for the learner.
Example Request
GET /api/dashboard/v1/programs/{enterprise_uuid}/
Parameters
enterprise_uuid: UUID of an enterprise customer.
Example Response
- [
- {
“uuid”: “ff41a5eb-2a73-4933-8e80-a1c66068ed2c”, “title”: “Demonstration Program”, “type”: “MicroMasters”, “banner_image”: {
- “large”: {
“url”: “http://example.com/images/foo.large.jpg”, “width”: 1440, “height”: 480
}, “medium”: {
“url”: “http://example.com/images/foo.medium.jpg”, “width”: 726, “height”: 242
}, “small”: {
“url”: “http://example.com/images/foo.small.jpg”, “width”: 435, “height”: 145
}, “x-small”: {
“url”: “http://example.com/images/foo.x-small.jpg”, “width”: 348, “height”: 116
}
}, “authoring_organizations”: [
- {
“key”: “example”
}
], “progress”: {
“uuid”: “ff41a5eb-2a73-4933-8e80-a1c66068ed2c”, “completed”: 0, “in_progress”: 0, “not_started”: 2
}
}
]
- Status Codes:
200 OK – No response body
- GET /api/learner_home/v1/programs/{enterprise_uuid}/#
For a learner, get list of enrolled programs with progress. If an enterprise UUID ias provided, filter out all non-enterprise enrollments for the learner.
Example Request
GET /api/dashboard/v1/programs/{enterprise_uuid}/
Parameters
enterprise_uuid: UUID of an enterprise customer.
Example Response
- [
- {
“uuid”: “ff41a5eb-2a73-4933-8e80-a1c66068ed2c”, “title”: “Demonstration Program”, “type”: “MicroMasters”, “banner_image”: {
- “large”: {
“url”: “http://example.com/images/foo.large.jpg”, “width”: 1440, “height”: 480
}, “medium”: {
“url”: “http://example.com/images/foo.medium.jpg”, “width”: 726, “height”: 242
}, “small”: {
“url”: “http://example.com/images/foo.small.jpg”, “width”: 435, “height”: 145
}, “x-small”: {
“url”: “http://example.com/images/foo.x-small.jpg”, “width”: 348, “height”: 116
}
}, “authoring_organizations”: [
- {
“key”: “example”
}
], “progress”: {
“uuid”: “ff41a5eb-2a73-4933-8e80-a1c66068ed2c”, “completed”: 0, “in_progress”: 0, “not_started”: 2
}
}
]
- Parameters:
enterprise_uuid (string)
- Status Codes:
200 OK – No response body
- GET /api/learner_home/v1/programs/{program_uuid}/progress_details/#
Retrieves progress details of a learner in a specified program.
Example Request
GET api/dashboard/v1/programs/{program_uuid}/progress_details/
Parameters
program_uuid: A string representation of the uuid of the program.
Response Values
If the request for information about the program is successful, an HTTP 200 “OK” response is returned.
The HTTP 200 response has the following values.
urls: Urls to enroll/purchase a course or view program record.
program_data: Holds meta information about the program.
course_data: Learner’s progress details for all courses in the program (in-progress/remaining/completed).
- certificate_data: Details about learner’s certificates status for all courses in the program and the
program itself.
industry_pathways: Industry pathways for the program, comes under additional credit opportunities.
credit_pathways: Credit pathways for the program, comes under additional credit opportunities.
Example Response
- {
- “urls”: {
“program_listing_url”: “/dashboard/programs/”, “track_selection_url”: “/course_modes/choose/”, “commerce_api_url”: “/api/commerce/v1/baskets/”, “buy_button_url”: “http://example.com/basket/add/?”, “program_record_url”: “https://example.com/records/programs/8675309”
}, “program_data”: {
“uuid”: “a156a6e2-de91-4ce7-947a-888943e6b12a”, “title”: “Demonstration Program”, “subtitle”: “”, “type”: “MicroMasters”, “status”: “active”, “marketing_slug”: “demo-program”, “marketing_url”: “micromasters/demo-program”, “authoring_organizations”: [], “card_image_url”: “http://example.com/asset-v1:DemoX+Demo_Course.jpg”, “is_program_eligible_for_one_click_purchase”: false, “pathway_ids”: [
1, 2
], “is_learner_eligible_for_one_click_purchase”: false, “skus”: [“AUD90210”],
}, “course_data”: {
“uuid”: “a156a6e2-de91-4ce7-947a-888943e6b12a”, “completed”: [], “in_progress”: [], “not_started”: [
- {
“key”: “example+DemoX”, “uuid”: “fe1a9ad4-a452-45cd-80e5-9babd3d43f96”, “title”: “Demonstration Course”, “course_runs”: [], “entitlements”: [], “owners”: [], “image”: “”, “short_description”: “”, “type”: “457f07ec-a78f-45b4-ba09-5fb176520d8a”,
}
],
}, “certificate_data”: [{
“type”: “course”, “title”: “Demo Course”, ‘url’: “/certificates/8675309”,
}], “industry_pathways”: [
- {
“id”: 2, “uuid”: “1b8fadf1-f6aa-4282-94e3-325b922a027f”, “name”: “Demo Industry Pathway”, “org_name”: “example”, “email”: “example@example.com”, “description”: “Sample demo industry pathway”, “destination_url”: “http://example.edu/online/pathways/example-methods”, “pathway_type”: “industry”, “program_uuids”: [
“a156a6e2-de91-4ce7-947a-888943e6b12a”
]
}
], “credit_pathways”: [
- {
“id”: 1, “uuid”: “86b9701a-61e6-48a2-92eb-70a824521c1f”, “name”: “Demo Credit Pathway”, “org_name”: “example”, “email”: “example@example.com”, “description”: “Sample demo credit pathway!”, “destination_url”: “http://example.edu/online/pathways/example-thinking”, “pathway_type”: “credit”, “program_uuids”: [
“a156a6e2-de91-4ce7-947a-888943e6b12a”
]
}
]
}
- Parameters:
program_uuid (string)
- Status Codes:
200 OK – No response body
- GET /api/learning_sequences/v1/course_outline/{course_key_str}#
The CourseOutline, customized for a given user.
TODO: Swagger docs of API. For an exemplar to imitate, see: openedx/edx-platform
- Parameters:
course_key_str (string)
- Status Codes:
200 OK – No response body
- GET /api/lti_consumer/v1/lti/{lti_config_id}/lti-ags#
LineItem endpoint implementation from LTI Advantage.
See full documentation at: https://www.imsglobal.org/spec/lti-ags/v2p0#line-item-service
- Parameters:
lti_config_id (string)
- Status Codes:
200 OK –
- POST /api/lti_consumer/v1/lti/{lti_config_id}/lti-ags#
LineItem endpoint implementation from LTI Advantage.
See full documentation at: https://www.imsglobal.org/spec/lti-ags/v2p0#line-item-service
- Parameters:
lti_config_id (string)
- Status Codes:
- GET /api/lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}#
LineItem endpoint implementation from LTI Advantage.
See full documentation at: https://www.imsglobal.org/spec/lti-ags/v2p0#line-item-service
- Parameters:
id (string)
lti_config_id (string)
- Status Codes:
200 OK –
- PUT /api/lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}#
LineItem endpoint implementation from LTI Advantage.
See full documentation at: https://www.imsglobal.org/spec/lti-ags/v2p0#line-item-service
- Parameters:
id (string)
lti_config_id (string)
- Status Codes:
200 OK –
- PATCH /api/lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}#
LineItem endpoint implementation from LTI Advantage.
See full documentation at: https://www.imsglobal.org/spec/lti-ags/v2p0#line-item-service
- Parameters:
id (string)
lti_config_id (string)
- Status Codes:
200 OK –
- DELETE /api/lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}#
LineItem endpoint implementation from LTI Advantage.
See full documentation at: https://www.imsglobal.org/spec/lti-ags/v2p0#line-item-service
- Parameters:
id (string)
lti_config_id (string)
- Status Codes:
204 No Content – No response body
- GET /api/lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}/results/#
Return a Result list for an LtiAgsLineItem
- URL Parameters:
user_id (string): String external user id representation.
- Query Parameters:
- limit (integer): The maximum number of records to return. Records are
sorted with most recent timestamp first
- Returns:
- An array of Result records, formatted by LtiAgsResultSerializer
and returned with the media-type for LineItemResultsRenderer
- Parameters:
id (string)
lti_config_id (string)
- Status Codes:
200 OK –
- POST /api/lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}/scores#
Create a Score record for an LtiAgsLineItem
- Data:
A JSON object capable of being serialized by LtiAgsScoreSerializer
- Returns:
- An copy of the saved record, formatted by LtiAgsScoreSerializer
and returned with the media-type for LineItemScoreRenderer
- Parameters:
id (string)
lti_config_id (string)
- Status Codes:
200 OK –
- GET /api/lti_consumer/v1/lti/{lti_config_id}/memberships#
Overrides default list method of ModelViewSet. Calls LMS get_course_members API and returns result.
Supports manual pagination via
limitandpagequery parameters (per NRPS 2.0 §2.4.2):limit (positive integer): Maximum members per page. When absent, all members are returned and no pagination Link header is emitted.
page (positive integer, default 1): 1-indexed page number. Only consulted when
limitis present and valid.
When
limitis present and more members remain after the current page, aLinkheader withrel="next"is included whose URL carries the samelimitand an incrementedpage.- Parameters:
lti_config_id (string)
- Status Codes:
200 OK – No response body
- GET /api/lti_consumer/v1/lti/{lti_config_id}/memberships/{id}#
LTI NRPS Context Membership Service endpoint.
See full documentation at: http://imsglobal.org/spec/lti-nrps/v2p0
- Parameters:
id (string)
lti_config_id (string)
- Status Codes:
200 OK – No response body
- GET /api/mfe_config/v1#
Return the MFE configuration, optionally including MFE-specific overrides.
This configuration currently also pulls specific settings from site configuration or django settings. This is a temporary change as a part of the migration of some legacy pages to MFEs. This is a temporary compatibility layer which will eventually be deprecated.
See [DEPR ticket](openedx/edx-platform#37210) for more details.
The compatibility means that settings from the legacy locations will continue to work but the settings listed below in the get_legacy_config function should be added to the MFE config by operators.
Usage
Get common config: GET /api/mfe_config/v1
Get app config (common + app-specific overrides): GET /api/mfe_config/v1?mfe=name_of_mfe
GET Response Values ``` {
“BASE_URL”: “https://name_of_mfe.example.com”, “LANGUAGE_PREFERENCE_COOKIE_NAME”: “example-language-preference”, “CREDENTIALS_BASE_URL”: “https://credentials.example.com”, “DISCOVERY_API_BASE_URL”: “https://discovery.example.com”, “LMS_BASE_URL”: “https://courses.example.com”, “LOGIN_URL”: “https://courses.example.com/login”, “LOGOUT_URL”: “https://courses.example.com/logout”, “STUDIO_BASE_URL”: “https://studio.example.com”, “LOGO_URL”: “https://courses.example.com/logo.png”, “ENABLE_COURSE_SORTING_BY_START_DATE”: True, “HOMEPAGE_COURSE_MAX”: 10, … and so on
}#
- query string mfe:
Name of an MFE (a.k.a. an APP_ID).
- status 200:
No response body
- GET /api/mfe_context#
Returns - dynamic registration fields - dynamic optional fields - the context for third party auth providers - user country code - the currently running pipeline.
- Arguments:
- request (HttpRequest): The request, used to determine if a pipeline
is currently running.
- kwargs (dict):
- tpa_hint (string): An override flag that will return a matching provider
as long as its configuration has been enabled
is_register_page (bool): Determine the call is from register or login page is_welcome_page (bool): Checks if the call is from the Welcome Page
- Status Codes:
200 OK – No response body
- GET /api/notifications/#
API view for listing notifications for a user.
Permissions: User must be authenticated. Response Format (paginated):
- {
- “results”[
- {
“id”: (int) notification_id, “app_name”: (str) app_name, “notification_type”: (str) notification_type, “content”: (str) content, “content_context”: (dict) content_context, “content_url”: (str) content_url, “last_read”: (datetime) last_read, “last_seen”: (datetime) last_seen
], “count”: (int) total_number_of_notifications, “next”: (str) url_to_next_page_of_notifications, “previous”: (str) url_to_previous_page_of_notifications, “page_size”: (int) number_of_notifications_per_page,
}
Response Error Codes: - 403: The requester cannot access resource.
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/notifications/count/#
Get the unseen notifications count and show_notification_tray flag for a user.
Permissions: User must be authenticated. Response Format: ```json {
“show_notifications_tray”: (bool) show_notifications_tray, “count”: (int) total_number_of_unseen_notifications, “count_by_app_name”: {
(str) app_name: (int) number_of_unseen_notifications, …
}, “notification_expiry_days”: 60
}#
Response Error Codes: - 403: The requester cannot access resource.
- status 200:
No response body
- PUT /api/notifications/mark-seen/{app_name}/#
API view for marking user’s all notifications seen for a provided app_name.
- Parameters:
app_name (string)
- Status Codes:
200 OK – No response body
- PATCH /api/notifications/mark-seen/{app_name}/#
API view for marking user’s all notifications seen for a provided app_name.
- Parameters:
app_name (string)
- Status Codes:
200 OK – No response body
- GET /api/notifications/preferences/update/{username}/#
View to update user preferences from encrypted username and patch. username and patch must be string
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- POST /api/notifications/preferences/update/{username}/#
View to update user preferences from encrypted username and patch. username and patch must be string
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- GET /api/notifications/preferences/update/{username}/{patch}/#
View to update user preferences from encrypted username and patch. username and patch must be string
- Parameters:
patch (string)
username (string)
- Status Codes:
200 OK – No response body
- POST /api/notifications/preferences/update/{username}/{patch}/#
View to update user preferences from encrypted username and patch. username and patch must be string
- Parameters:
patch (string)
username (string)
- Status Codes:
200 OK – No response body
- PATCH /api/notifications/read/#
Marks all notifications or single notification read for the given app name or notification id for the authenticated user.
Requests: PATCH /api/notifications/read/
- Parameters:
- request (Request): The request object containing the app name or notification id.
- {
“app_name”: (str) app_name, “notification_id”: (int) notification_id
}
Returns: - 200: OK status code if the notification or notifications were successfully marked read. - 400: Bad Request status code if the app name is invalid. - 403: Forbidden status code if the user is not authenticated. - 404: Not Found status code if the notification was not found.
- Status Codes:
200 OK – No response body
- GET /api/notifications/v3/configurations/#
Handles GET requests to retrieve notification preferences.
This method fetches the user’s active notification preferences and merges them with a default structure provided. This provides a complete view of all possible notifications and the user’s current settings for them.
- Returns:
- Response: A DRF Response object containing the structured
notification preferences or an error message.
- Status Codes:
200 OK – No response body
- PUT /api/notifications/v3/configurations/#
Handles PUT requests to update notification preferences.
This method updates the user’s notification preferences based on the provided data in the request body. It expects a dictionary with notification types and their settings.
- Returns:
Response: A DRF Response object indicating success or failure.
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/assessments/feedback/{id}/#
View for fetching assessment feedback for a submission.
Methods
- (GET) api/ora_staff_grader/assessments/feedback/from
List all assessments received by a user (according to their submissionUUID) in an ORA assignment.
- (GET) api/ora_staff_grader/assessments/feedback/to
List all assessments given by a user (according to their submissionUUID) in an ORA assignment.
Query Params:
oraLocation (str): ORA location for XBlock handling
submissionUUID (str): The ORA submission UUID
Response:
- {
- assessments (List[dict]): [
- {
“assessment_id: (str) Assessment id “scorer_name: (str) Scorer name “scorer_username: (str) Scorer username “scorer_email: (str) Scorer email “assessment_date: (str) Assessment date “assessment_scores (List[dict]) [
- {
“criterion_name: (str) Criterion name “score_earned: (int) Score earned “score_type: (str) Score type
}
] “problem_step (str) Problem step (Self, Peer, or Staff) “feedback: (str) Feedback of the assessment
}
]
}
Errors:
MissingParamResponse (HTTP 400) for missing params
BadOraLocationResponse (HTTP 400) for bad ORA location
XBlockInternalError (HTTP 500) for an issue with ORA
UnknownError (HTTP 500) for other errors
- Parameters:
id (string)
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/assessments/feedback/from/#
View for fetching assessment feedback for a submission.
Methods
- (GET) api/ora_staff_grader/assessments/feedback/from
List all assessments received by a user (according to their submissionUUID) in an ORA assignment.
- (GET) api/ora_staff_grader/assessments/feedback/to
List all assessments given by a user (according to their submissionUUID) in an ORA assignment.
Query Params:
oraLocation (str): ORA location for XBlock handling
submissionUUID (str): The ORA submission UUID
Response:
- {
- assessments (List[dict]): [
- {
“assessment_id: (str) Assessment id “scorer_name: (str) Scorer name “scorer_username: (str) Scorer username “scorer_email: (str) Scorer email “assessment_date: (str) Assessment date “assessment_scores (List[dict]) [
- {
“criterion_name: (str) Criterion name “score_earned: (int) Score earned “score_type: (str) Score type
}
] “problem_step (str) Problem step (Self, Peer, or Staff) “feedback: (str) Feedback of the assessment
}
]
}
Errors:
MissingParamResponse (HTTP 400) for missing params
BadOraLocationResponse (HTTP 400) for bad ORA location
XBlockInternalError (HTTP 500) for an issue with ORA
UnknownError (HTTP 500) for other errors
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/assessments/feedback/to/#
View for fetching assessment feedback for a submission.
Methods
- (GET) api/ora_staff_grader/assessments/feedback/from
List all assessments received by a user (according to their submissionUUID) in an ORA assignment.
- (GET) api/ora_staff_grader/assessments/feedback/to
List all assessments given by a user (according to their submissionUUID) in an ORA assignment.
Query Params:
oraLocation (str): ORA location for XBlock handling
submissionUUID (str): The ORA submission UUID
Response:
- {
- assessments (List[dict]): [
- {
“assessment_id: (str) Assessment id “scorer_name: (str) Scorer name “scorer_username: (str) Scorer username “scorer_email: (str) Scorer email “assessment_date: (str) Assessment date “assessment_scores (List[dict]) [
- {
“criterion_name: (str) Criterion name “score_earned: (int) Score earned “score_type: (str) Score type
}
] “problem_step (str) Problem step (Self, Peer, or Staff) “feedback: (str) Feedback of the assessment
}
]
}
Errors:
MissingParamResponse (HTTP 400) for missing params
BadOraLocationResponse (HTTP 400) for bad ORA location
XBlockInternalError (HTTP 500) for an issue with ORA
UnknownError (HTTP 500) for other errors
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/initialize#
GET course metadata
- Response: {
courseMetadata oraMetadata submissions isEnabled
}
Errors: - MissingParamResponse (HTTP 400) for missing params - BadOraLocationResponse (HTTP 400) for bad ORA location - XBlockInternalError (HTTP 500) for an issue with ORA - UnknownError (HTTP 500) for other errors
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/mock/initialize#
Returns initial app state
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/mock/submission/grade#
Submit a grade
- Status Codes:
200 OK – No response body
- POST /api/ora_staff_grader/mock/submission/grade#
Save a grade update to the data store
- Status Codes:
200 OK – No response body
- POST /api/ora_staff_grader/mock/submission/lock#
Claim a submission lock, updating lock status
- Status Codes:
200 OK – No response body
- DELETE /api/ora_staff_grader/mock/submission/lock#
Delete a submission lock, updating lock status
- Status Codes:
204 No Content – No response body
- GET /api/ora_staff_grader/mock/submission/status#
Get a submission status, leaving out the response
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/submission#
GET submission contents and assessment info, if any
- Response: {
- gradeData: {
- score: (dict or None) {
pointsEarned: (int) earned points pointsPossible: (int) possible points
} overallFeedback: (string) overall feedback criteria: (list of dict) [{
name: (str) name of criterion feedback: (str) feedback for criterion points: (int) points of selected option or None if feedback-only criterion selectedOption: (str) name of selected option or None if feedback-only criterion
}]
} response: {
text: (list of string), [the html content of text responses] files: (list of dict) [{
downloadUrl: (string) file download url description: (string) file description name: (string) filename
}]
}
}
Errors: - MissingParamResponse (HTTP 400) for missing params - XBlockInternalError (HTTP 500) for an issue with ORA - UnknownError (HTTP 500) for other errors
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/submission/batch/unlock#
POST delete a group of submission locks, limited to just those in the list that the user owns.
Params: - ora_location (str/UsageID): ORA location for XBlock handling
Body: - submissionUUIDs (UUID): A list of submission/team submission UUIDS to lock/unlock
Response: None
Errors: - MissingParamResponse (HTTP 400) for missing params - XBlockInternalError (HTTP 500) for an issue within ORA
- Status Codes:
200 OK – No response body
- POST /api/ora_staff_grader/submission/batch/unlock#
Batch delete submission locks
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/submission/files#
GET file metadata for a submission.
Used to get updated file download links to avoid signed download link expiration issues.
- Response: {
- files: [
downloadUrl (url), description (string), name (string), size (bytes),
]
}
Errors: - MissingParamResponse (HTTP 400) for missing params - XBlockInternalError (HTTP 500) for an issue with ORA - UnknownError (HTTP 500) for other errors
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/submission/grade#
POST submit a grade for a submission
- Body: {
overallFeedback: (string) overall feedback criteria: [
- {
name: (string) name of criterion feedback: (string, optional) feedback for criterion selectedOption: (string) name of selected option or None if feedback-only criterion
}, … (one per criteria)
]
}
- Response: {
gradeStatus: (string) - One of [‘graded’, ‘ungraded’] lockStatus: (string) - One of [‘unlocked’, ‘locked’, ‘in-progress’] gradeData: {
- score: (dict or None) {
pointsEarned: (int) earned points pointsPossible: (int) possible points
} overallFeedback: (string) overall feedback criteria: (list of dict) [{
name: (str) name of criterion feedback: (str) feedback for criterion selectedOption: (str) name of selected option or None if feedback-only criterion
}]
}
}
Errors: - MissingParamResponse (HTTP 400) for missing params - GradeContestedResponse (HTTP 409) for trying to submit a grade for a submission you don’t have an active lock for - XBlockInternalError (HTTP 500) for an issue with ORA - UnknownError (HTTP 500) for other errors
- Status Codes:
200 OK – No response body
- GET /api/ora_staff_grader/submission/lock#
POST claim a submission lock for grading DELETE release a submission lock
Params: - ora_location (str/UsageID): ORA location for XBlock handling - submissionUUID (UUID): A submission to lock/unlock
- Response: {
lockStatus
}
Errors: - MissingParamResponse (HTTP 400) for missing params - LockContestedResponse (HTTP 409) for contested lock - XBlockInternalError (HTTP 500) for an issue with ORA - UnknownError (HTTP 500) for other errors
- Status Codes:
200 OK – No response body
- POST /api/ora_staff_grader/submission/lock#
Claim a submission lock
- Status Codes:
200 OK – No response body
- DELETE /api/ora_staff_grader/submission/lock#
Clear a submission lock
- Status Codes:
204 No Content – No response body
- GET /api/ora_staff_grader/submission/status#
GET submission grade status, lock status, and grade data
- Response: {
gradeStatus: (str) one of [graded, ungraded] lockStatus: (str) one of [locked, unlocked, in-progress] gradeData: {
- score: (dict or None) {
pointsEarned: (int) earned points pointsPossible: (int) possible points
} overallFeedback: (string) overall feedback criteria: (list of dict) [{
name: (str) name of criterion feedback: (str) feedback for criterion points: (int) points of selected option or None if feedback-only criterion selectedOption: (str) name of selected option or None if feedback-only criterion
}]
}
}
Errors: - MissingParamResponse (HTTP 400) for missing params - XBlockInternalError (HTTP 500) for an issue with ORA - UnknownError (HTTP 500) for other errors
- Status Codes:
200 OK – No response body
- GET /api/organizations/v0/organizations/#
- Organization view to:
list organization data (GET …/)
retrieve single organization (GET …/<short_name>)
create or update an organization via the PUT endpoint (PUT …/<short_name>)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/organizations/v0/organizations/{short_name}/#
- Organization view to:
list organization data (GET …/)
retrieve single organization (GET …/<short_name>)
create or update an organization via the PUT endpoint (PUT …/<short_name>)
- Parameters:
short_name (string)
- Status Codes:
200 OK –
- PUT /api/organizations/v0/organizations/{short_name}/#
We perform both Update and Create action via the PUT method.
The ‘active’ field may not be specified via the HTTP API, since it is always assumed to be True. So:
new organizations created through the API are always Active, and
existing organizations updated through the API always end up Active, regardless of whether or not they were previously active.
- Parameters:
short_name (string)
- Status Codes:
200 OK –
- PATCH /api/organizations/v0/organizations/{short_name}/#
We disable PATCH because all updates and creates should use the PUT action above.
- Parameters:
short_name (string)
- Status Codes:
200 OK –
- POST /api/profile_images/v1/{username}/remove#
POST /api/profile_images/v1/{username}/remove
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- POST /api/profile_images/v1/{username}/upload#
POST /api/profile_images/v1/{username}/upload
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- POST /api/program_enrollments/v1/integration-reset#
Reset enrollment and user data for organization
- Status Codes:
200 OK – No response body
- GET /api/program_enrollments/v1/programs/{program_uuid}/courses/{course_id}/enrollments/#
Get a list of students enrolled in a course within a program.
- Parameters:
course_id (string)
program_uuid (string)
- Status Codes:
200 OK – No response body
- POST /api/program_enrollments/v1/programs/{program_uuid}/courses/{course_id}/enrollments/#
Enroll a list of students in a course in a program
- Parameters:
course_id (string)
program_uuid (string)
- Status Codes:
200 OK – No response body
- PUT /api/program_enrollments/v1/programs/{program_uuid}/courses/{course_id}/enrollments/#
Create or Update the program course enrollments of a list of learners
- Parameters:
course_id (string)
program_uuid (string)
- Status Codes:
200 OK – No response body
- PATCH /api/program_enrollments/v1/programs/{program_uuid}/courses/{course_id}/enrollments/#
Modify the program course enrollments of a list of learners
- Parameters:
course_id (string)
program_uuid (string)
- Status Codes:
200 OK – No response body
- GET /api/program_enrollments/v1/programs/{program_uuid}/courses/{course_id}/grades/#
Defines the GET list endpoint for ProgramCourseGrade objects.
- Parameters:
course_id (string)
program_uuid (string)
- Status Codes:
200 OK – No response body
- GET /api/program_enrollments/v1/programs/{program_uuid}/enrollments/#
Defines the GET list endpoint for ProgramEnrollment objects.
- Parameters:
program_uuid (string)
- Status Codes:
200 OK – No response body
- POST /api/program_enrollments/v1/programs/{program_uuid}/enrollments/#
Create program enrollments for a list of learners
- Parameters:
program_uuid (string)
- Status Codes:
200 OK – No response body
- PUT /api/program_enrollments/v1/programs/{program_uuid}/enrollments/#
Create/update program enrollments for a list of learners
- Parameters:
program_uuid (string)
- Status Codes:
200 OK – No response body
- PATCH /api/program_enrollments/v1/programs/{program_uuid}/enrollments/#
Update program enrollments for a list of learners
- Parameters:
program_uuid (string)
- Status Codes:
200 OK – No response body
- GET /api/program_enrollments/v1/programs/{program_uuid}/overview/#
A view for getting data associated with a user’s course enrollments as part of a program enrollment.
Path:
/api/program_enrollments/v1/programs/{program_uuid}/overview/DEPRECATED: This is deprecated in favor of the new UserProgramCourseEnrollmentView, which is paginated. It will be removed in a follow-up to MST-126 after the Programs Learner Portal has been updated to use UserProgramCourseEnrollmentView.
- Parameters:
program_uuid (string)
- Status Codes:
200 OK –
- GET /api/program_enrollments/v1/programs/enrollments/#
How to respond to a GET request to this endpoint
- Status Codes:
200 OK – No response body
- GET /api/program_enrollments/v1/programs/readonly_access/#
How to respond to a GET request to this endpoint
- Status Codes:
200 OK – No response body
- GET /api/program_enrollments/v1/users/{username}/programs/{program_uuid}/courses#
Get an overview of each of a user’s course enrollments associated with a program.
This endpoint exists to get an overview of each course-run enrollment that a user has for course-runs within a given program. Fields included are the title, upcoming due dates, etc. This API endpoint is intended for use with the [Program Learner Portal MFE](openedx/frontend-app-learner-portal-programs).
It is important to note that the set of enrollments that this endpoint returns is different than a user’s set of program-course-run enrollments. Specifically, this endpoint may include course runs that are within the specified program but were not enrolled in via the specified program.
“next”: null, “previous”: null, “results”: [
- {
“course_run_id”: “edX+AnimalsX+Aardvarks”, “display_name”: “Astonishing Aardvarks”, “course_run_url”: “https://courses.edx.org/courses/course-v1:edX+AnimalsX+Aardvarks/course/”, “start_date”: “2017-02-05T05:00:00Z”, “end_date”: “2018-02-05T05:00:00Z”, “course_run_status”: “completed” “emails_enabled”: true, “due_dates”: [
- {
“name”: “Introduction: What even is an aardvark?”, “url”: “https://courses.edx.org/courses/course-v1:edX+AnimalsX+Aardvarks/jump_to/
block-v1:edX+AnimalsX+Aardvarks+type@chapter+block@1414ffd5143b4b508f739b563ab468b7”,
“date”: “2017-05-01T05:00:00Z”
}, {
“name”: “Quiz: Aardvark or Anteater?”, “url”: “https://courses.edx.org/courses/course-v1:edX+AnimalsX+Aardvarks/jump_to/
block-v1:edX+AnimalsX+Aardvarks+type@sequential+block@edx_introduction”,
“date”: “2017-03-05T00:00:00Z”
}
], “micromasters_title”: “Animals”, “certificate_download_url”: “https://courses.edx.org/certificates/123”
}, {
“course_run_id”: “edX+AnimalsX+Baboons”, “display_name”: “Breathtaking Baboons”, “course_run_url”: “https://courses.edx.org/courses/course-v1:edX+AnimalsX+Baboons/course/”, “start_date”: “2018-02-05T05:00:00Z”, “end_date”: null, “course_run_status”: “in_progress” “emails_enabled”: false, “due_dates”: [], “micromasters_title”: “Animals”, “certificate_download_url”: “https://courses.edx.org/certificates/123”, “resume_course_run_url”: “https://courses.edx.org/courses/course-v1:edX+AnimalsX+Baboons/jump_to/
block-v1:edX+AnimalsX+Baboons+type@sequential+block@edx_introduction”
}
]
}#
- param string program_uuid:
UUID of a program. Enrollments will be returned for course runs in this program.
- param string username:
The username of the user for which enrollment overviews will be fetched. For now, this must be the requesting user; otherwise, 403 will be returned. In the future, global staff users may be able to supply other usernames.
- query integer page_size:
Number of results to return per page. Defaults to 10. Maximum is 25.
- status 200:
- status 401:
The requester is not authenticated.
- status 403:
The requester cannot access the specified program and/or the requester may not retrieve this data for the specified user.
- status 404:
The requested program does not exist.
- POST /api/send_account_activation_email#
Returns status code. Arguments:
request (HttpRequest): The request, used to get the user
- Status Codes:
200 OK – No response body
- GET /api/support/v1/manage_course_team/#
Retrieve a list of courses accessible by the authenticated user
Use Case
GET API to retrieve a list of courses accessible by the authenticated user, along with the specified user’s role (“instructor”, “staff”, or null) in each course.
Endpoint
GET /api/support/v1/manage_course_team/
Query Parameters
At least one of the following parameters is required: - email: User’s email address - username: User’s username - user_id: User’s ID
Returns
List of courses accessible to the authenticated user, each annotated with the specified user’s role in that course. Each course includes organizational information and identifiers.
Example Response
- ```json
- {
- “results”: [
- {
“course_id”: “course-v1:edX+DemoX+2025_T1”, “course_name”: “edX Demonstration Course”, “course_url”: “https://studio.example.com/course/course-v1:edX+DemoX+2025_T1”, “role”: “instructor”, “status”: “active”, “org”: “edX”, “run”: “2025_T1”, “number”: “DemoX”
}, {
“course_id”: “course-v1:MITx+6.00x+2024_Fall”, “course_name”: “Introduction to Computer Science”, “course_url”: “https://studio.example.com/course/course-v1:MITx+6.00x+2024_Fall”, “role”: “staff”, “status”: “archived”, “org”: “MITx”, “run”: “2024_Fall”, “number”: “6.00x”
}
]
}
- Query Parameters:
email (string) – User’s email address
user_id (integer) – User’s ID
username (string) – User’s username
- Status Codes:
200 OK –
- PUT /api/support/v1/manage_course_team/#
Bulk assign or revoke course team roles for a user across multiple courses.
Endpoint
PUT /api/support/v1/manage_course_team/
Permissions
Admin/Staff users: Can manage roles for any course
Instructor users: Can only manage roles for courses/orgs they have instructor access to
Other users: Access denied
Request Data
- A JSON object containing:
email: User’s email address
- bulk_role_operations: List of role operations, each containing:
course_id: Course key string
role: Role to assign or revoke (“instructor” or “staff”)
action: “assign” or “revoke”
Example Request
“email”: “user1@example.com”, “bulk_role_operations”: [
- {
“course_id”: “course-v1:edX+DemoX+2025_T1”, “role”: “instructor”, “action”: “assign”
}, {
“course_id”: “course-v1:edX+DemoX+2025_T2”, “role”: “staff”, “action”: “revoke”
}
]
}#
Returns
HTTP 200 with results for each operation (success or error details)
HTTP 400 if the request data is invalid
Example Response
“email”: “user1@example.com”, “results”: [
- {
“course_id”: “course-v1:edX+DemoX+2025_T1”, “role”: “instructor”, “action”: “assign”, “status”: “success”
}, {
“course_id”: “course-v1:edX+DemoX+2025_T2”, “role”: “staff”, “action”: “revoke”, “status”: “failed”, “error”: “error_message”
}
]
}#
- status 200:
- GET /api/team/v0/bulk_team_membership/{course_id}#
Download CSV with team membership data for given course run.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/team/v0/bulk_team_membership/{course_id}#
Process uploaded CSV to modify team memberships for given course run.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/team/v0/team_membership/{team_id},{username}#
GET /api/team/v0/team_membership/{team_id},{username}
- Parameters:
team_id (string)
username (string)
- Status Codes:
200 OK –
- DELETE /api/team/v0/team_membership/{team_id},{username}#
DELETE /api/team/v0/team_membership/{team_id},{username}
- Parameters:
team_id (string)
username (string)
- Status Codes:
204 No Content – No response body
- GET /api/team/v0/teams/{team_id}#
Retrieves the specified resource using the RetrieveModelMixin.
- Parameters:
team_id (string)
- Status Codes:
200 OK –
- PATCH /api/team/v0/teams/{team_id}#
Checks for validation errors, then updates the model using the UpdateModelMixin.
- Parameters:
team_id (string)
- Status Codes:
200 OK –
- DELETE /api/team/v0/teams/{team_id}#
DELETE /api/team/v0/teams/{team_id}
- Parameters:
team_id (string)
- Status Codes:
204 No Content – No response body
- GET /api/team/v0/teams/{team_id}/assignments#
GET v0/teams/{team_id_pattern}/assignments
- Parameters:
team_id (string)
- Status Codes:
200 OK – No response body
- GET /api/team/v0/topics/#
GET /api/team/v0/topics/?course_id={course_id}
- Status Codes:
200 OK – No response body
- GET /api/team/v0/topics/{topic_id},{course_id}#
GET /api/team/v0/topics/{topic_id},{course_id}/
- Parameters:
course_id (string)
topic_id (string)
- Status Codes:
200 OK – No response body
- GET /api/third_party_auth_context#
Returns - dynamic registration fields - dynamic optional fields - the context for third party auth providers - user country code - the currently running pipeline.
- Arguments:
- request (HttpRequest): The request, used to determine if a pipeline
is currently running.
- kwargs (dict):
- tpa_hint (string): An override flag that will return a matching provider
as long as its configuration has been enabled
is_register_page (bool): Determine the call is from register or login page is_welcome_page (bool): Checks if the call is from the Welcome Page
- Status Codes:
200 OK – No response body
- GET /api/toggles/v0/state/#
Expose toggle state report dict as a view.
- Status Codes:
200 OK – No response body
- GET /api/user/{api_version}/account/login_session/#
HTTP end-points for logging in users.
- Parameters:
api_version (string)
- Status Codes:
200 OK – No response body
- POST /api/user/{api_version}/account/login_session/#
POST /user/{api_version}/account/login_session/
Returns 200 on success, and a detailed error message otherwise.
- Parameters:
api_version (string)
- Status Codes:
- GET /api/user/v1/account/password_reset/#
HTTP end-point for GETting a description of the password reset form.
- Status Codes:
200 OK – No response body
- POST /api/user/v1/account/password_reset/token/validate/#
HTTP end-point to validate password reset token.
- Status Codes:
200 OK – No response body
- GET /api/user/v1/account/registration/#
HTTP end-points for creating a new user.
- Status Codes:
200 OK – No response body
- POST /api/user/v1/account/registration/#
Create the user’s account.
You must send all required form fields with the request.
You can optionally send a “course_id” param to indicate in analytics events that the user registered while enrolling in a particular course.
- Arguments:
request (HTTPRequest)
- Returns:
HttpResponse: 200 on success HttpResponse: 400 if the request is not valid. HttpResponse: 409 if an account with the given username or email
address already exists
HttpResponse: 403 operation not allowed
- Status Codes:
200 OK – No response body
- GET /api/user/v1/accounts#
Return a list of user details objects
Example Requests
GET /api/user/v1/accounts?usernames={username1,username2}[?view=shared]
GET /api/user/v1/accounts?email={user_email} (staff only)
GET /api/user/v1/accounts?lms_user_id={user_email} (staff only)
Responses
If no user exists with the specified username, or email, an HTTP 404 “Not Found” response is returned.
If the user makes the request for her own account, or makes a request for another account and has “is_staff” access, an HTTP 200 “OK” response is returned.
The response consists of a list of one or more user objects, in the same format as is returned for GET /user/v1/accounts/{username}.
- Status Codes:
200 OK – No response body
- GET /api/user/v1/accounts/{username}#
Retrieve a single detailed user object
Example Requests
GET /api/user/v1/accounts/{username}/
Response
If no user exists with the specified username, or email, an HTTP 404 “Not Found” response is returned.
If the user makes the request for her own account, or makes a request for another account and has “is_staff” access, an HTTP 200 “OK” response is returned. The response contains the following values.
id: numerical lms user id in db
bio: null or textual representation of user biographical information (“about me”).
country: An ISO 3166 country code or null.
date_joined: The date the account was created, in the string format provided by datetime. For example, “2014-08-26T17:52:11Z”.
last_login: The latest date the user logged in, in the string datetime format.
email: Email address for the user. New email addresses must be confirmed via a confirmation email, so GET does not reflect the change until the address has been confirmed.
secondary_email: A secondary email address for the user. Unlike the email field, GET will reflect the latest update to this field even if changes have yet to be confirmed.
verified_name: Approved verified name of the learner present in name affirmation plugin
extended_profile: A list of objects with the keys field_name and field_value, returning any populated extended_profile_fields configured in the Site Configuration
- gender: One of the following values:
null
“f”
“m”
“o”
goals: The textual representation of the user’s goals, or null.
is_active: Boolean representation of whether a user is active.
language: The user’s preferred language, or null.
- language_proficiencies: Array of language preferences. Each preference is a JSON object with the following keys:
“code”: string ISO 639-1 language code e.g. “en”.
- level_of_education: One of the following values:
“p”: PhD or Doctorate
“m”: Master’s or professional degree
“b”: Bachelor’s degree
“a”: Associate’s degree
“hs”: Secondary/high school
“jhs”: Junior secondary/junior high/middle school
“el”: Elementary/primary school
“none”: None
“o”: Other
null: The user did not enter a value
mailing_address: The textual representation of the user’s mailing address, or null.
name: The full name of the user.
- profile_image: A JSON representation of a user’s profile image information. This representation has the following keys.
“has_image”: Boolean indicating whether the user has a profile image.
“image_url_*”: Absolute URL to various sizes of a user’s profile image, where ‘*’ matches a representation of the corresponding image size, such as ‘small’, ‘medium’, ‘large’, and ‘full’. These are configurable via PROFILE_IMAGE_SIZES_MAP.
requires_parental_consent: True if the user is a minor requiring parental consent.
- social_links: Array of social links, sorted alphabetically by “platform”. Each preference is a JSON object with the following keys:
“platform”: A particular social platform, ex: ‘facebook’
“social_link”: The link to the user’s profile on the particular platform
username: The username associated with the account.
year_of_birth: The year the user was born, as an integer, or null.
account_privacy: The user’s setting for sharing her personal profile. Possible values are “all_users”, “private”, or “custom”. If “custom”, the user has selectively chosen a subset of shareable fields to make visible to others via the User Preferences API.
phone_number: The phone number for the user. String of numbers with an optional + sign at the start.
pending_name_change: If the user has an active name change request, returns the requested name.
For all text fields, plain text instead of HTML is supported. The data is stored exactly as specified. Clients must HTML escape rendered values to avoid script injections.
If a user who does not have “is_staff” access requests account information for a different user, only a subset of these fields is returned. The returned fields depend on the ACCOUNT_VISIBILITY_CONFIGURATION configuration setting and the visibility preference of the user for whom data is requested.
A user can view which account fields they have shared with other users by requesting their own username and providing the “view=shared” URL parameter.
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- PATCH /api/user/v1/accounts/{username}#
Update user account or profile information
Example Requests
Content-Type: application/merge-patch+json
PATCH /api/user/v1/accounts/{username}
**Request Body
- {
“level_of_education”: “m”, “extended_profile”:
- [
{“field_name”: “favorite_beatle”, “field_value”: {“name”: “ringo”}}, {“field_name”: “conlangs_spoken”, “field_value”:[“Láadan”, “Rikchik”, “Lojban”]}
]
}
Notes regarding `social_links`
Requested updates to social_links are automatically merged with previously set links. That is, any newly introduced platforms are add to the previous list. Updated links to pre-existing platforms replace their values in the previous list. Pre-existing platforms can be removed by setting the value of the social_link to an empty string (“”).
Response Values for PATCH
Users can only modify their own account information. If the requesting user does not have the specified username and has staff access, the request returns an HTTP 403 “Forbidden” response. If the requesting user does not have staff access, the request returns an HTTP 404 “Not Found” response to avoid revealing the existence of the account.
If no user exists with the specified username, an HTTP 404 “Not Found” response is returned.
If “application/merge-patch+json” is not the specified content type, a 415 “Unsupported Media Type” response is returned.
If validation errors prevent the update, this method returns a 400 “Bad Request” response that includes a “field_errors” field that lists all error messages. This will happen if an attempt is made to edit any read-only fields.
If a failure at the time of the update prevents the update, a 400 “Bad Request” error is returned. The JSON collection contains specific errors.
If the update is successful, updated user account data is returned.
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- POST /api/user/v1/accounts/{username}/deactivate/#
POST /api/user/v1/accounts/{username}/deactivate/
Marks the user as having no password set for deactivation purposes.
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- POST /api/user/v1/accounts/{username}/image#
POST /api/user/v1/accounts/{username}/image
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- DELETE /api/user/v1/accounts/{username}/image#
DELETE /api/user/v1/accounts/{username}/image
- Parameters:
username (string)
- Status Codes:
204 No Content – No response body
- GET /api/user/v1/accounts/{username}/retirement_status/#
GET /api/user/v1/accounts/{username}/retirement_status/ Returns the RetirementStatus of a given user, or 404 if that row doesn’t exist.
- Parameters:
username (string)
- Status Codes:
200 OK –
- GET /api/user/v1/accounts/{username}/verification_status/#
IDVerification Status endpoint
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- GET /api/user/v1/accounts/{username}/verifications/#
IDVerificationStatusDeetails endpoint to retrieve more details about ID Verification status
- Parameters:
username (string)
- Status Codes:
200 OK –
- POST /api/user/v1/accounts/cancel_retirement/#
POST /api/user/v1/accounts/cancel_retirement/
Cancels the retirement for a user’s account. This also handles the top level error handling, and permissions.
- Status Codes:
200 OK – No response body
- POST /api/user/v1/accounts/deactivate_logout/#
POST /api/user/v1/accounts/deactivate_logout/
Marks the user as having no password set for deactivation purposes, and logs the user out.
- Status Codes:
200 OK – No response body
- POST /api/user/v1/accounts/name_change/#
POST /api/user/v1/accounts/name_change/
Request a profile name change. This creates a PendingNameChange to be verified later, rather than updating the user’s profile name directly.
- Example request:
- {
“name”: “Jon Doe”
}
- Status Codes:
201 Created – No response body
- POST /api/user/v1/accounts/name_change/{username}/confirm/#
POST /api/user/v1/account/name_change/{username}/confirm
Confirm a name change request for the specified user, and update their profile name.
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- POST /api/user/v1/accounts/replace_usernames/#
POST /api/user/v1/accounts/replace_usernames/ ``` {
- “username_mappings”: [
{“current_username_1”: “desired_username_1”}, {“current_username_2”: “desired_username_2”}
]
}#
POST Parameters
A POST request must include the following parameter.
username_mappings: Required. A list of objects that map the current username (key) to the desired username (value)
POST Response Values
As long as data validation passes, the request will return a 200 with a new mapping of old usernames (key) to new username (value)
``` {
- “successful_replacements”: [
{“old_username_1”: “new_username_1”}
], “failed_replacements”: [
{“old_username_2”: “new_username_2”}
]
}#
- status 200:
No response body
- POST /api/user/v1/accounts/retire/#
POST /api/user/v1/accounts/retire/
``` {
‘username’: ‘user_to_retire’
}#
Retires the user with the given username. This includes retiring this username, the associated email address, and any other PII associated with this user.
- status 200:
No response body
- POST /api/user/v1/accounts/retire_misc/#
POST /api/user/v1/accounts/retire_misc/
``` {
‘username’: ‘user_to_retire’
}#
Retires the user with the given username in the LMS.
- status 200:
No response body
- POST /api/user/v1/accounts/retirement_cleanup/#
POST /api/user/v1/accounts/retirement_cleanup/
``` {
‘usernames’: [‘user1’, ‘user2’, …]
}#
Redacts and then deletes a batch of retirement requests by username.
- status 200:
- POST /api/user/v1/accounts/retirement_partner_report/#
POST /api/user/v1/accounts/retirement_partner_report/
Returns the list of UserRetirementPartnerReportingStatus users that are not already being processed and updates their status to indicate they are currently being processed.
- Status Codes:
200 OK –
- PUT /api/user/v1/accounts/retirement_partner_report/#
PUT /api/user/v1/accounts/retirement_partner_report/
``` {
‘username’: ‘user_to_retire’
}#
Creates a UserRetirementPartnerReportingStatus object for the given user as part of the retirement pipeline.
- status 200:
- POST /api/user/v1/accounts/retirement_partner_report_cleanup/#
POST /api/user/v1/accounts/retirement_partner_report_cleanup/
[{‘original_username’: ‘user1’}, {‘original_username’: ‘user2’}, …]
Deletes UserRetirementPartnerReportingStatus objects for a list of users that have been reported on.
- Status Codes:
200 OK –
- GET /api/user/v1/accounts/retirement_queue/#
GET /api/user/v1/accounts/retirement_queue/ {‘cool_off_days’: 7, ‘states’: [‘PENDING’, ‘COMPLETE’], ‘limit’: 500}
Returns the list of RetirementStatus users in the given states that were created in the retirement queue at least cool_off_days ago.
- Status Codes:
200 OK –
- GET /api/user/v1/accounts/retirements_by_status_and_date/#
GET /api/user/v1/accounts/retirements_by_status_and_date/ ?start_date=2018-09-05&end_date=2018-09-07&state=COMPLETE
Returns a list of UserRetirementStatusSerializer serialized RetirementStatus rows in the given state that were created in the retirement queue between the dates given. Date range is inclusive, so to get one day you would set both dates to that day.
- Status Codes:
200 OK –
- POST /api/user/v1/accounts/search_emails#
Return information about users associated with a list of email addresses
Example Requests
POST /api/user/v1/accounts/search_emails
- {
“emails”: [”edx@example.com”, “staff@example.com”]
}
Response
If no emails key is present in the request, or the user does not have “is_staff” access, an HTTP 404 “Not Found” response is returned.
If the has “is_staff” access, an HTTP 200 “OK” response is returned. The response contains the following values.
- [
- {
“username”: “edx”, “email”: “edx@example.com”, “id”: 3,
}, {
“username”: “staff”, “email”: “staff@example.com”, “id”: 8,
}
]
- Status Codes:
200 OK – No response body
- GET /api/user/v1/accounts/third_party_auth_error/#
GET /api/user/v1/accounts/third_party_auth_error/
Returns the pending third-party-auth error message for the current user, consuming it (it will not be returned again on the next call).
- Status Codes:
200 OK –
401 Unauthorized – No response body
403 Forbidden – No response body
- PATCH /api/user/v1/accounts/update_retirement_status/#
PATCH /api/user/v1/accounts/update_retirement_status/
``` {
‘username’: ‘user_to_retire’, ‘new_state’: ‘LOCKING_COMPLETE’, ‘response’: ‘User account locked and logged out.’
}#
Updates the RetirementStatus row for the given user to the new status, and append any messages to the message log.
Note that this implementation DOES NOT use the “merge patch” implementation seen in AccountViewSet. The content type for this request is ‘application/json’.
- status 200:
- GET /api/user/v1/forum_roles/{name}/users/#
Forum roles are represented by a list of user dicts
- Parameters:
name (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/user/v1/me#
Return an authenticated user’s username
Example Requests
GET /api/user/v1/me[?view=shared]
- Status Codes:
200 OK –
401 Unauthorized – No response body
- GET /api/user/v1/preferences/{pref_key}/users/#
DRF class for listing a user’s preferences
- Parameters:
pref_key (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/user/v1/preferences/{username}#
GET /api/user/v1/preferences/{username}/
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- PATCH /api/user/v1/preferences/{username}#
PATCH /api/user/v1/preferences/{username}/
- Parameters:
username (string)
- Status Codes:
200 OK – No response body
- GET /api/user/v1/preferences/{username}/{preference_key}#
GET /api/user/v1/preferences/{username}/{preference_key}
- Parameters:
preference_key (string)
username (string)
- Status Codes:
200 OK – No response body
- PUT /api/user/v1/preferences/{username}/{preference_key}#
PUT /api/user/v1/preferences/{username}/{preference_key}
- Parameters:
preference_key (string)
username (string)
- Status Codes:
200 OK – No response body
- DELETE /api/user/v1/preferences/{username}/{preference_key}#
DELETE /api/user/v1/preferences/{username}/{preference_key}
- Parameters:
preference_key (string)
username (string)
- Status Codes:
204 No Content – No response body
- POST /api/user/v1/preferences/email_opt_in/#
Post function for updating the email opt in preference.
Allows the modification or creation of the email opt in preference at an organizational level.
- Args:
- request (Request): The request should contain the following POST parameters:
- course_id: The slash separated course ID. Used to determine the organization
for this preference setting.
- email_opt_in: “True” or “False” to determine if the user is opting in for emails from
this organization. If the string does not match “True” (case insensitive) it will assume False.
- Status Codes:
200 OK – No response body
- GET /api/user/v1/preferences/time_zones/#
Use Cases
Retrieves a list of all time zones, by default, or common time zones for country, if given
The country is passed in as its ISO 3166-1 Alpha-2 country code as an optional ‘country_code’ argument. The country code is also case-insensitive.
Example Requests
GET /api/user/v1/preferences/time_zones/
GET /api/user/v1/preferences/time_zones/?country_code=FR
Example GET Response
If the request is successful, an HTTP 200 “OK” response is returned along with a list of time zone dictionaries for all time zones or just for time zones commonly used in a country, if given.
Each time zone dictionary contains the following values.
time_zone: The name of the time zone.
description: The display version of the time zone
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/user/v1/user_prefs/#
DRF class for interacting with the UserPreference ORM
- Query Parameters:
key (string)
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
user (integer)
- Status Codes:
200 OK –
- GET /api/user/v1/user_prefs/{id}/#
DRF class for interacting with the UserPreference ORM
- Parameters:
id (integer) – A unique integer value identifying this user preference.
- Status Codes:
200 OK –
- GET /api/user/v1/users/#
DRF class for interacting with the User ORM object
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /api/user/v1/users/{id}/#
DRF class for interacting with the User ORM object
- Parameters:
id (integer) – A unique integer value identifying this user.
- Status Codes:
200 OK –
- POST /api/user/v1/validation/registration#
POST /api/user/v1/validation/registration/
Expects request of the form ``` {
“name”: “Dan the Validator”, “username”: “mslm”, “email”: “mslm@gmail.com”, “confirm_email”: “mslm@gmail.com”, “password”: “password123”, “country”: “PK”
}#
where each key is the appropriate form field name and the value is user input. One may enter individual inputs if needed. Some inputs can get extra verification checks if entered along with others, like when the password may not equal the username.
- status 200:
No response body
- GET /api/user/v2/account/registration/#
HTTP end-points for creating a new user.
- Status Codes:
200 OK – No response body
- POST /api/user/v2/account/registration/#
Create the user’s account.
You must send all required form fields with the request.
You can optionally send a “course_id” param to indicate in analytics events that the user registered while enrolling in a particular course.
- Arguments:
request (HTTPRequest)
- Returns:
HttpResponse: 200 on success HttpResponse: 400 if the request is not valid. HttpResponse: 409 if an account with the given username or email
address already exists
HttpResponse: 403 operation not allowed
- Status Codes:
200 OK – No response body
- GET /api/user_tours/discussion_tours/{tour_id}/#
Return a list of all tours in the database.
- Parameters:
request (Request): The request object tour_id (int): The ID of the tour to be retrieved.
- Returns:
200: A list of tours, serialized using the UserDiscussionsToursSerializer [
- {
“id”: 1, “tour_name”: “discussions”, “show_tour”: true, “user”: 1
}
]
403 if the tours are disabled
- Parameters:
tour_id (string)
- Status Codes:
200 OK – No response body
- PUT /api/user_tours/discussion_tours/{tour_id}/#
Update an existing tour with the data in the request body.
- Parameters:
request (Request): The request object tour_id (int): The ID of the tour to be updated.
- Returns:
200: The updated tour, serialized using the UserDiscussionsToursSerializer 404: If the tour does not exist 403: If the user does not have permission to update the tour or the tours are disabled 400: Validation error
- Parameters:
tour_id (string)
- Status Codes:
200 OK – No response body
- GET /api/user_tours/v1/{username}#
Retrieve the User Tour for the given username.
Allows staff users to retrieve any user’s User Tour.
- Returns
- 200 with the following fields:
course_home_tour_status (str): one of UserTour.CourseHomeChoices show_courseware_tour (bool): indicates if courseware tour should be shown.
400 if there is a not allowed request (requesting a user you don’t have access to) 401 if unauthorized request 403 if tours are disabled 404 if the UserTour does not exist (shouldn’t happen, but safety first)
- Parameters:
username (string)
- Status Codes:
200 OK –
- PUT /api/user_tours/v1/{username}#
Unsupported method.
- Parameters:
username (string)
- Status Codes:
200 OK –
- PATCH /api/user_tours/v1/{username}#
Patch the User Tour for the request.user.
Supports updating the course_home_tour_status and show_courseware_tour fields.
- Returns:
200 response if update was successful
400 if update was unsuccessful or there was nothing to update 401 if unauthorized request 403 if tours are disabled
- Parameters:
username (string)
- Status Codes:
200 OK –
- GET /api/val/v0/videos/#
GETs or POST video objects
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /api/val/v0/videos/#
GETs or POST video objects
- Status Codes:
- GET /api/val/v0/videos/{edx_video_id}#
Gets a video instance given its edx_video_id
- Parameters:
edx_video_id (string)
- Status Codes:
200 OK –
- PUT /api/val/v0/videos/{edx_video_id}#
Gets a video instance given its edx_video_id
- Parameters:
edx_video_id (string)
- Status Codes:
200 OK –
- PATCH /api/val/v0/videos/{edx_video_id}#
Gets a video instance given its edx_video_id
- Parameters:
edx_video_id (string)
- Status Codes:
200 OK –
- DELETE /api/val/v0/videos/{edx_video_id}#
Gets a video instance given its edx_video_id
- Parameters:
edx_video_id (string)
- Status Codes:
204 No Content – No response body
- GET /api/val/v0/videos/course-transcripts/{course_id}/#
Returns all transcript data for a course when given a course_id.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /api/val/v0/videos/courses/{course_id}/video-ids#
Returns all video_ids for a course when given a course_id.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /api/val/v0/videos/missing-hls/#
Retrieve video IDs that are missing HLS profiles. This endpoint supports 2 types of input data:
If we want a batch of video ids which are missing HLS profile irrespective of their courses, the request data should be in following format:
- {
‘batch_size’: 50, ‘offset’: 0
}
- And response will be in following format:
- {
‘videos’: [‘video_id1’, ‘video_id2’, ‘video_id3’, … , video_id50], ‘total’: 300, ‘offset’: 50, ‘batch_size’: 50
}
If we want all the videos which are missing HLS profiles in a set of specific courses, the request data should be in following format:
- {
- ‘courses’: [
‘course_id1’, ‘course_id2’, …
]
}
- And response will be in following format:
- {
‘videos’: [‘video_id1’, ‘video_id2’, ‘video_id3’, …]
}
- Status Codes:
200 OK – No response body
- PUT /api/val/v0/videos/missing-hls/#
Update a single profile for a given video.
- Example request data:
``` {
‘edx_video_id’: ‘1234’ ‘profile’: ‘hls’, ‘encode_data’: {
‘url’: ‘foo.com/qwe.m3u8’ ‘file_size’: 34 ‘bitrate’: 12
}
- Status Codes:
200 OK – No response body
- PATCH /api/val/v0/videos/status/#
Update the status of a video.
- Status Codes:
200 OK – No response body
- POST /api/val/v0/videos/video-images/update/#
Update a course video image instance with auto generated image names.
- Status Codes:
200 OK – No response body
- POST /api/val/v0/videos/video-transcripts/#
Creates a video transcript instance with the given information.
- Arguments:
request: A WSGI request.
- Status Codes:
200 OK – No response body
- PATCH /api/val/v0/videos/video-transcripts/#
Partially update a video transcript, only supporting updating the provider field.
- Status Codes:
200 OK – No response body
- DELETE /api/val/v0/videos/video-transcripts/#
Delete a video transcript instance with the given information.
- Arguments:
request: A WSGI request.
- Status Codes:
204 No Content – No response body
- POST /api/val/v0/videos/video-transcripts/create/#
Creates a video transcript instance with the given information.
- Arguments:
request: A WSGI request.
- Status Codes:
200 OK – No response body
- PATCH /api/val/v0/videos/video-transcripts/create/#
Partially update a video transcript, only supporting updating the provider field.
- Status Codes:
200 OK – No response body
- DELETE /api/val/v0/videos/video-transcripts/create/#
Delete a video transcript instance with the given information.
- Arguments:
request: A WSGI request.
- Status Codes:
204 No Content – No response body
- GET /api/xblock/v2/xblocks/{usage_key}/#
Get metadata about the specified block.
Accepts the following query parameters:
“include”: a comma-separated list of keys to include. Valid keys are “index_dictionary” and “student_view_data”.
- Parameters:
usage_key (string)
- Status Codes:
200 OK – No response body
- GET /api/xblock/v2/xblocks/{usage_key}/fields/#
retrieves the xblock, returning display_name, data, and metadata
- Parameters:
usage_key (string)
- Status Codes:
200 OK – No response body
- POST /api/xblock/v2/xblocks/{usage_key}/fields/#
edits the xblock, saving changes to data and metadata only (display_name included in metadata)
- Parameters:
usage_key (string)
- Status Codes:
200 OK – No response body
- GET /api/xblock/v2/xblocks/{usage_key}/handler_url/{handler_name}/#
Get an absolute URL which can be used (without any authentication) to call the given XBlock handler.
The URL will expire but is guaranteed to be valid for a minimum of 2 days.
- Parameters:
handler_name (string)
usage_key (string)
- Status Codes:
200 OK – No response body
- GET /api/xblock/v2/xblocks/{usage_key}/olx/#
Get the OLX (XML serialization) of the specified XBlock
- Parameters:
usage_key (string)
- Status Codes:
200 OK – No response body
- GET /api/xblock/v2/xblocks/{usage_key}/view/{view_name}/#
Get the HTML, JS, and CSS needed to render the given XBlock.
- Parameters:
usage_key (string)
view_name (string)
- Status Codes:
200 OK – No response body
- GET /api/xblock/v2/xblocks/{usage_key}@{version}/#
Get metadata about the specified block.
Accepts the following query parameters:
“include”: a comma-separated list of keys to include. Valid keys are “index_dictionary” and “student_view_data”.
- Parameters:
usage_key (string)
version (string)
- Status Codes:
200 OK – No response body
- GET /api/xblock/v2/xblocks/{usage_key}@{version}/fields/#
retrieves the xblock, returning display_name, data, and metadata
- Parameters:
usage_key (string)
version (string)
- Status Codes:
200 OK – No response body
- POST /api/xblock/v2/xblocks/{usage_key}@{version}/fields/#
edits the xblock, saving changes to data and metadata only (display_name included in metadata)
- Parameters:
usage_key (string)
version (string)
- Status Codes:
200 OK – No response body
- GET /api/xblock/v2/xblocks/{usage_key}@{version}/handler_url/{handler_name}/#
Get an absolute URL which can be used (without any authentication) to call the given XBlock handler.
The URL will expire but is guaranteed to be valid for a minimum of 2 days.
- Parameters:
handler_name (string)
usage_key (string)
version (string)
- Status Codes:
200 OK – No response body
- GET /api/xblock/v2/xblocks/{usage_key}@{version}/olx/#
Get the OLX (XML serialization) of the specified XBlock
- Parameters:
usage_key (string)
version (string)
- Status Codes:
200 OK – No response body
- GET /api/xblock/v2/xblocks/{usage_key}@{version}/view/{view_name}/#
Get the HTML, JS, and CSS needed to render the given XBlock.
- Parameters:
usage_key (string)
version (string)
view_name (string)
- Status Codes:
200 OK – No response body
GET endpoint to return navigation sidebar toggles.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /courses/{course_id}/courseware-search/enabled/#
Simple GET endpoint to expose whether the user may use Courseware Search for a given course.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/add_users_to_cohorts#
- This method spawns a celery task to do the assignments, and a CSV file with results
is provided via data downloads.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/bulk_beta_modify_access#
Query parameters: - identifiers is string containing a list of emails and/or usernames separated by
anything split_input_list can handle.
action is one of [‘add’, ‘remove’]
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/calculate_grades_csv#
Initiates a Celery task to calculate grades CSV.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/certificate_exception_view/#
Add certificate exception for a student.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- DELETE /courses/{course_id}/instructor/api/certificate_exception_view/#
Remove certificate exception for a student.
- Parameters:
course_id (string)
- Status Codes:
204 No Content – No response body
- POST /courses/{course_id}/instructor/api/certificate_invalidation_view/#
Invalidate/Re-Validate students to/from certificate.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- DELETE /courses/{course_id}/instructor/api/certificate_invalidation_view/#
Invalidate/Re-Validate students to/from certificate.
- Parameters:
course_id (string)
- Status Codes:
204 No Content – No response body
- POST /courses/{course_id}/instructor/api/certificate_task/{action}#
Handles POST requests for certificate actions.
Depending on the action parameter, different tasks are performed:
- Args:
request (HttpRequest): The HTTP request object. course_id (str): The ID of the course on which to perform the action. action (str, optional): The certificate task to perform. Must be one of:
- “toggle”: Enable or disable certificates for the course. No additional
parameters are required.
- “generate”: Generate certificates for eligible learners. No additional
parameters are required.
- “regenerate”: Regenerate certificates for learners. Requires an additional
parameter in the request body:
- statuses (list of str): List of certificate statuses to regenerate
(e.g., [“downloaded”, “issued”]).
- Returns:
Response: A DRF Response object containing a success message or error details. If the action is invalid, returns HTTP 400 with an error message.
- Example request body for regenerate action:
- {
“statuses”: [“downloaded”, “issued”]
}
- Parameters:
action (string)
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/change_due_date#
Grants a due date extension to a student for a particular unit.
- params:
url (str): The URL related to the block that needs the due date update. due_datetime (str): The new due date and time for the block. student (str): The email or username of the student whose access is being modified.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/export_ora2_data#
Initiates a task to export Open Response Assessment (ORA) data for a course.
- Args:
request: The HTTP request object course_id: The ID of the course for which to export ORA data
- Returns:
Response: A JSON response containing the status message indicating the task has been initiated
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/export_ora2_submission_files#
Initiates a task to export all ORA2 submission files for a course. Returns a JSON response indicating the export task has been started.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/export_ora2_summary#
Initiates a Celery task to generate an ORA summary report for the specified course.
- Args:
request: The HTTP request object course_id: The string representation of the course key
- Returns:
Response: A JSON response with a status message indicating the report generation has started
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/generate_bulk_certificate_exceptions#
- Arguments:
request (WSGIRequest): Django HTTP request object. course_id (string): Course-Run key
- Returns:
dict: {
general_errors: [errors related to csv file e.g. csv uploading, csv attachment, content reading, etc. ], row_errors: {
data_format_error: [users/data in csv file that are not well formatted], user_not_exist: [users that cannot be found in the LMS], user_already_allowlisted: [users that already appear on the allowlist of this course-run], user_not_enrolled: [users that are not currently enrolled in this course-run], user_on_certificate_invalidation_list: [users that have an active certificate invalidation in this
course-run]
}, success: [list of users sucessfully added to the certificate allowlist]
}
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/generate_certificate_exceptions/{generate_for}#
- Parameters:
request – HttpRequest object,
course_id (string) – course identifier of the course for whom to generate certificates
generate_for (string) – string to identify whether to generate certificates for ‘all’ or ‘new’ additions to the allowlist
course_id
generate_for
- Return:
JsonResponse object containing success/failure message and certificate exception data
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/get_anon_ids#
Handle POST request to generate a CSV output.
- Returns:
Response: A CSV file with two columns: user-id and anonymized-user-id.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/get_course_survey_results#
method to return survey results report for the particular course.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /courses/{course_id}/instructor/api/get_enrolled_students_with_inactive_account#
Initiate generation of a CSV file containing information about students who are enrolled in a course but have inactive account.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/get_enrolled_students_with_inactive_account#
Initiate generation of a CSV file containing information about students who are enrolled in a course but have inactive account.
- Responds with JSON
{“status”: “… status message …”}
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/get_grading_config#
Post method to return grading config.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /courses/{course_id}/instructor/api/get_issued_certificates/#
Responds with JSON if CSV is not required. contains a list of issued certificates.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/get_issued_certificates/#
Arguments: course_id Returns:
{“certificates”: [{course_id: xyz, mode: ‘honor’}, …]}
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/get_problem_responses#
Initiate generation of a CSV file containing all student answers to a given problem.
Example requests
- POST /courses/{course_id}/instructor/api/get_problem_responses {
“problem_location”: “{usage_key1},{usage_key2},{usage_key3}””
} POST /courses/{course_id}/instructor/api/get_problem_responses {
“problem_location”: “{usage_key}”, “problem_types_filter”: “problem”
}
POST Parameters
A POST request can include the following parameters:
problem_location: A comma-separated list of usage keys for the blocks to include in the report. If the location is a block that contains other blocks, (such as the course, section, subsection, or unit blocks) then all blocks under that block will be included in the report.
problem_types_filter: Optional. A comma-separated list of block types to include in the repot. If set, only blocks of the specified types will be included in the report.
To get data on all the poll and survey blocks in a course, you could POST the usage key of the course for problem_location, and “poll, survey” as the value for problem_types_filter.
Example Response: If initiation is successful (or generation task is already running): ```json {
“status”: “The problem responses report is being created. …”, “task_id”: “4e49522f-31d9-431a-9cff-dd2a2bf4c85a”
}#
Responds with BadRequest if any of the provided problem locations are faulty.
- param string course_id:
- status 200:
No response body
- POST /courses/{course_id}/instructor/api/get_proctored_exam_results#
get the proctored exam results report for the particular course.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/get_student_enrollment_status#
Permission: Limited to staff access. Takes query parameter unique_student_identifier
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/get_student_progress_url#
Post method for validating incoming data and generating progress URL
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/get_students_features{csv}#
Handle POST requests to retrieve student profile information for a specific course.
- Args:
request: The HTTP request object. course_id: The ID of the course for which to retrieve student information. csv: Optional; if ‘csv’ is present in the URL, it indicates that the response should be in CSV format. Defaults to None.
- Returns:
Response: A JSON response containing student profile information, or CSV if the csv parameter is provided.
- Parameters:
course_id (string)
csv (string)
- Status Codes:
200 OK – No response body
- GET /courses/{course_id}/instructor/api/get_students_who_may_enroll#
Initiate generation of a CSV file containing information about
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/get_students_who_may_enroll#
- Initiate generation of a CSV file containing information about
students who may enroll in a course.
- Responds with JSON
{“status”: “… status message …”}
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/list_background_email_tasks#
List background email tasks.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/list_course_enrollments#
Handles POST request to list course enrollments.
- Args:
request (HttpRequest): The request object containing user data. course_id (str): The ID of the course to list enrollments for.
- Returns:
Response: A Response object containing the list of enrollments or an error message.
- Raises:
Http404: If the course does not exist.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/list_course_role_members#
Handles POST request to list instructors and staff.
- Args:
request (HttpRequest): The request object containing user data. course_id (str): The ID of the course to list instructors and staff for.
- Returns:
Response: A Response object containing the list of instructors and staff or an error message.
- Raises:
Http404: If the course does not exist.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/list_email_content#
List the content of bulk emails sent for a specific course.
- Args:
request (HttpRequest): The HTTP request object. course_id (str): The ID of the course for which to list the bulk emails.
- Returns:
HttpResponse: A response object containing the list of bulk email contents.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/list_entrance_exam_instructor_tasks#
List entrance exam related instructor tasks.
- Takes either of the following query parameters
unique_student_identifier is an email or username
all_students is a boolean
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/list_forum_members#
Handle the POST request to list forum members with a certain role name for the given course.
- Args:
request (HttpRequest): The request object containing the data sent by the client. course_id (int): The ID of the course for which the role is being assigned or managed.
- Returns:
Response: The Json constians lists of members.
- Raises:
ValidationError: If the provided rolename is not valid according to the serializer.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/list_instructor_tasks#
List instructor tasks.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/list_report_downloads#
List grade CSV files that are available for download for this course.
Takes the following query parameters: - (optional) report_name - name of the report
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/mark_student_can_skip_entrance_exam#
Takes unique_student_identifier as required POST parameter.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/modify_access#
Modify staff/instructor access of other user. Requires instructor access.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/override_problem_score#
- Takes the following query parameters:
problem_to_reset: a urlname of a problem
unique_student_identifier: an email or username
score: the score to override with
Returns a response indicating the success or failure of the operation. If the user does not have permission to override scores for the problem, a 403 Forbidden response is returned. If the problem cannot be found or parsed, a 400 Bad Request response is returned. If the score override is successful, a 200 OK response is returned with the task status and the problem and student identifiers in the response payload.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/problem_grade_report#
Request a CSV showing students’ grades for all problems in the course.
AlreadyRunningError is raised if the course’s grades are already being updated.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/register_and_enroll_students#
Create new account and Enroll students in this course. Passing a csv file that contains a list of students. Order in csv should be the following email = 0; username = 1; name = 2; country = 3. If there are more than 4 columns in the csv: cohort = 4, course mode = 5. Requires staff access.
-If the email address and username already exists and the user is enrolled in the course, do nothing (including no email gets sent out)
-If the email address already exists, but the username is different, match on the email address only and continue to enroll the user in the course using the email address as the matching criteria. Note the change of username as a warning message (but not a failure). Send a standard enrollment email which is the same as the existing manual enrollment
-If the username already exists (but not the email), assume it is a different user and fail to create the new account. The failure will be messaged in a response in the browser.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/rescore_entrance_exam#
Initiates a Celery task to rescore the entrance exam for a student or all students.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/rescore_problem#
- Takes either of the following query parameters
problem_to_reset is a urlname of a problem
unique_student_identifier is an email or username
all_students is a boolean
all_students and unique_student_identifier cannot both be present.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/reset_due_date#
reset a due date extension to a student for a particular unit. params:
url (str): The URL related to the block that needs the due date update. student (str): The email or username of the student whose access is being modified. reason (str): Optional param.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/reset_student_attempts#
Takes some of the following query parameters - problem_to_reset is a urlname of a problem - unique_student_identifier is an email or username - all_students is a boolean
requires instructor access mutually exclusive with delete_module mutually exclusive with delete_module
- delete_module is a boolean
requires instructor access mutually exclusive with all_students
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/reset_student_attempts_for_entrance_exam#
Resets a student’s entrance exam attempts or deletes entrance exam state.
- Parameters (in request.data):
- unique_student_identifier (str, optional):
Email or username of the student. If provided, must exist.
- all_students (bool, optional):
If True, applies to all students. Mutually exclusive with unique_student_identifier and delete_module.
- delete_module (bool, optional):
If True, deletes entrance exam state for the student. Mutually exclusive with all_students.
- Behavior:
At least one of unique_student_identifier, all_students, or delete_module must be provided.
If unique_student_identifier is provided but does not exist, returns a validation error.
If mutually exclusive parameters are provided, returns a validation error.
Requires staff access; instructor access required for all_students or delete_module actions.
Returns a JSON response with the task status and student identifier.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/send_email#
Query Parameters: - ‘send_to’ specifies what group the email should be sent to
Options are defined by the CourseEmail model in lms/djangoapps/bulk_email/models.py
‘subject’ specifies email’s subject
‘message’ specifies email’s content
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/show_student_extensions#
Handles POST requests to retrieve due date extensions for a specific student within a specified course.
Parameters: - request: The HTTP request object containing user-submitted data. - course_id: The ID of the course for which the extensions are being queried.
Data expected in the request: - student: A required field containing the identifier of the student for whom
the due date extensions are being retrieved. This data is extracted from the request body.
Returns: - A JSON response containing the details of the due date extensions granted to
the specified student in the specified course.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/show_unit_extensions#
Shows all of the students which have due date extensions for the given unit.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/start_certificate_generation#
Generating certificates for all students enrolled in given course.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/start_certificate_regeneration#
certificate_statuses ‘certificate_statuses’ in POST data.
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- POST /courses/{course_id}/instructor/api/students_update_enrollment#
Handle POST request to enroll or unenroll students.
Parameters: - action (str): ‘enroll’ or ‘unenroll’ - identifiers (str): comma/newline separated emails or usernames - auto_enroll (bool): auto-enroll in verified track if applicable - email_students (bool): whether to send enrollment emails - async_processing (bool): whether to process asynchronously - reason (str, optional): reason for enrollment change
Returns: - JSON response with action, auto_enroll flag, and enrollment results.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- POST /courses/{course_id}/instructor/api/update_forum_role_membership#
Handles role modification requests for a forum user.
Query parameters: - email is the target users email - rolename is one of [FORUM_ROLE_ADMINISTRATOR, FORUM_ROLE_GROUP_MODERATOR,
FORUM_ROLE_MODERATOR, FORUM_ROLE_COMMUNITY_TA]
action is one of [‘allow’, ‘revoke’]
- Parameters:
course_id (string)
- Status Codes:
200 OK –
- GET /courses/{course_id}/teams/#
Renders the teams dashboard, which is shown on the “Teams” tab.
Raises a 404 if the course specified by course_id does not exist, the user is not registered for the course, or the teams feature is not enabled.
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /courses/{course_id}/xblock/{usage_id}/view/{view_name}#
Returns the rendered view of a given XBlock, with related resources
- Returns a json object containing two keys:
html: The rendered html of the view resources: A list of tuples where the first element is the resource hash, and
the second is the resource description
- Parameters:
course_id (string)
usage_id (string)
view_name (string)
- Status Codes:
200 OK – No response body
- GET /courses/yt_video_metadata#
Will hit the youtube API if the key is available in settings :return: youtube video metadata
- Status Codes:
200 OK – No response body
- GET /create_account#
HTTP end-points for creating a new user.
- Status Codes:
200 OK – No response body
- POST /create_account#
Create the user’s account.
You must send all required form fields with the request.
You can optionally send a “course_id” param to indicate in analytics events that the user registered while enrolling in a particular course.
- Arguments:
request (HTTPRequest)
- Returns:
HttpResponse: 200 on success HttpResponse: 400 if the request is not valid. HttpResponse: 409 if an account with the given username or email
address already exists
HttpResponse: 403 operation not allowed
- Status Codes:
200 OK – No response body
- GET /dashboard/programs/{program_uuid}/discussion/#
GET handler
- Parameters:
program_uuid (string)
- Status Codes:
200 OK – No response body
- GET /dashboard/programs/{program_uuid}/live/#
GET handler
- Parameters:
program_uuid (string)
- Status Codes:
200 OK – No response body
- GET /discussions/api/v0/{course_key_string}#
Handle HTTP/GET requests
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- POST /discussions/api/v0/{course_key_string}#
Handle HTTP/POST requests
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- GET /discussions/api/v0/course/{course_key_string}/providers#
Handle HTTP/GET requests
- Parameters:
course_id (string) – The course for which to get provider list
course_key_string (string)
- Status Codes:
200 OK –
401 Unauthorized – The requester is not authenticated.
403 Forbidden – The requester cannot access the specified course.
404 Not Found – The requested course does not exist.
- GET /discussions/api/v0/course/{course_key_string}/settings#
Handle HTTP/GET requests
- Parameters:
course_id (string) – The course for which to get provider list
course_key_string (string)
- Query Parameters:
provider_id (string) – The provider_id to fetch data for
- Status Codes:
200 OK –
400 Bad Request – Invalid provider ID
401 Unauthorized – The requester is not authenticated.
403 Forbidden – The requester cannot access the specified course.
404 Not Found – The requested course does not exist.
- POST /discussions/api/v0/course/{course_key_string}/settings#
Handle HTTP/POST requests
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- POST /discussions/api/v0/course/{course_key_string}/sync_discussion_topics#
Sync discussion topics for the course based on data in the request.
- Args:
request (Request): a DRF request course_key_string (str): a course key string
- Returns:
Response: modified course configuration data
- Parameters:
course_key_string (string)
- Status Codes:
200 OK – No response body
- POST /oauth2/login/#
Handler for the POST method to this view.
- Status Codes:
200 OK – No response body
- POST /password/reset/{uidb36}-{token}/#
Reset learner password using passed token and new credentials
- Parameters:
token (string)
uidb36 (string)
- Status Codes:
200 OK – No response body
- GET /support/course_reset/{username_or_email}#
List the enrollments for this user that are in courses that have opted into the course reset feature, including information about past resets or resets in progress, and whether or not the reset will be allowed to be done for each returned enrollment
- returns a list of dicts with the format [
- {
‘course_id’: <course id> ‘display_name’: <course display name> ‘status’: <status of the enrollment wrt/reset, to be displayed to user> ‘comment’: <comment left by user performing reset. may be blank> ‘can_reset’: (boolean) <can the course be reset for this learner>
}
]
- Parameters:
username_or_email (string)
- Status Codes:
200 OK – No response body
- POST /support/course_reset/{username_or_email}#
Resets a course for the given learner.
- POST params:
course_id (CourseKey): the course to reset comment [optional] (str): 255 characters or fewer comment on why the course is being reset
- returns a dicts with the format {
‘course_id’: <course id> ‘display_name’: <course display name> ‘status’: <status of the enrollment wrt/reset, to be displayed to user> ‘comment’: <optional comment made by support staff performing reset> ‘can_reset’: (boolean) <can the course be reset for this learner>
}
- Parameters:
username_or_email (string)
- Status Codes:
200 OK – No response body
- GET /support/enrollment/{username_or_email}#
Returns a list of enrollments for the given user, along with information about previous manual enrollment changes.
- Parameters:
username_or_email (string)
- Status Codes:
200 OK – No response body
- POST /support/enrollment/{username_or_email}#
Allows support staff to create a user’s enrollment.
- Parameters:
username_or_email (string)
- Status Codes:
200 OK – No response body
- PATCH /support/enrollment/{username_or_email}#
Allows support staff to alter a user’s enrollment.
- Parameters:
username_or_email (string)
- Status Codes:
200 OK – No response body
- GET /support/feature_based_enrollment_details/{course_id}#
Returns the duration config information if FBE is enabled. If FBE is not enabled, empty dict is returned.
- Example Request:
GET /support/feature_based_enrollment_details/<course_id>
- Example Response:
- {
“course_id”: <course_id>, “course_name”: “FBE course”, “gating_config”: {
“enabled”: true, “enabled_as_of”: “2030-01-01 00:00:00+00:00”, “reason”: “Site”
}, “duration_config”: {
“enabled”: true, “enabled_as_of”: “2030-01-01 00:00:00+00:00”, “reason”: “Site”
}
}
- Parameters:
course_id (string)
- Status Codes:
200 OK – No response body
- GET /support/get_saml_providers/#
The get request returns a list of all organizations names which will be utilized as keys. * Example Request:
GET /support/get_saml_providers/
- Example Response:
- [
‘test_org’, ‘donut_org’, ‘tri_org’
]
- Status Codes:
200 OK – No response body
- POST /support/link_program_enrollments_details/#
Links learner enrollments by support staff * Example Request:
POST / support / link_program_enrollments_details/
Sample Payload
- {
program_uuid: < program_uuid > , username_pair_text: ‘external_user_key,lms_username’
}
- Example Response:
- {
program_uuid: < program_uuid>, username_pair_text: ‘external_user_key,lms_username’ successes: ‘Success messages if Linkages are created’, errors: ‘Error messages if there is no linkages’
}
- Status Codes:
200 OK – No response body
- GET /support/manage_user/{username_or_email}#
Returns details for the given user, along with information about its username and joining date.
- Parameters:
username_or_email (string)
- Status Codes:
200 OK – No response body
- POST /support/manage_user/{username_or_email}#
Allows support staff to disable a user’s account.
- Parameters:
username_or_email (string)
- Status Codes:
200 OK – No response body
- GET /support/onboarding_status/{username_or_email}#
- Example Request:
GET /support/onboarding_status/<username_or_email>
- Example Response:
- {
- “verified_in”: {
“onboarding_status”: “verified”, “onboarding_link”: “/courses/<course_id>/jump_to/<block_id>”, “expiration_date”: null, “onboarding_past_due”: false, “onboarding_release_date”: “2016-01-01T00:00:00+00:00”, “review_requirements_url”: “”, “course_id”: “<course_id>”, “enrollment_date”: “2021-12-29T14:30:18.895435Z”, “instructor_dashboard_link”: “/courses/<course_id>/instructor#view-special_exams”
}, “current_status”: {
“onboarding_status”: “other_course_approved”, “onboarding_link”: “/courses/<course_id>/jump_to/<block_id>”, “expiration_date”: “2023-12-29T15:52:28.245Z”, “onboarding_past_due”: false, “onboarding_release_date”: “2020-01-01T00:00:00+00:00”, “review_requirements_url”: “”, “course_id”: “<course_id>”, “enrollment_date”: “2021-12-29T15:58:29.489916Z”, “instructor_dashboard_link”: “/courses/<course_id>/instructor#view-special_exams”
}
}
- Parameters:
username_or_email (string)
- Status Codes:
200 OK – No response body
- GET /support/program_enrollments_inspector_details/#
Based on the query string parameters passed through the GET request Search the data store for information about ProgramEnrollment and SSO linkage with the user. * Example Request:
- GET / support/program_enrollments_inspector_details?
edx_user=<edx_user>&org_key=<org_key>&external_user_key=<external_user_key>
- Example Response:
- {
- learner_program_enrollments: {
- “user”: {
“username”: “edx”, “email”: “edx@example.com”
}, “id_verification”: {
“status”: “none”, “error”: <error>, “should_display”: true, “status_date”: <status_date>, “verification_expiry”: <verification_expiry>
}, “enrollments”: [
- {
“created”: “2021-11-25T04:56:25”, “modified”: “2021-12-19T22:27:34”, “external_user_key”: “testuser”, “status”: “enrolled”, “program_uuid”: <program_uuid>, “program_course_enrollments”: [], “program_name”: <program_name>
}
], “user”: {
“external_user_key”: “testuser”
}
}, org_key: < org_key > errors: ‘Error messages for invalid query’
}
- Status Codes:
200 OK – No response body
- GET /support/sso_records/{username_or_email}#
Returns a list of SSO records for a given user. Sample response: Sample response: [
- {
“provider”: “tpa-saml”, “uid”: “new-channel:testuser”, “created”: “2022-03-02T04:41:33.145Z”, “modified”: “2022-03-15T11:28:17.809Z”, “extraData”: “{}”, “history”: [
- {
“uid”: “new-channel:testuser”, “provider”: “tpa-saml”, “created”: “2022-03-02T04:41:33.145Z”, “modified”: “2022-03-15T11:28:17.809Z”, “extraData”: “{}”, “history_date”: “2022-03-15T11:28:17.832Z”
}, {
“uid”: “default-channel:testuser”, “provider”: “tpa-saml”, “created”: “2022-03-02T04:41:33.145Z”, “modified”: “2022-03-10T12:28:32.720Z”, “extraData”: “{}”, “history_date”: “2022-03-15T11:12:02.420Z”
}
]
}
]
- Parameters:
username_or_email (string)
- Status Codes:
200 OK – No response body
- GET /user_api/{api_version}/account/login_session/#
HTTP end-points for logging in users.
- Parameters:
api_version (string)
- Status Codes:
200 OK – No response body
- POST /user_api/{api_version}/account/login_session/#
POST /user/{api_version}/account/login_session/
Returns 200 on success, and a detailed error message otherwise.
- Parameters:
api_version (string)
- Status Codes:
- GET /user_api/v1/account/password_reset/#
HTTP end-point for GETting a description of the password reset form.
- Status Codes:
200 OK – No response body
- POST /user_api/v1/account/password_reset/token/validate/#
HTTP end-point to validate password reset token.
- Status Codes:
200 OK – No response body
- GET /user_api/v1/account/registration/#
HTTP end-points for creating a new user.
- Status Codes:
200 OK – No response body
- POST /user_api/v1/account/registration/#
Create the user’s account.
You must send all required form fields with the request.
You can optionally send a “course_id” param to indicate in analytics events that the user registered while enrolling in a particular course.
- Arguments:
request (HTTPRequest)
- Returns:
HttpResponse: 200 on success HttpResponse: 400 if the request is not valid. HttpResponse: 409 if an account with the given username or email
address already exists
HttpResponse: 403 operation not allowed
- Status Codes:
200 OK – No response body
- GET /user_api/v1/forum_roles/{name}/users/#
Forum roles are represented by a list of user dicts
- Parameters:
name (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /user_api/v1/preferences/{pref_key}/users/#
DRF class for listing a user’s preferences
- Parameters:
pref_key (string)
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- POST /user_api/v1/preferences/email_opt_in/#
Post function for updating the email opt in preference.
Allows the modification or creation of the email opt in preference at an organizational level.
- Args:
- request (Request): The request should contain the following POST parameters:
- course_id: The slash separated course ID. Used to determine the organization
for this preference setting.
- email_opt_in: “True” or “False” to determine if the user is opting in for emails from
this organization. If the string does not match “True” (case insensitive) it will assume False.
- Status Codes:
200 OK – No response body
- GET /user_api/v1/preferences/time_zones/#
Use Cases
Retrieves a list of all time zones, by default, or common time zones for country, if given
The country is passed in as its ISO 3166-1 Alpha-2 country code as an optional ‘country_code’ argument. The country code is also case-insensitive.
Example Requests
GET /api/user/v1/preferences/time_zones/
GET /api/user/v1/preferences/time_zones/?country_code=FR
Example GET Response
If the request is successful, an HTTP 200 “OK” response is returned along with a list of time zone dictionaries for all time zones or just for time zones commonly used in a country, if given.
Each time zone dictionary contains the following values.
time_zone: The name of the time zone.
description: The display version of the time zone
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /user_api/v1/user_prefs/#
DRF class for interacting with the UserPreference ORM
- Query Parameters:
key (string)
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
user (integer)
- Status Codes:
200 OK –
- GET /user_api/v1/user_prefs/{id}/#
DRF class for interacting with the UserPreference ORM
- Parameters:
id (integer) – A unique integer value identifying this user preference.
- Status Codes:
200 OK –
- GET /user_api/v1/users/#
DRF class for interacting with the User ORM object
- Query Parameters:
page (integer) – A page number within the paginated result set.
page_size (integer) – Number of results to return per page.
- Status Codes:
200 OK –
- GET /user_api/v1/users/{id}/#
DRF class for interacting with the User ORM object
- Parameters:
id (integer) – A unique integer value identifying this user.
- Status Codes:
200 OK –
- GET /user_api/v2/account/registration/#
HTTP end-points for creating a new user.
- Status Codes:
200 OK – No response body
- POST /user_api/v2/account/registration/#
Create the user’s account.
You must send all required form fields with the request.
You can optionally send a “course_id” param to indicate in analytics events that the user registered while enrolling in a particular course.
- Arguments:
request (HTTPRequest)
- Returns:
HttpResponse: 200 on success HttpResponse: 400 if the request is not valid. HttpResponse: 409 if an account with the given username or email
address already exists
HttpResponse: 403 operation not allowed
- Status Codes:
200 OK – No response body
- GET /verify_student/decrypt-idv-images/face/{receipt_id}#
Endpoint used for decrypting images on stage based on a given receipt ID GET /verify_student/decrypt-idv-images/face/{receipt_id}
- Returns:
200 OK {
img
}
- Parameters:
receipt_id (string)
- Status Codes:
200 OK – No response body
- GET /verify_student/decrypt-idv-images/photo-id/{receipt_id}#
Endpoint used for decrypting images on stage based on a given receipt ID GET /verify_student/decrypt-idv-images/photo-id/{receipt_id}
- Returns:
200 OK {
img
}
- Parameters:
receipt_id (string)
- Status Codes:
200 OK – No response body
- GET /verify_student/photo-urls/{receipt_id}#
Endpoint for retrieving photo urls for IDV GET /verify_student/photo-urls/{receipt_id}
- Returns:
200 OK {
“EdX-ID”: receipt_id, “ExpectedName”: user profile name, “PhotoID”: id photo S3 url, “PhotoIDKey”: encrypted photo id key, “UserPhoto”: face photo S3 url, “UserPhotoKey”: encrypted user photo key,
}
- Parameters:
receipt_id (string)
- Status Codes:
200 OK – No response body
- GET /xblocks/v2/{usage_key}/embed/{view_name}/#
Render the given XBlock in an <iframe>
Unstable - may change after Sumac
- Parameters:
usage_key (string)
view_name (string)
- Status Codes:
200 OK – No response body
- GET /xqueue/get_submission/#
Endpoint for retrieving a single unprocessed submission from a specified queue. Query Parameters: - queue_name (required): Name of the queue to pull from Returns: - Submission data with pull information if successful - Error message if queue is empty or invalid
- Status Codes:
200 OK – No response body
- GET /xqueue/login/#
Endpoint for authenticating users and creating sessions.
GET: Sets the CSRF cookie so that xqueue-watcher can extract the token before POSTing credentials. Returns an empty success response.
POST: Authenticates the supplied username/password and opens a session.
- Status Codes:
200 OK – No response body
- POST /xqueue/login/#
Endpoint for authenticating users and creating sessions.
GET: Sets the CSRF cookie so that xqueue-watcher can extract the token before POSTing credentials. Returns an empty success response.
POST: Authenticates the supplied username/password and opens a session.
- Status Codes:
200 OK – No response body
- POST /xqueue/put_result/#
Endpoint for graders to post their results and update submission scores.
- Status Codes:
200 OK – No response body
- POST /xqueue/status/#
A collection of services for xqueue-watcher interactions and authentication.
This ViewSet provides endpoints for managing external grader results and handling user authentication in the system.
Key features: - Handles validation of external grader responses - Processes and updates submission scores - Provides a secure endpoint for result updates - Manages user authentication and session handling
Endpoints: - put_result: Endpoint for graders to submit their assessment results - get_submission: Endpoint for fetch pending submissions - login: Endpoint for user authentication - logout: Endpoint for ending user sessions
HTTP Status Codes: In contrast to previous implementations that always returned HTTP 200 status codes and relied solely on the JSON response body to indicate success or failure, this implementation returns HTTP status codes that more accurately reflect the outcome of each request (such as 400, 401, 403, or 404 for error conditions). This change improves API clarity and error handling.
NOTE: This viewset is intentionally re-building an API-compatible implementation for xqueue-watcher. Some non-standard choices (such as response formats and status code handling) are made to maintain compatibility with the legacy xqueue-watcher client. For more context, see DEPR: openedx/public-engineering#286.
- Status Codes:
200 OK – No response body
- POST /zendesk_proxy/v0#
request body is expected to look like this: {
“name”: “John Q. Student”, “email”: {
“from”: “JohnQStudent@realemailhost.com”, “message”: “I, John Q. Student, am having problems for the following reasons: …”, “subject”: “Help Request”
}, “tags”: [“zendesk_help_request”]
}
- Status Codes:
200 OK – No response body
- POST /zendesk_proxy/v1#
request body is expected to look like this: {
- “requester”: {
“email”: “john@example.com”, “name”: “name”
}, “subject”: “test subject”, “comment”: {
“body”: “message details”, “uploads”: [‘file_token’],
}, “custom_fields”: [
- {
“id”: ‘001’, “value”: ‘demo-course’
}
], “tags”: [“LMS”]
}
- Status Codes:
200 OK – No response body