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 /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:
POST /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:
GET /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:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

  • course_id (string) – The id of the course to limit the list

  • fields (string) – The fields to return: display_name, path.

Status Codes:
POST /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 /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:
DELETE /bookmarks/v1/bookmarks/{username},{usage_id}/#

DELETE /api/bookmarks/v1/bookmarks/{username},{usage_id}

Parameters:
  • usage_id (string) –

  • username (string) –

Status Codes:
POST /bulk_enroll/v1/bulk_enroll#

**Use Case**

Enroll multiple users in one or more courses.

Example Request

POST /api/bulk_enroll/v1/bulk_enroll/ {

“auto_enroll”: true, “email_students”: true, “action”: “enroll”, “courses”: “course-v1:edX+Demo+123,course-v1:edX+Demo2+456”, “cohorts”: “cohortA,cohortA”, “identifiers”: “brandon@example.com,yamilah@example.com”

}

POST Parameters

A POST request can include the following parameters.

  • auto_enroll: When set to true, students will be enrolled as soon as they register.

  • email_students: When set to true, students will be sent email notifications upon enrollment.

  • action: Can either be set to “enroll” or “unenroll”. This determines the behavior

  • cohorts: Optional. If provided, the number of items in the list should be equal to the number of courses. first cohort coressponds with the first course and so on. The learners will be added to the corresponding cohort.

Response Values

If the supplied course data is valid and the enrollments were successful, an HTTP 200 “OK” response is returned.

The HTTP 200 response body contains a list of response data for each enrollment. (See the instructor.views.api.students_update_enrollment docstring for the specifics of the response data available for each enrollment)

If a cohorts list is provided, additional ‘cohort’ keys will be added to the ‘before’ and ‘after’ states.

Status Codes:
GET /ccx/v0/ccx/#

Gets a list of CCX Courses for a given Master Course.

Additional parameters are allowed for pagination purposes.

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].ccx_course_id (string) – (read only)

  • results[].coach_email (string) – (required)

  • results[].course_modules (string) – (read only)

  • results[].display_name (string) – (required)

  • results[].due (string) – (required)

  • results[].master_course_id (string) – (required)

  • results[].max_students_allowed (integer) – (required)

  • results[].start (string) – (required)

POST /ccx/v0/ccx/#

Creates a new CCX course for a given Master Course.

Request JSON Object:
  • ccx_course_id (string) – (read only)

  • coach_email (string) – (required)

  • course_modules (string) – (read only)

  • display_name (string) – (required)

  • due (string) – (required)

  • master_course_id (string) – (required)

  • max_students_allowed (integer) – (required)

  • start (string) – (required)

Status Codes:
Response JSON Object:
  • ccx_course_id (string) – (read only)

  • coach_email (string) – (required)

  • course_modules (string) – (read only)

  • display_name (string) – (required)

  • due (string) – (required)

  • master_course_id (string) – (required)

  • max_students_allowed (integer) – (required)

  • start (string) – (required)

GET /ccx/v0/ccx/{ccx_course_id}/#

Gets a CCX Course information.

Parameters:
  • ccx_course_id (string) –

Status Codes:
Response JSON Object:
  • ccx_course_id (string) – (read only)

  • coach_email (string) – (required)

  • course_modules (string) – (read only)

  • display_name (string) – (required)

  • due (string) – (required)

  • master_course_id (string) – (required)

  • max_students_allowed (integer) – (required)

  • start (string) – (required)

PATCH /ccx/v0/ccx/{ccx_course_id}/#

Modifies a CCX course.

Parameters:
  • ccx_course_id (string) –

Request JSON Object:
  • ccx_course_id (string) – (read only)

  • coach_email (string) – (required)

  • course_modules (string) – (read only)

  • display_name (string) – (required)

  • due (string) – (required)

  • master_course_id (string) – (required)

  • max_students_allowed (integer) – (required)

  • start (string) – (required)

Status Codes:
Response JSON Object:
  • ccx_course_id (string) – (read only)

  • coach_email (string) – (required)

  • course_modules (string) – (read only)

  • display_name (string) – (required)

  • due (string) – (required)

  • master_course_id (string) – (required)

  • max_students_allowed (integer) – (required)

  • start (string) – (required)

DELETE /ccx/v0/ccx/{ccx_course_id}/#

Deletes a CCX course.

Parameters:
  • ccx_course_id (string) –

Status Codes:
GET /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

  • username

Status Codes:
GET /certificates/v0/certificates/{username}/courses/{course_id}/#

Retrieves certificate information for a user in a specified course run.

Parameters:
  • course_id (string) –

  • username (string) –

Status Codes:
POST /change_email_settings#

Modify logged-in user’s setting for receiving emails from a course.

Status Codes:
GET /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:
POST /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:
PATCH /cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}#

Endpoint to update a cohort name and/or assignment type.

Parameters:
  • cohort_id (string) –

  • course_key_string (string) –

Status Codes:
GET /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:
Response JSON Object:
  • email (string) –

  • name (string) – (read only)

  • username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (required)

POST /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) –

Request JSON Object:
  • email (string) –

  • name (string) – (read only)

  • username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (required)

Status Codes:
Response JSON Object:
  • email (string) –

  • name (string) – (read only)

  • username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (required)

DELETE /cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}/users/{username}#

Removes and user from a specific cohort.

Parameters:
  • cohort_id (string) –

  • course_key_string (string) –

  • username (string) –

Status Codes:
POST /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:
GET /cohorts/v1/settings/{course_key_string}#

Endpoint to fetch the course cohort settings.

Parameters:
  • course_key_string (string) –

Status Codes:
PUT /cohorts/v1/settings/{course_key_string}#

Endpoint to set the course cohort settings.

Parameters:
  • course_key_string (string) –

Status Codes:
POST /commerce/v0/baskets/#

Attempt to enroll the user.

Status Codes:
GET /commerce/v0/baskets/{basket_id}/order/#

HTTP handler.

Parameters:
  • basket_id (string) –

Status Codes:
GET /commerce/v1/courses/#

List courses and modes.

Status Codes:
Response JSON Object:
  • [].id (string) – (required)

  • [].modes[].bulk_sku (string) – This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.

  • [].modes[].currency (string) –

  • [].modes[].expires (string) –

  • [].modes[].name (string) – (required)

  • [].modes[].price (integer) – (required)

  • [].modes[].sku (string) – OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.

  • [].name (string) – (read only)

  • [].verification_deadline (string) –

GET /commerce/v1/courses/{course_id}/#

Retrieve, update, or create courses/modes.

Parameters:
  • course_id (string) –

Status Codes:
Response JSON Object:
  • id (string) – (required)

  • modes[].bulk_sku (string) – This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.

  • modes[].currency (string) –

  • modes[].expires (string) –

  • modes[].name (string) – (required)

  • modes[].price (integer) – (required)

  • modes[].sku (string) – OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.

  • name (string) – (read only)

  • verification_deadline (string) –

PUT /commerce/v1/courses/{course_id}/#

Retrieve, update, or create courses/modes.

Parameters:
  • course_id (string) –

Request JSON Object:
  • id (string) – (required)

  • modes[].bulk_sku (string) – This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.

  • modes[].currency (string) –

  • modes[].expires (string) –

  • modes[].name (string) – (required)

  • modes[].price (integer) – (required)

  • modes[].sku (string) – OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.

  • name (string) – (read only)

  • verification_deadline (string) –

Status Codes:
Response JSON Object:
  • id (string) – (required)

  • modes[].bulk_sku (string) – This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.

  • modes[].currency (string) –

  • modes[].expires (string) –

  • modes[].name (string) – (required)

  • modes[].price (integer) – (required)

  • modes[].sku (string) – OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.

  • name (string) – (read only)

  • verification_deadline (string) –

PATCH /commerce/v1/courses/{course_id}/#

Retrieve, update, or create courses/modes.

Parameters:
  • course_id (string) –

Request JSON Object:
  • id (string) – (required)

  • modes[].bulk_sku (string) – This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.

  • modes[].currency (string) –

  • modes[].expires (string) –

  • modes[].name (string) – (required)

  • modes[].price (integer) – (required)

  • modes[].sku (string) – OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.

  • name (string) – (read only)

  • verification_deadline (string) –

Status Codes:
Response JSON Object:
  • id (string) – (required)

  • modes[].bulk_sku (string) – This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.

  • modes[].currency (string) –

  • modes[].expires (string) –

  • modes[].name (string) – (required)

  • modes[].price (integer) – (required)

  • modes[].sku (string) – OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.

  • name (string) – (read only)

  • verification_deadline (string) –

GET /commerce/v1/orders/{number}/#

HTTP handler.

Parameters:
  • number (string) –

Status Codes:
POST /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 201:

GET /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:
GET /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:
Response JSON Object:
  • dates_banner_info (string) – (read only)

  • has_ended (string) – (read only)

POST /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:
GET /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:
Response JSON Object:
  • can_show_upgrade_sock (string) – (read only)

  • can_view_certificate (boolean) – (required)

  • celebrations (object) – (required)

  • course_access (object) – (required)

  • course_id (string) – (required)

  • is_enrolled (boolean) – (required)

  • is_self_paced (boolean) – (required)

  • is_staff (boolean) – (required)

  • number (string) – (required)

  • org (string) – (required)

  • original_user_is_staff (boolean) – (required)

  • start (string) – (required)

  • tabs[].tab_id (string) – (required)

  • tabs[].title (string) – (read only)

  • tabs[].url (string) – (read only)

  • title (string) – (required)

  • user_timezone (string) – (required)

  • username (string) – (required)

  • verified_mode (string) – (read only)

GET /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.

  • 404 if the course is not available or cannot be seen.

Parameters:
  • course_key_string (string) –

Status Codes:
Response JSON Object:
  • course_date_blocks[].assignment_type (string) –

  • course_date_blocks[].complete (boolean) – (required)

  • course_date_blocks[].date (string) – (required)

  • course_date_blocks[].date_type (string) – (required)

  • course_date_blocks[].description (string) – (required)

  • course_date_blocks[].extra_info (string) – (required)

  • course_date_blocks[].first_component_block_id (string) – (read only)

  • course_date_blocks[].learner_has_access (string) – (read only)

  • course_date_blocks[].link (string) – (read only)

  • course_date_blocks[].link_text (string) – (required)

  • course_date_blocks[].title (string) – (required)

  • dates_banner_info (string) – (read only)

  • has_ended (boolean) – (required)

  • learner_is_full_access (boolean) – (required)

  • user_timezone (string) – (required)

POST /course_home/dismiss_welcome_message#
Status Codes:
GET /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 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)

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

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:
Response JSON Object:
  • access_expiration (object) – (required)

  • can_show_upgrade_sock (string) – (read only)

  • cert_data.cert_status (string) – (required)

  • cert_data.cert_web_view_url (string) – (required)

  • cert_data.certificate_available_date (string) – (required)

  • cert_data.download_url (string) – (required)

  • course_blocks.blocks (string) – (read only)

  • course_goals.selected_goal (object) – (required)

  • course_goals.weekly_learning_goal_enabled (boolean) –

  • course_tools[].analytics_id (string) – (required)

  • course_tools[].title (string) – (required)

  • course_tools[].url (string) – (read only)

  • dates_banner_info (string) – (read only)

  • dates_widget.course_date_blocks[].assignment_type (string) –

  • dates_widget.course_date_blocks[].complete (boolean) – (required)

  • dates_widget.course_date_blocks[].date (string) – (required)

  • dates_widget.course_date_blocks[].date_type (string) – (required)

  • dates_widget.course_date_blocks[].description (string) – (required)

  • dates_widget.course_date_blocks[].extra_info (string) – (required)

  • dates_widget.course_date_blocks[].first_component_block_id (string) – (read only)

  • dates_widget.course_date_blocks[].learner_has_access (string) – (read only)

  • dates_widget.course_date_blocks[].link (string) – (read only)

  • dates_widget.course_date_blocks[].link_text (string) – (required)

  • dates_widget.course_date_blocks[].title (string) – (required)

  • dates_widget.dates_tab_link (string) – (required)

  • dates_widget.user_timezone (string) – (required)

  • enable_proctored_exams (boolean) – (required)

  • enroll_alert.can_enroll (boolean) – (required)

  • enroll_alert.extra_text (string) – (required)

  • enrollment_mode (string) – (required)

  • handouts_html (string) – (required)

  • has_ended (boolean) – (required)

  • offer (object) – (required)

  • resume_course.has_visited_course (boolean) – (required)

  • resume_course.url (string) – (required)

  • user_has_passing_grade (boolean) – (required)

  • verified_mode (string) – (read only)

  • welcome_message_html (string) – (required)

GET /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 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.

  • 404 if the course is not available or cannot be seen.

Parameters:
  • course_key_string (string) –

Status Codes:
Response JSON Object:
  • access_expiration (object) – (required)

  • can_show_upgrade_sock (string) – (read only)

  • certificate_data.cert_status (string) – (required)

  • certificate_data.cert_web_view_url (string) – (required)

  • certificate_data.certificate_available_date (string) – (required)

  • certificate_data.download_url (string) – (required)

  • completion_summary (object) – (required)

  • course_grade.is_passing (boolean) – (required)

  • course_grade.letter_grade (string) – (required)

  • course_grade.percent (number) – (required)

  • credit_course_requirements (object) – (required)

  • end (string) – (required)

  • enrollment_mode (string) – (required)

  • grading_policy.assignment_policies (string) – (read only)

  • grading_policy.grade_range (object) – (required)

  • has_scheduled_content (boolean) – (required)

  • section_scores[].display_name (string) – (required)

  • section_scores[].subsections[].assignment_type (string) – (required)

  • section_scores[].subsections[].block_key (string) – (read only)

  • section_scores[].subsections[].display_name (string) – (required)

  • section_scores[].subsections[].has_graded_assignment (boolean) – (required)

  • section_scores[].subsections[].learner_has_access (string) – (read only)

  • section_scores[].subsections[].num_points_earned (number) – (required)

  • section_scores[].subsections[].num_points_possible (number) – (required)

  • section_scores[].subsections[].override (string) – (read only)

  • section_scores[].subsections[].percent_graded (number) – (required)

  • section_scores[].subsections[].problem_scores (string) – (read only)

  • section_scores[].subsections[].show_correctness (string) – (required)

  • section_scores[].subsections[].show_grades (string) – (read only)

  • section_scores[].subsections[].url (string) – (read only)

  • studio_url (string) – (required)

  • user_has_passing_grade (boolean) – (required)

  • username (string) – (required)

  • verification_data.link (string) – (required)

  • verification_data.status (string) – (required)

  • verification_data.status_date (string) – (required)

  • verified_mode (string) – (read only)

GET /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 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.

  • 404 if the course is not available or cannot be seen.

Parameters:
  • course_key_string (string) –

  • student_id (string) –

Status Codes:
Response JSON Object:
  • access_expiration (object) – (required)

  • can_show_upgrade_sock (string) – (read only)

  • certificate_data.cert_status (string) – (required)

  • certificate_data.cert_web_view_url (string) – (required)

  • certificate_data.certificate_available_date (string) – (required)

  • certificate_data.download_url (string) – (required)

  • completion_summary (object) – (required)

  • course_grade.is_passing (boolean) – (required)

  • course_grade.letter_grade (string) – (required)

  • course_grade.percent (number) – (required)

  • credit_course_requirements (object) – (required)

  • end (string) – (required)

  • enrollment_mode (string) – (required)

  • grading_policy.assignment_policies (string) – (read only)

  • grading_policy.grade_range (object) – (required)

  • has_scheduled_content (boolean) – (required)

  • section_scores[].display_name (string) – (required)

  • section_scores[].subsections[].assignment_type (string) – (required)

  • section_scores[].subsections[].block_key (string) – (read only)

  • section_scores[].subsections[].display_name (string) – (required)

  • section_scores[].subsections[].has_graded_assignment (boolean) – (required)

  • section_scores[].subsections[].learner_has_access (string) – (read only)

  • section_scores[].subsections[].num_points_earned (number) – (required)

  • section_scores[].subsections[].num_points_possible (number) – (required)

  • section_scores[].subsections[].override (string) – (read only)

  • section_scores[].subsections[].percent_graded (number) – (required)

  • section_scores[].subsections[].problem_scores (string) – (read only)

  • section_scores[].subsections[].show_correctness (string) – (required)

  • section_scores[].subsections[].show_grades (string) – (read only)

  • section_scores[].subsections[].url (string) – (read only)

  • studio_url (string) – (required)

  • user_has_passing_grade (boolean) – (required)

  • username (string) – (required)

  • verification_data.link (string) – (required)

  • verification_data.status (string) – (required)

  • verification_data.status_date (string) – (required)

  • verified_mode (string) – (read only)

POST /course_home/save_course_goal#
Status Codes:
POST /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:
GET /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:
Response JSON Object:
  • can_show_upgrade_sock (string) – (read only)

  • can_view_certificate (boolean) – (required)

  • celebrations (object) – (required)

  • course_access (object) – (required)

  • course_id (string) – (required)

  • is_enrolled (boolean) – (required)

  • is_self_paced (boolean) – (required)

  • is_staff (boolean) – (required)

  • number (string) – (required)

  • org (string) – (required)

  • original_user_is_staff (boolean) – (required)

  • start (string) – (required)

  • tabs[].tab_id (string) – (required)

  • tabs[].title (string) – (read only)

  • tabs[].url (string) – (read only)

  • title (string) – (required)

  • user_timezone (string) – (required)

  • username (string) – (required)

  • verified_mode (string) – (read only)

GET /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.

  • 404 if the course is not available or cannot be seen.

Parameters:
  • course_key_string (string) –

Status Codes:
Response JSON Object:
  • course_date_blocks[].assignment_type (string) –

  • course_date_blocks[].complete (boolean) – (required)

  • course_date_blocks[].date (string) – (required)

  • course_date_blocks[].date_type (string) – (required)

  • course_date_blocks[].description (string) – (required)

  • course_date_blocks[].extra_info (string) – (required)

  • course_date_blocks[].first_component_block_id (string) – (read only)

  • course_date_blocks[].learner_has_access (string) – (read only)

  • course_date_blocks[].link (string) – (read only)

  • course_date_blocks[].link_text (string) – (required)

  • course_date_blocks[].title (string) – (required)

  • dates_banner_info (string) – (read only)

  • has_ended (boolean) – (required)

  • learner_is_full_access (boolean) – (required)

  • user_timezone (string) – (required)

POST /course_home/v1/dismiss_welcome_message#
Status Codes:
GET /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 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)

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

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:
Response JSON Object:
  • access_expiration (object) – (required)

  • can_show_upgrade_sock (string) – (read only)

  • cert_data.cert_status (string) – (required)

  • cert_data.cert_web_view_url (string) – (required)

  • cert_data.certificate_available_date (string) – (required)

  • cert_data.download_url (string) – (required)

  • course_blocks.blocks (string) – (read only)

  • course_goals.selected_goal (object) – (required)

  • course_goals.weekly_learning_goal_enabled (boolean) –

  • course_tools[].analytics_id (string) – (required)

  • course_tools[].title (string) – (required)

  • course_tools[].url (string) – (read only)

  • dates_banner_info (string) – (read only)

  • dates_widget.course_date_blocks[].assignment_type (string) –

  • dates_widget.course_date_blocks[].complete (boolean) – (required)

  • dates_widget.course_date_blocks[].date (string) – (required)

  • dates_widget.course_date_blocks[].date_type (string) – (required)

  • dates_widget.course_date_blocks[].description (string) – (required)

  • dates_widget.course_date_blocks[].extra_info (string) – (required)

  • dates_widget.course_date_blocks[].first_component_block_id (string) – (read only)

  • dates_widget.course_date_blocks[].learner_has_access (string) – (read only)

  • dates_widget.course_date_blocks[].link (string) – (read only)

  • dates_widget.course_date_blocks[].link_text (string) – (required)

  • dates_widget.course_date_blocks[].title (string) – (required)

  • dates_widget.dates_tab_link (string) – (required)

  • dates_widget.user_timezone (string) – (required)

  • enable_proctored_exams (boolean) – (required)

  • enroll_alert.can_enroll (boolean) – (required)

  • enroll_alert.extra_text (string) – (required)

  • enrollment_mode (string) – (required)

  • handouts_html (string) – (required)

  • has_ended (boolean) – (required)

  • offer (object) – (required)

  • resume_course.has_visited_course (boolean) – (required)

  • resume_course.url (string) – (required)

  • user_has_passing_grade (boolean) – (required)

  • verified_mode (string) – (read only)

  • welcome_message_html (string) – (required)

GET /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 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.

  • 404 if the course is not available or cannot be seen.

Parameters:
  • course_key_string (string) –

Status Codes:
Response JSON Object:
  • access_expiration (object) – (required)

  • can_show_upgrade_sock (string) – (read only)

  • certificate_data.cert_status (string) – (required)

  • certificate_data.cert_web_view_url (string) – (required)

  • certificate_data.certificate_available_date (string) – (required)

  • certificate_data.download_url (string) – (required)

  • completion_summary (object) – (required)

  • course_grade.is_passing (boolean) – (required)

  • course_grade.letter_grade (string) – (required)

  • course_grade.percent (number) – (required)

  • credit_course_requirements (object) – (required)

  • end (string) – (required)

  • enrollment_mode (string) – (required)

  • grading_policy.assignment_policies (string) – (read only)

  • grading_policy.grade_range (object) – (required)

  • has_scheduled_content (boolean) – (required)

  • section_scores[].display_name (string) – (required)

  • section_scores[].subsections[].assignment_type (string) – (required)

  • section_scores[].subsections[].block_key (string) – (read only)

  • section_scores[].subsections[].display_name (string) – (required)

  • section_scores[].subsections[].has_graded_assignment (boolean) – (required)

  • section_scores[].subsections[].learner_has_access (string) – (read only)

  • section_scores[].subsections[].num_points_earned (number) – (required)

  • section_scores[].subsections[].num_points_possible (number) – (required)

  • section_scores[].subsections[].override (string) – (read only)

  • section_scores[].subsections[].percent_graded (number) – (required)

  • section_scores[].subsections[].problem_scores (string) – (read only)

  • section_scores[].subsections[].show_correctness (string) – (required)

  • section_scores[].subsections[].show_grades (string) – (read only)

  • section_scores[].subsections[].url (string) – (read only)

  • studio_url (string) – (required)

  • user_has_passing_grade (boolean) – (required)

  • username (string) – (required)

  • verification_data.link (string) – (required)

  • verification_data.status (string) – (required)

  • verification_data.status_date (string) – (required)

  • verified_mode (string) – (read only)

GET /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 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.

  • 404 if the course is not available or cannot be seen.

Parameters:
  • course_key_string (string) –

  • student_id (string) –

Status Codes:
Response JSON Object:
  • access_expiration (object) – (required)

  • can_show_upgrade_sock (string) – (read only)

  • certificate_data.cert_status (string) – (required)

  • certificate_data.cert_web_view_url (string) – (required)

  • certificate_data.certificate_available_date (string) – (required)

  • certificate_data.download_url (string) – (required)

  • completion_summary (object) – (required)

  • course_grade.is_passing (boolean) – (required)

  • course_grade.letter_grade (string) – (required)

  • course_grade.percent (number) – (required)

  • credit_course_requirements (object) – (required)

  • end (string) – (required)

  • enrollment_mode (string) – (required)

  • grading_policy.assignment_policies (string) – (read only)

  • grading_policy.grade_range (object) – (required)

  • has_scheduled_content (boolean) – (required)

  • section_scores[].display_name (string) – (required)

  • section_scores[].subsections[].assignment_type (string) – (required)

  • section_scores[].subsections[].block_key (string) – (read only)

  • section_scores[].subsections[].display_name (string) – (required)

  • section_scores[].subsections[].has_graded_assignment (boolean) – (required)

  • section_scores[].subsections[].learner_has_access (string) – (read only)

  • section_scores[].subsections[].num_points_earned (number) – (required)

  • section_scores[].subsections[].num_points_possible (number) – (required)

  • section_scores[].subsections[].override (string) – (read only)

  • section_scores[].subsections[].percent_graded (number) – (required)

  • section_scores[].subsections[].problem_scores (string) – (read only)

  • section_scores[].subsections[].show_correctness (string) – (required)

  • section_scores[].subsections[].show_grades (string) – (read only)

  • section_scores[].subsections[].url (string) – (read only)

  • studio_url (string) – (required)

  • user_has_passing_grade (boolean) – (required)

  • username (string) – (required)

  • verification_data.link (string) – (required)

  • verification_data.status (string) – (required)

  • verification_data.status_date (string) – (required)

  • verified_mode (string) – (read only)

POST /course_home/v1/save_course_goal#
Status Codes:
POST /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:
GET /course_live/course/{course_id}/#

Handle HTTP/GET requests

Handle HTTP/GET requests

Parameters:
  • course_id (string) – The course for which to get provider list

  • course_id

Status Codes:
Response JSON Object:
  • course_key (string) – (read only)

  • enabled (boolean) – If disabled, the LTI in the associated course will be disabled.

  • free_tier (boolean) – True, if LTI credential are provided by Org globally

  • lti_configuration.lti_1p1_client_key (string) – Client key provided by the LTI tool provider.

  • lti_configuration.lti_1p1_client_secret (string) – Client secret provided by the LTI tool provider.

  • lti_configuration.lti_1p1_launch_url (string) – The URL of the external tool that initiates the launch.

  • lti_configuration.lti_config (object) – (required)

  • lti_configuration.version (string) –

  • pii_sharing_allowed (string) – (read only)

  • provider_type (string) – The LTI provider’s id (required)

POST /course_live/course/{course_id}/#

Handle HTTP/POST requests

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

  • course_id

Query Parameters:
  • lti_config (object) – The lti_config object with required additional parameters

Status Codes:
Response JSON Object:
  • course_key (string) – (read only)

  • enabled (boolean) – If disabled, the LTI in the associated course will be disabled.

  • free_tier (boolean) – True, if LTI credential are provided by Org globally

  • lti_configuration.lti_1p1_client_key (string) – Client key provided by the LTI tool provider.

  • lti_configuration.lti_1p1_client_secret (string) – Client secret provided by the LTI tool provider.

  • lti_configuration.lti_1p1_launch_url (string) – The URL of the external tool that initiates the launch.

  • lti_configuration.lti_config (object) – (required)

  • lti_configuration.version (string) –

  • pii_sharing_allowed (string) – (read only)

  • provider_type (string) – The LTI provider’s id (required)

GET /course_live/iframe/{course_id}/#

Handle HTTP/GET requests

Parameters:
  • course_id (string) –

Status Codes:
GET /course_live/providers/{course_id}/#

A view for retrieving Program live IFrame .

Parameters:
  • course_id (string) –

Status Codes:
GET /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:
Response JSON Object:
  • [].bulk_sku (string) –

  • [].course_id (string) – (required)

  • [].currency (string) – (required)

  • [].description (string) –

  • [].expiration_datetime (string) –

  • [].expiration_datetime_is_explicit (boolean) –

  • [].min_price (integer) –

  • [].mode_display_name (string) – (required)

  • [].mode_slug (string) – (required)

  • [].sku (string) –

POST /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) –

Request JSON Object:
  • bulk_sku (string) –

  • course_id (string) – (required)

  • currency (string) – (required)

  • description (string) –

  • expiration_datetime (string) –

  • expiration_datetime_is_explicit (boolean) –

  • min_price (integer) –

  • mode_display_name (string) – (required)

  • mode_slug (string) – (required)

  • sku (string) –

Status Codes:
Response JSON Object:
  • bulk_sku (string) –

  • course_id (string) – (required)

  • currency (string) – (required)

  • description (string) –

  • expiration_datetime (string) –

  • expiration_datetime_is_explicit (boolean) –

  • min_price (integer) –

  • mode_display_name (string) – (required)

  • mode_slug (string) – (required)

  • sku (string) –

GET /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:
Response JSON Object:
  • bulk_sku (string) –

  • course_id (string) – (required)

  • currency (string) – (required)

  • description (string) –

  • expiration_datetime (string) –

  • expiration_datetime_is_explicit (boolean) –

  • min_price (integer) –

  • mode_display_name (string) – (required)

  • mode_slug (string) – (required)

  • sku (string) –

PATCH /course_modes/v1/courses/{course_id}/{mode_slug}#

Performs a partial update of a CourseMode instance.

Parameters:
  • course_id (string) –

  • mode_slug (string) –

Request JSON Object:
  • bulk_sku (string) –

  • course_id (string) – (required)

  • currency (string) – (required)

  • description (string) –

  • expiration_datetime (string) –

  • expiration_datetime_is_explicit (boolean) –

  • min_price (integer) –

  • mode_display_name (string) – (required)

  • mode_slug (string) – (required)

  • sku (string) –

Status Codes:
Response JSON Object:
  • bulk_sku (string) –

  • course_id (string) – (required)

  • currency (string) – (required)

  • description (string) –

  • expiration_datetime (string) –

  • expiration_datetime_is_explicit (boolean) –

  • min_price (integer) –

  • mode_display_name (string) – (required)

  • mode_slug (string) – (required)

  • sku (string) –

DELETE /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:
GET /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) –

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /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 parameter

  • course_id: (string, required) The ID of the course whose block data we want to return

Response Values

Responses are identical to those returned by BlocksView when 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.

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /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_blocks is 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) –

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /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:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[] (string) –

GET /courses/v1/courses/#

**Use Cases**

Request information on all courses visible to the specified user.

Example Requests

GET /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 filters visible CourseOverview objects by the course keys (ids) provided

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”

}

]

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].blocks_url (string) – (read only)

  • results[].course_id (string) – (read only)

  • results[].effort (string) – (required)

  • results[].end (string) – (required)

  • results[].enrollment_end (string) – (required)

  • results[].enrollment_start (string) – (required)

  • results[].hidden (string) – (read only)

  • results[].id (string) – (required)

  • results[].invitation_only (boolean) – (required)

  • results[].media.banner_image.uri (string) – (read only)

  • results[].media.banner_image.uri_absolute (string) – (read only)

  • results[].media.course_image.uri (string) – (read only)

  • results[].media.course_video.uri (string) – (read only)

  • results[].media.image.large (string) – (required)

  • results[].media.image.raw (string) – (required)

  • results[].media.image.small (string) – (required)

  • results[].mobile_available (boolean) – (required)

  • results[].name (string) – (required)

  • results[].number (string) – (required)

  • results[].org (string) – (required)

  • results[].pacing (string) – (required)

  • results[].short_description (string) – (required)

  • results[].start (string) – (required)

  • results[].start_display (string) – (required)

  • results[].start_type (string) – (required)

GET /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:
Response JSON Object:
  • blocks_url (string) – (read only)

  • course_id (string) – (read only)

  • effort (string) – (required)

  • end (string) – (required)

  • enrollment_end (string) – (required)

  • enrollment_start (string) – (required)

  • hidden (string) – (read only)

  • id (string) – (required)

  • invitation_only (boolean) – (required)

  • media.banner_image.uri (string) – (read only)

  • media.banner_image.uri_absolute (string) – (read only)

  • media.course_image.uri (string) – (read only)

  • media.course_video.uri (string) – (read only)

  • media.image.large (string) – (required)

  • media.image.raw (string) – (required)

  • media.image.small (string) – (required)

  • mobile_available (boolean) – (required)

  • name (string) – (required)

  • number (string) – (required)

  • org (string) – (required)

  • overview (string) – (read only)

  • pacing (string) – (required)

  • short_description (string) – (required)

  • start (string) – (required)

  • start_display (string) – (required)

  • start_type (string) – (required)

GET /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) –

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /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 parameter

  • course_id: (string, required) The ID of the course whose block data we want to return

Response Values

Responses are identical to those returned by BlocksView when 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.

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /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_blocks is 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) –

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
POST /courseware/celebration/{course_key_string}#

Handle a POST request.

Parameters:
  • course_key_string (string) –

Status Codes:
GET /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.

  • 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.

  • 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

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:
GET /courseware/resume/{course_key_string}#

Return response to a GET request.

Parameters:
  • course_key_string (string) –

Status Codes:
GET /courseware/sequence/{usage_key_string}#

Return response to a GET request.

Parameters:
  • usage_key_string (string) –

Status Codes:
GET /credit/v1/courses/#

CreditCourse endpoints.

Status Codes:
Response JSON Object:
  • [].course_key (string) – (required)

  • [].enabled (boolean) –

POST /credit/v1/courses/#

CreditCourse endpoints.

Request JSON Object:
  • course_key (string) – (required)

  • enabled (boolean) –

Status Codes:
Response JSON Object:
  • course_key (string) – (required)

  • enabled (boolean) –

GET /credit/v1/courses/{course_key}/#

CreditCourse endpoints.

Parameters:
  • course_key (string) –

Status Codes:
Response JSON Object:
  • course_key (string) – (required)

  • enabled (boolean) –

PUT /credit/v1/courses/{course_key}/#

Create/update course modes for a course.

Parameters:
  • course_key (string) –

Request JSON Object:
  • course_key (string) – (required)

  • enabled (boolean) –

Status Codes:
Response JSON Object:
  • course_key (string) – (required)

  • enabled (boolean) –

PATCH /credit/v1/courses/{course_key}/#

CreditCourse endpoints.

Parameters:
  • course_key (string) –

Request JSON Object:
  • course_key (string) – (required)

  • enabled (boolean) –

Status Codes:
Response JSON Object:
  • course_key (string) – (required)

  • enabled (boolean) –

GET /credit/v1/eligibility/#

Returns eligibility for a user-course combination.

Status Codes:
Response JSON Object:
  • [].course_key (string) – (read only)

  • [].deadline (string) – Deadline for purchasing and requesting credit.

  • [].username (string) – (required)

GET /credit/v1/providers/#

Credit provider endpoints.

Status Codes:
Response JSON Object:
  • [].description (string) – (required)

  • [].display_name (string) – Name of the credit provider displayed to users (required)

  • [].enable_integration (boolean) – When true, automatically notify the credit provider when a user requests credit. In order for this to work, a shared secret key MUST be configured for the credit provider in secure auth settings.

  • [].fulfillment_instructions (string) – Plain text or html content for displaying further steps on receipt page after paying for the credit to get credit for a credit course against a credit provider.

  • [].id (string) – (required)

  • [].status_url (string) – (required)

  • [].thumbnail_url (string) – Thumbnail image url of the credit provider.

  • [].url (string) – (required)

GET /credit/v1/providers/{provider_id}/#

Credit provider endpoints.

Parameters:
  • provider_id (string) – Unique identifier for this credit provider. Only alphanumeric characters and hyphens (-) are allowed. The identifier is case-sensitive.

Status Codes:
Response JSON Object:
  • description (string) – (required)

  • display_name (string) – Name of the credit provider displayed to users (required)

  • enable_integration (boolean) – When true, automatically notify the credit provider when a user requests credit. In order for this to work, a shared secret key MUST be configured for the credit provider in secure auth settings.

  • fulfillment_instructions (string) – Plain text or html content for displaying further steps on receipt page after paying for the credit to get credit for a credit course against a credit provider.

  • id (string) – (required)

  • status_url (string) – (required)

  • thumbnail_url (string) – Thumbnail image url of the credit provider.

  • url (string) – (required)

POST /credit/v1/providers/{provider_id}/callback/#

POST handler.

Parameters:
  • provider_id (string) –

Status Codes:
POST /credit/v1/providers/{provider_id}/request/#

POST handler.

Parameters:
  • provider_id (string) –

Status Codes:
GET /dashboard/v0/programs/{enterprise_uuid}/#

Return a list of a enterprise learner’s all enrolled programs with their progress.

Parameters:
  • enterprise_uuid (string) –

Status Codes:
GET /dashboard/v0/programs/{program_uuid}/progress_details/#

Retrieves progress details of a user in a specified program.

Parameters:
  • program_uuid (string) –

Status Codes:
GET /dashboard/v0/recommendation/courses/#

Retrieves course recommendations details of a user in a specified course.

Status Codes:
GET /demographics/v1/demographics/status/#

GET /api/user/v1/accounts/demographics/status

This is a Web API to determine the status of demographics related features

Status Codes:
PATCH /demographics/v1/demographics/status/#

PATCH /api/user/v1/accounts/demographics/status

This is a Web API to update fields that are dependent on user interaction.

Status Codes:
GET /discounts/course/{course_key_string}#

Return the discount percent, if the user has appropriate permissions.

Parameters:
  • course_key_string (string) –

Status Codes:
GET /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:
POST /discussion/v1/accounts/replace_username#

Implements the username replacement endpoint

Status Codes:
POST /discussion/v1/accounts/retire_forum#

Implements the retirement endpoint.

Status Codes:
GET /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:
POST /discussion/v1/comments/#

Implements the POST method for the list endpoint as described in the class docstring.

Status Codes:
GET /discussion/v1/comments/{comment_id}/#

Implements the GET method for comments against response ID

Parameters:
  • comment_id (string) –

Status Codes:
PATCH /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:
DELETE /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:
GET /discussion/v1/course_topics/{course_id}#

Implements the GET method as described in the class docstring.

Parameters:
  • course_id (string) –

Status Codes:
GET /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

  • course_id

Status Codes:
Response JSON Object:
  • allow_anonymous (boolean) – A boolean indicating whether anonymous posts are allowed or not. (required)

  • allow_anonymous_to_peers (boolean) – A boolean indicating whether posts anonymous to peers are allowed or not. (required)

  • blackouts[].end (string) – The ISO 8601 timestamp for the end of the blackout period (required)

  • blackouts[].start (string) – The ISO 8601 timestamp for the start of the blackout period (required)

  • edit_reasons[].code (string) – A code for the an edit or close reason (required)

  • edit_reasons[].label (string) – A user-friendly name text for the close or edit reason (required)

  • enable_in_context (boolean) – A boolean indicating whether in-context discussion is enabled for the course (required)

  • following_thread_list_url (string) – thread_list_url with parameter following=True (required)

  • group_at_subsection (boolean) – A boolean indicating whether discussions should be grouped at subsection (required)

  • id (string) – The identifier of the course (required)

  • post_close_reasons[].code (string) – A code for the an edit or close reason (required)

  • post_close_reasons[].label (string) – A user-friendly name text for the close or edit reason (required)

  • provider (string) – The discussion provider used by this course (required)

  • thread_list_url (string) – The URL of the list of all threads in the course. (required)

  • topics_url (string) – The URL of the topic listing for the course. (required)

  • user_is_privileged (boolean) – A boolean indicating if the current user has a privileged role (required)

  • user_roles[] (string) –

GET /discussion/v1/courses/{course_id}/learner/#

Implements the GET method as described in the class docstring.

Parameters:
  • course_id (string) –

Status Codes:
GET /discussion/v1/courses/{course_id}/roles/{rolename}/#

Implement a handler for the GET method.

Parameters:
  • course_id (string) –

  • rolename (string) –

Status Codes:
POST /discussion/v1/courses/{course_id}/roles/{rolename}/#

Implement a handler for the POST method.

Parameters:
  • course_id (string) –

  • rolename (string) –

Status Codes:
GET /discussion/v1/courses/{course_id}/settings#

Implement a handler for the GET method.

Parameters:
  • course_id (string) –

Status Codes:
PATCH /discussion/v1/courses/{course_id}/settings#

Implement a handler for the PATCH method.

Parameters:
  • course_id (string) –

Status Codes:
POST /discussion/v1/courses/{course_id}/upload#

Handles a file upload.

Parameters:
  • course_id (string) –

Status Codes:
GET /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:
GET /discussion/v1/threads/#

Implements the GET method for the list endpoint as described in the class docstring.

Status Codes:
POST /discussion/v1/threads/#

Implements the POST method for the list endpoint as described in the class docstring.

Status Codes:
GET /discussion/v1/threads/{thread_id}/#

Implements the GET method for thread ID

Parameters:
  • thread_id (string) –

Status Codes:
PATCH /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:
DELETE /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:
GET /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

  • course_id

Query Parameters:
  • topic_id (string) – Comma-separated list of topic ids to filter

  • order_by (string) – Sort ordering for topics

Status Codes:
Response JSON Object:
  • enabled_in_context (boolean) – Whether this topic is enabled in its context (read only)

  • id (string) – Provider-specific unique id for the topic (read only)

  • name (string) – Topic name (read only)

  • thread_counts (string) – Mapping of thread counts by type of thread (read only)

  • usage_key (string) – Usage context for the topic (read only)

GET /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:
GET /edx_name_affirmation/v1/verified_name#

Get most recent verified name for the request user or for the specified username

For example: /edx_name_affirmation/v1/verified_name?username=jdoe Example response: {

“username”: “jdoe”, “verified_name”: “Jonathan Doe”, “profile_name”: “Jon Doe”, “verification_attempt_id”: 123, “proctored_exam_attempt_id”: None, “status”: “approved”, “use_verified_name_for_certs”: False,

}

Query Parameters:
  • username (string) – The username of which verified name records might be associated

Status Codes:
  • 200 OK – The verified_name record associated with the username provided

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

  • 404 Not Found – The verified_name record associated with the username provided does not exist.

POST /edx_name_affirmation/v1/verified_name#

Creates a new VerifiedName.

Expected POST data: {

“username”: “jdoe”, “verified_name”: “Jonathan Doe” “profile_name”: “Jon Doe” “verification_attempt_id”: (Optional) “proctored_exam_attempt_id”: (Optional) “status”: (Optional)

}

Request JSON Object:
  • created (string) – (read only)

  • id (integer) – (read only)

  • proctored_exam_attempt_id (integer) –

  • profile_name (string) – (required)

  • status (string) –

  • username (string) – (required)

  • verification_attempt_id (integer) –

  • verified_name (string) – (required)

Status Codes:
  • 200 OK – The verified_name record associated with the username provided is successfully created

  • 400 Bad Request – The posted data have conflicts with already stored verified name

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

PATCH /edx_name_affirmation/v1/verified_name#

Update verified name status

Example PATCH data: {

“username”: “jdoe”, “verification_attempt_id” OR “proctored_exam_attempt_id”: 123, “status”: “approved”,

}

Request JSON Object:
  • created (string) – (read only)

  • id (integer) – (read only)

  • proctored_exam_attempt_id (integer) –

  • profile_name (string) –

  • status (string) – (required)

  • username (string) – (required)

  • verification_attempt_id (integer) –

  • verified_name (string) –

Status Codes:
  • 200 OK – The verified_name record associated with the username provided is successfully edited

  • 400 Bad Request – The edit action failed validation rules

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

DELETE /edx_name_affirmation/v1/verified_name#

Delete verified name

/edx_name_affirmation/v1/verified_name/{verified_name_id}

Parameters:
  • verified_name_id (string) – The database id of the verified_name to be deleted

Status Codes:
  • 204 No Content – The verified_name record associated with the id is successfully deleted from data store

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

  • 404 Not Found – The verified_name record associated with the id provided does not exist.

POST /edx_name_affirmation/v1/verified_name/config#

Create VerifiedNameConfig

Create VerifiedNameConfig

Request JSON Object:
  • change_date (string) – (read only)

  • use_verified_name_for_certs (boolean) –

  • username (string) – (required)

Status Codes:
  • 201 Created – The verified_name configuration record is successfully created

  • 400 Bad Request – The POSTed data failed validation rules

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

GET /edx_name_affirmation/v1/verified_name/history#

Get a list of verified name objects for the given user, ordered by most recently created.

Get a list of verified name objects for the given user, ordered by most recently created.

Query Parameters:
  • username (string) – The username of which verified name records might be associated

Status Codes:
  • 200 OK – The verified_name record associated with the username provided is successfully edited

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

GET /edx_name_affirmation/v1/verified_name/{verified_name_id}#

Get most recent verified name for the request user or for the specified username

For example: /edx_name_affirmation/v1/verified_name?username=jdoe Example response: {

“username”: “jdoe”, “verified_name”: “Jonathan Doe”, “profile_name”: “Jon Doe”, “verification_attempt_id”: 123, “proctored_exam_attempt_id”: None, “status”: “approved”, “use_verified_name_for_certs”: False,

}

Parameters:
  • verified_name_id (string) –

Query Parameters:
  • username (string) – The username of which verified name records might be associated

Status Codes:
  • 200 OK – The verified_name record associated with the username provided

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

  • 404 Not Found – The verified_name record associated with the username provided does not exist.

POST /edx_name_affirmation/v1/verified_name/{verified_name_id}#

Creates a new VerifiedName.

Expected POST data: {

“username”: “jdoe”, “verified_name”: “Jonathan Doe” “profile_name”: “Jon Doe” “verification_attempt_id”: (Optional) “proctored_exam_attempt_id”: (Optional) “status”: (Optional)

}

Parameters:
  • verified_name_id (string) –

Request JSON Object:
  • created (string) – (read only)

  • id (integer) – (read only)

  • proctored_exam_attempt_id (integer) –

  • profile_name (string) – (required)

  • status (string) –

  • username (string) – (required)

  • verification_attempt_id (integer) –

  • verified_name (string) – (required)

Status Codes:
  • 200 OK – The verified_name record associated with the username provided is successfully created

  • 400 Bad Request – The posted data have conflicts with already stored verified name

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

PATCH /edx_name_affirmation/v1/verified_name/{verified_name_id}#

Update verified name status

Example PATCH data: {

“username”: “jdoe”, “verification_attempt_id” OR “proctored_exam_attempt_id”: 123, “status”: “approved”,

}

Parameters:
  • verified_name_id (string) –

Request JSON Object:
  • created (string) – (read only)

  • id (integer) – (read only)

  • proctored_exam_attempt_id (integer) –

  • profile_name (string) –

  • status (string) – (required)

  • username (string) – (required)

  • verification_attempt_id (integer) –

  • verified_name (string) –

Status Codes:
  • 200 OK – The verified_name record associated with the username provided is successfully edited

  • 400 Bad Request – The edit action failed validation rules

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

DELETE /edx_name_affirmation/v1/verified_name/{verified_name_id}#

Delete verified name

/edx_name_affirmation/v1/verified_name/{verified_name_id}

Parameters:
  • verified_name_id (string) – The database id of the verified_name to be deleted

  • verified_name_id

Status Codes:
  • 204 No Content – The verified_name record associated with the id is successfully deleted from data store

  • 403 Forbidden – User lacks required permission. Only an edX staff user can invoke this API

  • 404 Not Found – The verified_name record associated with the id provided does not exist.

POST /edx_proctoring/proctoring_review_callback/#

Post callback handler

Status Codes:
GET /edx_proctoring/v1/instructor/{course_id}#

Redirect to dashboard for a given course and optional exam_id

Parameters:
  • course_id (string) –

Status Codes:
GET /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:
GET /edx_proctoring/v1/proctored_exam/active_attempt#

HTTP GET handler. Returns active attempt

Status Codes:
GET /edx_proctoring/v1/proctored_exam/active_exams_for_user#

Returns the get_active_exams_for_user

Status Codes:
GET /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:
PUT /edx_proctoring/v1/proctored_exam/allowance#

HTTP GET handler. Adds or updates Allowance

Status Codes:
DELETE /edx_proctoring/v1/proctored_exam/allowance#

HTTP DELETE handler. Removes Allowance.

Status Codes:
GET /edx_proctoring/v1/proctored_exam/attempt#

HTTP GET Handler. Returns the status of the exam attempt.

Status Codes:
POST /edx_proctoring/v1/proctored_exam/attempt#

HTTP POST handler. To create an exam attempt.

Status Codes:
GET /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:
GET /edx_proctoring/v1/proctored_exam/attempt/grouped/course_id/{course_id}#

HTTP GET Handler.

Parameters:
  • course_id (string) –

Status Codes:
GET /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:
GET /edx_proctoring/v1/proctored_exam/attempt/{attempt_id}#

HTTP GET Handler. Returns the status of the exam attempt.

Parameters:
  • attempt_id (string) –

Status Codes:
PUT /edx_proctoring/v1/proctored_exam/attempt/{attempt_id}#

HTTP PUT handler to update exam attempt status based on an action.

Parameters:
  • attempt_id (string) –

Status Codes:
DELETE /edx_proctoring/v1/proctored_exam/attempt/{attempt_id}#

HTTP DELETE handler. Removes an exam attempt.

Parameters:
  • attempt_id (string) –

Status Codes:
PUT /edx_proctoring/v1/proctored_exam/attempt/{attempt_id}/review_status#

Update the is_status_acknowledged flag for the specific attempt

Parameters:
  • attempt_id (string) –

Status Codes:
POST /edx_proctoring/v1/proctored_exam/attempt/{external_id}/ready#

Post callback handler

Parameters:
  • external_id (string) –

Status Codes:
POST /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:
PUT /edx_proctoring/v1/proctored_exam/bulk_allowance#

HTTP PUT handler. Adds or updates Allowances for many exams and students

Status Codes:
GET /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:
POST /edx_proctoring/v1/proctored_exam/exam#

Http POST handler. Creates an exam.

Status Codes:
PUT /edx_proctoring/v1/proctored_exam/exam#

HTTP PUT handler. To update an exam. calls the update_exam

Status Codes:
GET /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:
POST /edx_proctoring/v1/proctored_exam/exam/course_id/{course_id}#

Http POST handler. Creates an exam.

Parameters:
  • course_id (string) –

Status Codes:
PUT /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:
GET /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:
POST /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:
PUT /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:
GET /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 (string) –

Status Codes:
POST /edx_proctoring/v1/proctored_exam/exam/exam_id/{exam_id}#

Http POST handler. Creates an exam.

Parameters:
  • exam_id (string) –

Status Codes:
PUT /edx_proctoring/v1/proctored_exam/exam/exam_id/{exam_id}#

HTTP PUT handler. To update an exam. calls the update_exam

Parameters:
  • exam_id (string) –

Status Codes:
DELETE /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:
PATCH /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:
GET /edx_proctoring/v1/proctored_exam/review_policy/exam_id/{exam_id}/#

HTTP GET handler. Returns review policy for proctored exam.

Parameters:
  • exam_id (string) –

Status Codes:
GET /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 (string) –

Status Codes:
GET /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:
PUT /edx_proctoring/v1/proctored_exam/{course_id}/allowance#

HTTP GET handler. Adds or updates Allowance

Parameters:
  • course_id (string) –

Status Codes:
DELETE /edx_proctoring/v1/proctored_exam/{course_id}/allowance#

HTTP DELETE handler. Removes Allowance.

Parameters:
  • course_id (string) –

Status Codes:
PUT /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:
GET /edx_proctoring/v1/proctored_exam/{course_id}/grouped/allowance#

HTTP GET Handler.

Parameters:
  • course_id (string) –

Status Codes:
POST /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:
POST /edx_proctoring/v1/retire_user/{user_id}/#

Obfuscates all PII for a given user_id

Parameters:
  • user_id (string) –

Status Codes:
GET /edx_proctoring/v1/user_onboarding/status#

HTTP GET handler. Returns the learner’s onboarding status.

Status Codes:
GET /edx_proctoring/v1/user_onboarding/status/course_id/{course_id}#

HTTP GET handler.

Parameters:
  • course_id (string) –

Status Codes:
POST /edxnotes/v1/retire_user/#

Implements the retirement endpoint.

Status Codes:
GET /embargo/v1/course_access/#

GET /api/embargo/v1/course_access/

Status Codes:
GET /enrollment/v1/course/{course_id}#

Read enrollment information for a particular course.

HTTP Endpoint for retrieving course level enrollment information.

Parameters:
  • course_id (string) –

Status Codes:
GET /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:
POST /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:
GET /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.

Parameters:
  • course_id (string) –

Status Codes:
GET /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.

Parameters:
  • course_id (string) –

  • username (string) –

Status Codes:
GET /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?username={username},{username},{username}

GET /api/enrollment/v1/enrollments?course_id={course_id}&username={username}

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.

  • username: List of comma-separated usernames. 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:
Response JSON Object:
  • next (string) –

  • previous (string) –

  • results[].course_id (string) – (required)

  • results[].created (string) – (read only)

  • results[].is_active (boolean) –

  • results[].mode (string) –

  • results[].user (string) – (read only)

GET /enrollment/v1/roles/#

Gets a list of all roles for the currently logged-in user, filtered by course_id if supplied

Status Codes:
POST /enrollment/v1/unenroll/#

Unenrolls the specified user from all courses.

Status Codes:
GET /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:
  • uuid (string) –

  • user (string) –

  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].course_uuid (string) – UUID for the Course, not the Course Run (required)

  • results[].created (string) – (read only)

  • results[].enrollment_course_run (string) – (read only)

  • results[].expired_at (string) – The date that an entitlement expired, if NULL the entitlement has not expired.

  • results[].mode (string) – The mode of the Course that will be applied on enroll. (required)

  • results[].modified (string) – (read only)

  • results[].order_number (string) –

  • results[].refund_locked (boolean) –

  • results[].support_details (string) – (read only)

  • results[].user (string) – (required)

  • results[].uuid (string) – (read only)

POST /entitlements/v1/entitlements/#

ViewSet for the Entitlements API.

Request JSON Object:
  • course_uuid (string) – UUID for the Course, not the Course Run (required)

  • created (string) – (read only)

  • enrollment_course_run (string) – (read only)

  • expired_at (string) – The date that an entitlement expired, if NULL the entitlement has not expired.

  • mode (string) – The mode of the Course that will be applied on enroll. (required)

  • modified (string) – (read only)

  • order_number (string) –

  • refund_locked (boolean) –

  • support_details (string) – (read only)

  • user (string) – (required)

  • uuid (string) – (read only)

Status Codes:
Response JSON Object:
  • course_uuid (string) – UUID for the Course, not the Course Run (required)

  • created (string) – (read only)

  • enrollment_course_run (string) – (read only)

  • expired_at (string) – The date that an entitlement expired, if NULL the entitlement has not expired.

  • mode (string) – The mode of the Course that will be applied on enroll. (required)

  • modified (string) – (read only)

  • order_number (string) –

  • refund_locked (boolean) –

  • support_details (string) – (read only)

  • user (string) – (required)

  • uuid (string) – (read only)

GET /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:
Response JSON Object:
  • course_uuid (string) – UUID for the Course, not the Course Run (required)

  • created (string) – (read only)

  • enrollment_course_run (string) – (read only)

  • expired_at (string) – The date that an entitlement expired, if NULL the entitlement has not expired.

  • mode (string) – The mode of the Course that will be applied on enroll. (required)

  • modified (string) – (read only)

  • order_number (string) –

  • refund_locked (boolean) –

  • support_details (string) – (read only)

  • user (string) – (required)

  • uuid (string) – (read only)

PUT /entitlements/v1/entitlements/{uuid}/#

ViewSet for the Entitlements API.

Parameters:
  • uuid (string) –

Request JSON Object:
  • course_uuid (string) – UUID for the Course, not the Course Run (required)

  • created (string) – (read only)

  • enrollment_course_run (string) – (read only)

  • expired_at (string) – The date that an entitlement expired, if NULL the entitlement has not expired.

  • mode (string) – The mode of the Course that will be applied on enroll. (required)

  • modified (string) – (read only)

  • order_number (string) –

  • refund_locked (boolean) –

  • support_details (string) – (read only)

  • user (string) – (required)

  • uuid (string) – (read only)

Status Codes:
Response JSON Object:
  • course_uuid (string) – UUID for the Course, not the Course Run (required)

  • created (string) – (read only)

  • enrollment_course_run (string) – (read only)

  • expired_at (string) – The date that an entitlement expired, if NULL the entitlement has not expired.

  • mode (string) – The mode of the Course that will be applied on enroll. (required)

  • modified (string) – (read only)

  • order_number (string) –

  • refund_locked (boolean) –

  • support_details (string) – (read only)

  • user (string) – (required)

  • uuid (string) – (read only)

PATCH /entitlements/v1/entitlements/{uuid}/#

ViewSet for the Entitlements API.

Parameters:
  • uuid (string) –

Request JSON Object:
  • course_uuid (string) – UUID for the Course, not the Course Run (required)

  • created (string) – (read only)

  • enrollment_course_run (string) – (read only)

  • expired_at (string) – The date that an entitlement expired, if NULL the entitlement has not expired.

  • mode (string) – The mode of the Course that will be applied on enroll. (required)

  • modified (string) – (read only)

  • order_number (string) –

  • refund_locked (boolean) –

  • support_details (string) – (read only)

  • user (string) – (required)

  • uuid (string) – (read only)

Status Codes:
Response JSON Object:
  • course_uuid (string) – UUID for the Course, not the Course Run (required)

  • created (string) – (read only)

  • enrollment_course_run (string) – (read only)

  • expired_at (string) – The date that an entitlement expired, if NULL the entitlement has not expired.

  • mode (string) – The mode of the Course that will be applied on enroll. (required)

  • modified (string) – (read only)

  • order_number (string) –

  • refund_locked (boolean) –

  • support_details (string) – (read only)

  • user (string) – (required)

  • uuid (string) – (read only)

DELETE /entitlements/v1/entitlements/{uuid}/#

ViewSet for the Entitlements API.

Parameters:
  • uuid (string) –

Status Codes:
POST /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:
DELETE /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:
GET /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:
GET /experiments/v0/custom/userMetadata/{username},{course_id}#

Return user-metadata for the given course and user

Parameters:
  • course_id (string) –

  • username (string) –

Status Codes:
GET /experiments/v0/data/#
Query Parameters:
  • experiment_id (number) –

  • key (string) –

  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].created (string) – (read only)

  • results[].experiment_id (integer) – (required)

  • results[].id (integer) – (read only)

  • results[].key (string) – (required)

  • results[].modified (string) – (read only)

  • results[].user (string) – (read only)

  • results[].value (string) – (required)

POST /experiments/v0/data/#
Request JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • user (string) –

  • value (string) – (required)

Status Codes:
Response JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • user (string) –

  • value (string) – (required)

PUT /experiments/v0/data/#
Request JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • user (string) – (read only)

  • value (string) – (required)

Status Codes:
Response JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • user (string) – (read only)

  • value (string) – (required)

GET /experiments/v0/data/{id}/#
Parameters:
  • id (integer) – A unique integer value identifying this Experiment Data.

Status Codes:
Response JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • user (string) – (read only)

  • value (string) – (required)

PUT /experiments/v0/data/{id}/#
Parameters:
  • id (integer) – A unique integer value identifying this Experiment Data.

Request JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • user (string) – (read only)

  • value (string) – (required)

Status Codes:
Response JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • user (string) – (read only)

  • value (string) – (required)

PATCH /experiments/v0/data/{id}/#
Parameters:
  • id (integer) – A unique integer value identifying this Experiment Data.

Request JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • user (string) – (read only)

  • value (string) – (required)

Status Codes:
Response JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • user (string) – (read only)

  • value (string) – (required)

DELETE /experiments/v0/data/{id}/#
Parameters:
  • id (integer) – A unique integer value identifying this Experiment Data.

Status Codes:
GET /experiments/v0/key-value/#
Query Parameters:
  • experiment_id (number) –

  • key (string) –

  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].created (string) – (read only)

  • results[].experiment_id (integer) – (required)

  • results[].id (integer) – (read only)

  • results[].key (string) – (required)

  • results[].modified (string) – (read only)

  • results[].value (string) – (required)

POST /experiments/v0/key-value/#
Request JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • value (string) – (required)

Status Codes:
Response JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • value (string) – (required)

GET /experiments/v0/key-value/{id}/#
Parameters:
  • id (integer) – A unique integer value identifying this Experiment Key-Value Pair.

Status Codes:
Response JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • value (string) – (required)

PUT /experiments/v0/key-value/{id}/#
Parameters:
  • id (integer) – A unique integer value identifying this Experiment Key-Value Pair.

Request JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • value (string) – (required)

Status Codes:
Response JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • value (string) – (required)

PATCH /experiments/v0/key-value/{id}/#
Parameters:
  • id (integer) – A unique integer value identifying this Experiment Key-Value Pair.

Request JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • value (string) – (required)

Status Codes:
Response JSON Object:
  • created (string) – (read only)

  • experiment_id (integer) – (required)

  • id (integer) – (read only)

  • key (string) – (required)

  • modified (string) – (read only)

  • value (string) – (required)

DELETE /experiments/v0/key-value/{id}/#
Parameters:
  • id (integer) – A unique integer value identifying this Experiment Key-Value Pair.

Status Codes:
GET /grades/v1/courses/#

Gets a course progress status.

Query Parameters:
  • cursor (string) – The pagination cursor value.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /grades/v1/courses/{course_id}/#

Gets a course progress status.

Parameters:
  • course_id (string) –

Status Codes:
GET /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:
POST /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:
GET /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) –

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /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) –

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /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.

Query Parameters:
  • cursor (string) – The pagination cursor value.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /grades/v1/submission_history/{course_id}/#

Get submission history details. This submission history is related to only ProblemBlock and it doesn’t support LibraryContentBlock 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:
GET /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.

Parameters:
  • subsection_id (string) –

Status Codes:
GET /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}

Response Values ```json {

“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.

param string course_id:

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.

>json string downloads[].link:

HTML anchor tag that contains the name and link. (required)

>json string downloads[].name:

Name of report. (required)

>json string downloads[].url:

URL from which report can be downloaded. (required)

POST /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.

param string course_id:

<json string problem_locations[]:

A usage key location for a section or a problem. 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.

<json string problem_types_filter[]:

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.

>json string status:

User-friendly text describing current status of report generation. (required)

>json string task_id:

A unique id for the report generation task. It can be used to query the latest report generation status. (required)

GET /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

Response Values ```json

{
“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.

  • course_id

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:
Response JSON Object:
  • tasks[].created (string) – The date and time when the task was created. (required)

  • tasks[].duration_sec (string) – Task duration information, if known (required)

  • tasks[].requester (string) – The username of the user who initiated this task. (required)

  • tasks[].status (string) – Current status of task. (required)

  • tasks[].task_id (string) – The celery ID for the task. (required)

  • tasks[].task_input (object) – The input parameters for the task. The format and content of this data will depend on the kind of task being performed. For instanceit may contain the problem locations for a problem resources task. (required)

  • tasks[].task_message (string) – User-friendly task status information, if available. (required)

  • tasks[].task_state (string) – The last knows state of the celery task. (required)

  • tasks[].task_type (string) – Identifies the kind of task being performed, e.g. rescoring. (required)

GET /instructor_task/v1/schedules/{course_id}/bulk_email/#

Read only view to list all scheduled bulk email messages for a course-run.

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:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].course_email (string) – (read only)

  • results[].id (integer) – (read only)

  • results[].task (integer) – (required)

  • results[].task_due (string) – (required)

PUT /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.

Parameters:
  • course_id (string) –

  • schedule_id (string) –

Request JSON Object:
  • course_email (string) – (read only)

  • id (integer) – (read only)

  • task (integer) – (required)

  • task_due (string) – (required)

Status Codes:
Response JSON Object:
  • course_email (string) – (read only)

  • id (integer) – (read only)

  • task (integer) – (required)

  • task_due (string) – (required)

PATCH /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.

Parameters:
  • course_id (string) –

  • schedule_id (string) –

Request JSON Object:
  • course_email (string) – (read only)

  • id (integer) – (read only)

  • task (integer) – (required)

  • task_due (string) – (required)

Status Codes:
Response JSON Object:
  • course_email (string) – (read only)

  • id (integer) – (read only)

  • task (integer) – (required)

  • task_due (string) – (required)

DELETE /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.

Parameters:
  • course_id (string) –

  • schedule_id (string) –

Status Codes:
GET /learner-pathway-progress/v1/progress/#

**Use Case**

  • Get a detailed list of all Pathways or single pathway which user have in progress.

Example Request

GET /api/learner-pathway-progress/v1/progress/ GET /api/learner-pathway-progress/v1/progress/{learner_pathway_uuid}/ GET /api/learner-pathway-progress/v1/progress/?enterprise_uuid={enterprise_uuid} GET /api/learner-pathway-progress/v1/progress/?uuid={learner_pathway_uuid}&enterprise_uuid={enterprise_uuid} GET /api/learner-pathway-progress/v1/progress/?uuid={learner_pathway_uuid1},{learner_pathway_uuid2}

GET Parameters

A GET request may include the following parameters if wants to fetch data of particular pathways.

  • learner_pathway_uuid: UUID of a LearnerPathway.

Example GET Response

[

{ “learner_pathway_progress”: {

“id”: 117, “uuid”: “29efa34c-60c6-4791-88c0-ab3b5fbd7503”, “title”: “test 1”, “status”: “active”, “banner_image”: null, “card_image”: null, “overview”: “”, “steps”: [

{

“uuid”: “7d95ae15-821e-447a-be2e-9fbfa4d777b4”, “min_requirement”: 2, “courses”: [], “programs”: [

{

“uuid”: “919e68dd-8147-482f-8666-72240380c251”, “title”: “edX Demonstration Program”, “short_description”: “”, “card_image_url”: “http://edx.com/logos”, “content_type”: “program”, “courses”: [

{

“key”: “edX+DemoX”, “course_runs”: [

{

“key”: “course-v1:edX+DemoX+Demo_Course”

}

]

}

], “status”: “NOT_STARTED”

}

], “status”: 0.0

}, {

“uuid”: “768e4081-901d-4913-8e7c-434ad25636ac”, “min_requirement”: 2, “courses”: [

{

“key”: “”, “course_runs”: [], “title”: “test course 2”, “short_description”: “”, “card_image_url”: null, “content_type”: “course”, “status”: “NOT_STARTED”

}

], “programs”: [

{

“uuid”: “919e68dd-8147-482f-8666-72240380c251”, “title”: “edX Demonstration Program”, “short_description”: “”, “card_image_url”: “http://edx.com/logo”, “content_type”: “program”, “courses”: [

{

“key”: “edX+DemoX”, “course_runs”: [

{

“key”: “course-v1:edX+DemoX+Demo_Course”

}

]

}

], “status”: “NOT_STARTED”

}

], “status”: 0.0

}, {

“uuid”: “ced544b3-c1e8-47b5-b7fa-76ef75c3fcc2”, “min_requirement”: 1, “courses”: [

{

“key”: “edX+DemoX”, “course_runs”: [

{

“key”: “course-v1:edX+DemoX+Demo_Course”

}

], “title”: “Demonstration Course”, “short_description”: “dummy desc”, “card_image_url”: null, “content_type”: “course”, “status”: “IN_PROGRESS”

}

], “programs”: [], “status”: 0.0

}

}

]

Query Parameters:
  • learner_pathway_uuid (string) –

  • uuid (string) –

  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].learner_pathway_progress (string) – (read only)

GET /learner-pathway-progress/v1/progress/{learner_pathway_uuid}/#

**Use Case**

  • Get a detailed list of all Pathways or single pathway which user have in progress.

Example Request

GET /api/learner-pathway-progress/v1/progress/ GET /api/learner-pathway-progress/v1/progress/{learner_pathway_uuid}/ GET /api/learner-pathway-progress/v1/progress/?enterprise_uuid={enterprise_uuid} GET /api/learner-pathway-progress/v1/progress/?uuid={learner_pathway_uuid}&enterprise_uuid={enterprise_uuid} GET /api/learner-pathway-progress/v1/progress/?uuid={learner_pathway_uuid1},{learner_pathway_uuid2}

GET Parameters

A GET request may include the following parameters if wants to fetch data of particular pathways.

  • learner_pathway_uuid: UUID of a LearnerPathway.

Example GET Response

[

{ “learner_pathway_progress”: {

“id”: 117, “uuid”: “29efa34c-60c6-4791-88c0-ab3b5fbd7503”, “title”: “test 1”, “status”: “active”, “banner_image”: null, “card_image”: null, “overview”: “”, “steps”: [

{

“uuid”: “7d95ae15-821e-447a-be2e-9fbfa4d777b4”, “min_requirement”: 2, “courses”: [], “programs”: [

{

“uuid”: “919e68dd-8147-482f-8666-72240380c251”, “title”: “edX Demonstration Program”, “short_description”: “”, “card_image_url”: “http://edx.com/logos”, “content_type”: “program”, “courses”: [

{

“key”: “edX+DemoX”, “course_runs”: [

{

“key”: “course-v1:edX+DemoX+Demo_Course”

}

]

}

], “status”: “NOT_STARTED”

}

], “status”: 0.0

}, {

“uuid”: “768e4081-901d-4913-8e7c-434ad25636ac”, “min_requirement”: 2, “courses”: [

{

“key”: “”, “course_runs”: [], “title”: “test course 2”, “short_description”: “”, “card_image_url”: null, “content_type”: “course”, “status”: “NOT_STARTED”

}

], “programs”: [

{

“uuid”: “919e68dd-8147-482f-8666-72240380c251”, “title”: “edX Demonstration Program”, “short_description”: “”, “card_image_url”: “http://edx.com/logo”, “content_type”: “program”, “courses”: [

{

“key”: “edX+DemoX”, “course_runs”: [

{

“key”: “course-v1:edX+DemoX+Demo_Course”

}

]

}

], “status”: “NOT_STARTED”

}

], “status”: 0.0

}, {

“uuid”: “ced544b3-c1e8-47b5-b7fa-76ef75c3fcc2”, “min_requirement”: 1, “courses”: [

{

“key”: “edX+DemoX”, “course_runs”: [

{

“key”: “course-v1:edX+DemoX+Demo_Course”

}

], “title”: “Demonstration Course”, “short_description”: “dummy desc”, “card_image_url”: null, “content_type”: “course”, “status”: “IN_PROGRESS”

}

], “programs”: [], “status”: 0.0

}

}

]

Parameters:
  • learner_pathway_uuid (string) –

Status Codes:
Response JSON Object:
  • learner_pathway_progress (string) – (read only)

GET /learner_home/init/#

Get masquerade user and proxy to init request

Status Codes:
GET /learner_home/mock/init/#

Returns static JSON authored in MOCK_DATA_FILE

Status Codes:
GET /learner_home/recommendation/courses/#

Retrieves course recommendations details.

Status Codes:
GET /learner_recommendations/amplitude/{course_id}/#
Returns
  • Amplitude course recommendations for course about page

Parameters:
  • course_id (string) –

Status Codes:
GET /learner_recommendations/courses/#

Retrieves course recommendations details.

Status Codes:
GET /learning_sequences/v1/course_outline/{course_key_str}#

The CourseOutline, customized for a given user.

Parameters:
  • course_key_str (string) –

Status Codes:
GET /lti_consumer/v1/lti/{lti_config_id}/lti-ags#

LineItem endpoint implementation from LTI Advantage.

See full documentation at:

Parameters:
  • lti_config_id (string) –

Status Codes:
Response JSON Object:
  • [].endDateTime (string) –

  • [].id (string) – (read only)

  • [].label (string) – (required)

  • [].resourceId (string) – (required)

  • [].resourceLinkId (string) –

  • [].scoreMaximum (integer) – (required)

  • [].startDateTime (string) –

  • [].tag (string) –

POST /lti_consumer/v1/lti/{lti_config_id}/lti-ags#

LineItem endpoint implementation from LTI Advantage.

See full documentation at:

Parameters:
  • lti_config_id (string) –

Request JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

Status Codes:
Response JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

GET /lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}#

LineItem endpoint implementation from LTI Advantage.

See full documentation at:

Parameters:
  • id (string) –

  • lti_config_id (string) –

Status Codes:
Response JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

PUT /lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}#

LineItem endpoint implementation from LTI Advantage.

See full documentation at:

Parameters:
  • id (string) –

  • lti_config_id (string) –

Request JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

Status Codes:
Response JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

PATCH /lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}#

LineItem endpoint implementation from LTI Advantage.

See full documentation at:

Parameters:
  • id (string) –

  • lti_config_id (string) –

Request JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

Status Codes:
Response JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

DELETE /lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}#

LineItem endpoint implementation from LTI Advantage.

See full documentation at:

Parameters:
  • id (string) –

  • lti_config_id (string) –

Status Codes:
GET /lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}/results/{user_id}#

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

Parameters:
  • id (string) –

  • lti_config_id (string) –

  • user_id (string) –

Status Codes:
Response JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

POST /lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}/scores#

Create a Score record for an LtiAgsLineItem

Parameters:
  • id (string) –

  • lti_config_id (string) –

Request JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

Status Codes:
Response JSON Object:
  • endDateTime (string) –

  • id (string) – (read only)

  • label (string) – (required)

  • resourceId (string) – (required)

  • resourceLinkId (string) –

  • scoreMaximum (integer) – (required)

  • startDateTime (string) –

  • tag (string) –

GET /lti_consumer/v1/lti/{lti_config_id}/memberships#

Overrides default list method of ModelViewSet. Calls LMS get_course_members API and returns result.

Parameters:
  • lti_config_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:
GET /lti_consumer/v1/lti/{lti_config_id}/memberships/{id}#

LTI NRPS Context Membership Service endpoint.

See full documentation at:

Parameters:
  • id (string) –

  • lti_config_id (string) –

Status Codes:
GET /mfe_config/v1#

Return the MFE configuration, optionally including MFE-specific overrides.

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”, … and so on

}#

query string mfe:

Name of an MFE (a.k.a. an APP_ID).

status 200:

GET /mfe_context#

Returns - dynamic registration fields - dynamic optional fields - the context for third party auth providers - user country code - the currently running pipeline.

Status Codes:
POST /mobile/{api_version}/course_info/record_user_activity#

Handle the POST request

Populate the user activity table.

Parameters:
  • api_version (string) –

Status Codes:
GET /mobile/{api_version}/course_info/{course_id}/handouts#

**Use Case**

Get the HTML for course handouts.

Example Request

GET /api/mobile/v0.5/course_info/{course_id}/handouts

Response Values

If the request is successful, the request returns an HTTP 200 “OK” response along with the following value.

  • handouts_html: The HTML for course handouts.

Parameters:
  • api_version (string) –

  • 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:
GET /mobile/{api_version}/course_info/{course_id}/updates#

**Use Case**

Get the content for course updates.

Example Request

GET /api/mobile/v0.5/course_info/{course_id}/updates

Response Values

If the request is successful, the request returns an HTTP 200 “OK” response along with an array of course updates. Each course update contains the following values.

  • content: The content, as an HTML string, of the course update.

  • date: The date of the course update.

  • id: The unique identifier of the update.

  • status: Whether the update is visible or not.

Parameters:
  • api_version (string) –

  • 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:
GET /mobile/{api_version}/my_user_info#

Redirect to the currently-logged-in user’s info page

Parameters:
  • api_version (string) –

Status Codes:
GET /mobile/{api_version}/users/{username}#

**Use Case**

Get information about the specified user and access other resources

the user has permissions for.

Users are redirected to this endpoint after they sign in.

You can use the course_enrollments value in the response to get a list of courses the user is enrolled in.

Example Request

GET /api/mobile/{version}/users/{username}

Response Values

If the request is successful, the request returns an HTTP 200 “OK” response.

The HTTP 200 response has the following values.

  • course_enrollments: The URI to list the courses the currently signed in user is enrolled in.

  • email: The email address of the currently signed in user.

  • id: The ID of the user.

  • name: The full name of the currently signed in user.

  • username: The username of the currently signed in user.

Parameters:
  • api_version (string) –

  • username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.

Status Codes:
Response JSON Object:
  • course_enrollments (string) – (read only)

  • email (string) –

  • id (integer) – (read only)

  • name (string) – (read only)

  • username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (required)

GET /mobile/{api_version}/users/{username}/course_enrollments/#

**Use Case**

Get information about the courses that the currently signed in user is

enrolled in.

v1 differs from v0.5 version by returning ALL enrollments for a user rather than only the enrollments the user has access to (that haven’t expired). An additional attribute “expiration” has been added to the response, which lists the date when access to the course will expire or null if it doesn’t expire.

Example Request

GET /api/mobile/v1/users/{username}/course_enrollments/

Response Values

If the request for information about the user is successful, the request returns an HTTP 200 “OK” response.

The HTTP 200 response has the following values.

  • expiration: The course expiration date for given user course pair or null if the course does not expire.

  • certificate: Information about the user’s earned certificate in the course.

  • course: A collection of the following data about the course.

  • courseware_access: A JSON representation with access information for the course, including any access errors.

    • course_about: The URL to the course about page.

    • course_sharing_utm_parameters: Encoded UTM parameters to be included in course sharing url

    • course_handouts: The URI to get data for course handouts.

    • course_image: The path to the course image.

    • course_updates: The URI to get data for course updates.

    • discussion_url: The URI to access data for course discussions if it is enabled, otherwise null.

    • end: The end date of the course.

    • id: The unique ID of the course.

    • name: The name of the course.

    • number: The course number.

    • org: The organization that created the course.

    • start: The date and time when the course starts.

    • start_display: If start_type is a string, then the advertised_start date for the course. If start_type is a timestamp, then a formatted date for the start of the course. If start_type is empty, then the value is None and it indicates that the course has not yet started.

    • start_type: One of either “string”, “timestamp”, or “empty”

    • subscription_id: A unique “clean” (alphanumeric with ‘_’) ID of the course.

    • video_outline: The URI to get the list of all videos that the user can access in the course.

  • created: The date the course was created.

  • is_active: Whether the course is currently active. Possible values are true or false.

  • mode: The type of certificate registration for this course (honor or certified).

  • url: URL to the downloadable version of the certificate, if exists.

Parameters:
  • api_version (string) –

  • username (string) –

Status Codes:
Response JSON Object:
  • [].audit_access_expires (string) – (read only)

  • [].certificate (string) – (read only)

  • [].course (string) – (read only)

  • [].course_modes (string) – (read only)

  • [].created (string) – (read only)

  • [].is_active (boolean) –

  • [].mode (string) –

GET /mobile/{api_version}/users/{username}/course_status_info/{course_id}#

Get the ID of the module that the specified user last visited in the specified course.

Parameters:
  • api_version (string) –

  • course_id (string) –

  • username (string) –

Status Codes:
PATCH /mobile/{api_version}/users/{username}/course_status_info/{course_id}#

Update the ID of the module that the specified user last visited in the specified course.

Parameters:
  • api_version (string) –

  • course_id (string) –

  • username (string) –

Status Codes:
GET /ora_staff_grader/initialize#

GET course metadata

Status Codes:
GET /ora_staff_grader/mock/initialize#

Returns initial app state

Status Codes:
GET /ora_staff_grader/mock/submission#

Get a submission

Status Codes:
GET /ora_staff_grader/mock/submission/grade#

Submit a grade

Status Codes:
POST /ora_staff_grader/mock/submission/grade#

Save a grade update to the data store

Status Codes:
POST /ora_staff_grader/mock/submission/lock#

Claim a submission lock, updating lock status

Status Codes:
DELETE /ora_staff_grader/mock/submission/lock#

Delete a submission lock, updating lock status

Status Codes:
GET /ora_staff_grader/mock/submission/status#

Get a submission status, leaving out the response

Status Codes:
GET /ora_staff_grader/submission#

GET submission contents and assessment info, if any

Status Codes:
GET /ora_staff_grader/submission/batch/unlock#

POST delete a group of submission locks, limited to just those in the list that the user owns.

Status Codes:
POST /ora_staff_grader/submission/batch/unlock#

Batch delete submission locks

Status Codes:
GET /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.

Status Codes:
GET /ora_staff_grader/submission/grade#

POST submit a grade for a submission

Status Codes:
POST /ora_staff_grader/submission/grade#

Update a grade

Status Codes:
GET /ora_staff_grader/submission/lock#

POST claim a submission lock for grading DELETE release a submission lock

Status Codes:
POST /ora_staff_grader/submission/lock#

Claim a submission lock

Status Codes:
DELETE /ora_staff_grader/submission/lock#

Clear a submission lock

Status Codes:
GET /ora_staff_grader/submission/status#

GET submission grade status, lock status, and grade data

Status Codes:
GET /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:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].active (boolean) –

  • results[].created (string) – (read only)

  • results[].description (string) –

  • results[].id (integer) – (read only)

  • results[].logo (string) – Please add only .PNG files for logo images. This logo will be used on certificates. (read only)

  • results[].logo_url (string) –

  • results[].modified (string) – (read only)

  • results[].name (string) – (required)

  • results[].short_name (string) – Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_). (required)

GET /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) – Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_).

Status Codes:
Response JSON Object:
  • active (boolean) –

  • created (string) – (read only)

  • description (string) –

  • id (integer) – (read only)

  • logo (string) – Please add only .PNG files for logo images. This logo will be used on certificates. (read only)

  • logo_url (string) –

  • modified (string) – (read only)

  • name (string) – (required)

  • short_name (string) – Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_). (required)

PUT /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:

  1. new organizations created through the API are always Active, and

  2. existing organizations updated through the API always end up Active, regardless of whether or not they were previously active.

Parameters:
  • short_name (string) – Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_).

Request JSON Object:
  • active (boolean) –

  • created (string) – (read only)

  • description (string) –

  • id (integer) – (read only)

  • logo (string) – Please add only .PNG files for logo images. This logo will be used on certificates. (read only)

  • logo_url (string) –

  • modified (string) – (read only)

  • name (string) – (required)

  • short_name (string) – Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_). (required)

Status Codes:
Response JSON Object:
  • active (boolean) –

  • created (string) – (read only)

  • description (string) –

  • id (integer) – (read only)

  • logo (string) – Please add only .PNG files for logo images. This logo will be used on certificates. (read only)

  • logo_url (string) –

  • modified (string) – (read only)

  • name (string) – (required)

  • short_name (string) – Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_). (required)

PATCH /organizations/v0/organizations/{short_name}/#

We disable PATCH because all updates and creates should use the PUT action above.

Parameters:
  • short_name (string) – Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_).

Request JSON Object:
  • active (boolean) –

  • created (string) – (read only)

  • description (string) –

  • id (integer) – (read only)

  • logo (string) – Please add only .PNG files for logo images. This logo will be used on certificates. (read only)

  • logo_url (string) –

  • modified (string) – (read only)

  • name (string) – (required)

  • short_name (string) – Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_). (required)

Status Codes:
Response JSON Object:
  • active (boolean) –

  • created (string) – (read only)

  • description (string) –

  • id (integer) – (read only)

  • logo (string) – Please add only .PNG files for logo images. This logo will be used on certificates. (read only)

  • logo_url (string) –

  • modified (string) – (read only)

  • name (string) – (required)

  • short_name (string) – Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_). (required)

POST /profile_images/v1/{username}/remove#

POST /api/profile_images/v1/{username}/remove

Parameters:
  • username (string) –

Status Codes:
POST /profile_images/v1/{username}/upload#

POST /api/profile_images/v1/{username}/upload

Parameters:
  • username (string) –

Status Codes:
POST /program_enrollments/v1/integration-reset#

Reset enrollment and user data for organization

Status Codes:
GET /program_enrollments/v1/programs/enrollments/#

How to respond to a GET request to this endpoint

Status Codes:
GET /program_enrollments/v1/programs/readonly_access/#

How to respond to a GET request to this endpoint

Status Codes:
GET /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) –

Query Parameters:
  • cursor (string) – The pagination cursor value.

  • page_size (integer) – Number of results to return per page.

Status Codes:
POST /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:
PUT /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:
PATCH /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:
GET /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) –

Query Parameters:
  • cursor (string) – The pagination cursor value.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /program_enrollments/v1/programs/{program_uuid}/enrollments/#

Defines the GET list endpoint for ProgramEnrollment objects.

Parameters:
  • program_uuid (string) –

Query Parameters:
  • cursor (string) – The pagination cursor value.

  • page_size (integer) – Number of results to return per page.

Status Codes:
POST /program_enrollments/v1/programs/{program_uuid}/enrollments/#

Create program enrollments for a list of learners

Parameters:
  • program_uuid (string) –

Status Codes:
PUT /program_enrollments/v1/programs/{program_uuid}/enrollments/#

Create/update program enrollments for a list of learners

Parameters:
  • program_uuid (string) –

Status Codes:
PATCH /program_enrollments/v1/programs/{program_uuid}/enrollments/#

Update program enrollments for a list of learners

Parameters:
  • program_uuid (string) –

Status Codes:
GET /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.

Parameters:
  • program_uuid (string) –

Status Codes:
Response JSON Object:
  • course_runs[].certificate_download_url (string) – URL to download a certificate, if available; if absent, certificate is not downloadable.

  • course_runs[].course_run_id (string) – ID for the course run. (required)

  • course_runs[].course_run_status (string) – The user’s status of the course run. (required)

  • course_runs[].course_run_url (string) – The absolute url for the course run. (required)

  • course_runs[].display_name (string) – Display name of the course run. (required)

  • course_runs[].due_dates[].date (string) – (required)

  • course_runs[].due_dates[].name (string) – (required)

  • course_runs[].due_dates[].url (string) – (required)

  • course_runs[].emails_enabled (boolean) – Boolean representing whether emails are enabled for the course;if absent, the bulk email feature is either not enable at the platformlevel or is not enabled for the course; if True or False, bulk emailfeature is enabled, and value represents whether or not user wantsto receive emails.

  • course_runs[].end_date (string) – End date for the course run; null if no end date. (required)

  • course_runs[].micromasters_title (string) – Title of the MicroMasters program that the course run is a part of; if absent, the course run is not a part of a MicroMasters program.

  • course_runs[].resume_course_run_url (string) – The absolute url that takes the user back to their position in the course run; if absent, user has not made progress in the course.

  • course_runs[].start_date (string) – Start date for the course run; null if no start date. (required)

GET /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.

Example Response: ```json {

“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 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.

param string program_uuid:

UUID of a program. Enrollments will be returned for course runs in this program.

param string program_uuid:

param string username:

query string cursor:

The pagination cursor value.

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.

>json string next:

Link to the next page of results, or null if this is the last.

>json string previous:

Link to the previous page or results, or null if this is the first.

>json string results[].certificate_download_url:

URL to download a certificate, if available; if absent, certificate is not downloadable.

>json string results[].course_run_id:

ID for the course run. (required)

>json string results[].course_run_status:

The user’s status of the course run. (required)

>json string results[].course_run_url:

The absolute url for the course run. (required)

>json string results[].display_name:

Display name of the course run. (required)

>json string results[].due_dates[].date:

(required)

>json string results[].due_dates[].name:

(required)

>json string results[].due_dates[].url:

(required)

>json boolean results[].emails_enabled:

Boolean representing whether emails are enabled for the course;if absent, the bulk email feature is either not enable at the platformlevel or is not enabled for the course; if True or False, bulk emailfeature is enabled, and value represents whether or not user wantsto receive emails.

>json string results[].end_date:

End date for the course run; null if no end date. (required)

>json string results[].micromasters_title:

Title of the MicroMasters program that the course run is a part of; if absent, the course run is not a part of a MicroMasters program.

>json string results[].resume_course_run_url:

The absolute url that takes the user back to their position in the course run; if absent, user has not made progress in the course.

>json string results[].start_date:

Start date for the course run; null if no start date. (required)

POST /send_account_activation_email#

Returns status code.

Status Codes:
GET /team/v0/bulk_team_membership/{course_id}#

Download CSV with team membership data for given course run.

Parameters:
  • course_id (string) –

Status Codes:
POST /team/v0/bulk_team_membership/{course_id}#

Process uploaded CSV to modify team memberships for given course run.

Parameters:
  • course_id (string) –

Status Codes:
GET /team/v0/team_membership/#

GET /api/team/v0/team_membership

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
POST /team/v0/team_membership/#

POST /api/team/v0/team_membership

Status Codes:
GET /team/v0/team_membership/{team_id},{username}#

GET /api/team/v0/team_membership/{team_id},{username}

Parameters:
  • team_id (string) –

  • username (string) –

Status Codes:
DELETE /team/v0/team_membership/{team_id},{username}#

DELETE /api/team/v0/team_membership/{team_id},{username}

Parameters:
  • team_id (string) –

  • username (string) –

Status Codes:
GET /team/v0/teams/#

GET /api/team/v0/teams/

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
POST /team/v0/teams/#

POST /api/team/v0/teams/

Status Codes:
GET /team/v0/teams/{team_id}#

Retrieves the specified resource using the RetrieveModelMixin.

Parameters:
  • team_id (string) –

Status Codes:
PATCH /team/v0/teams/{team_id}#

Checks for validation errors, then updates the model using the UpdateModelMixin.

Parameters:
  • team_id (string) –

Status Codes:
DELETE /team/v0/teams/{team_id}#

DELETE /api/team/v0/teams/{team_id}

Parameters:
  • team_id (string) –

Status Codes:
GET /team/v0/teams/{team_id}/assignments#

GET v0/teams/{team_id_pattern}/assignments

Parameters:
  • team_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:
GET /team/v0/topics/#

GET /api/team/v0/topics/?course_id={course_id}

Query Parameters:
  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
GET /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:
GET /third_party_auth/v0/providers/user_status#

GET /api/third_party_auth/v0/providers/user_status/

GET Response Values ``` {

“accepts_logins”: true, “name”: “Google”, “disconnect_url”: “/auth/disconnect/google-oauth2/?”, “connect_url”: “/auth/login/google-oauth2/?auth_entry=account_settings&next=%2Faccount%2Fsettings”, “connected”: false, “id”: “oa2-google-oauth2”

}#

status 200:

GET /third_party_auth/v0/providers/{provider_id}{var}/users#

Map between the third party auth account IDs (remote_id) and EdX username.

This API is intended to be a server-to-server endpoint. An on-campus middleware or system should consume this.

Use Case

Get a paginated list of mappings between edX users and remote user IDs for all users currently linked to the given backend.

The list can be filtered by edx username or third party ids. The filter is limited by the max length of URL. It is suggested to query no more than 50 usernames or remote_ids in each request to stay within above limitation

The page size can be changed by specifying page_size parameter in the request.

Example Requests

GET /api/third_party_auth/v0/providers/{provider_id}/users

GET /api/third_party_auth/v0/providers/{provider_id}/users?username={username1},{username2}

GET /api/third_party_auth/v0/providers/{provider_id}/users?username={username1}&usernames={username2}

GET /api/third_party_auth/v0/providers/{provider_id}/users?remote_id={remote_id1},{remote_id2}

GET /api/third_party_auth/v0/providers/{provider_id}/users?remote_id={remote_id1}&remote_id={remote_id2}

GET /api/third_party_auth/v0/providers/{provider_id}/users?username={username1}&remote_id={remote_id1}

URL Parameters

  • provider_id: The unique identifier of third_party_auth provider (e.g. “saml-ubc”, “oa2-google”, etc. This is not the same thing as the backend_name.). (Optional/future: We may also want to allow this to be an ‘external domain’ like ‘ssl:MIT’ so that this API can also search the legacy ExternalAuthMap table used by Standford/MIT)

Query Parameters

  • remote_ids: Optional. List of comma separated remote (third party) user IDs to filter the result set. e.g. ?remote_ids=8721384623

  • usernames: Optional. List of comma separated edX usernames to filter the result set. e.g. ?usernames=bob123,jane456

  • page, page_size: Optional. Used for paging the result set, especially when getting an unfiltered list.

Response Values

If the request for information about the user is successful, an HTTP 200 “OK” response is returned.

The HTTP 200 response has the following values:

  • count: The number of mappings for the backend.

  • next: The URI to the next page of the mappings.

  • previous: The URI to the previous page of the mappings.

  • num_pages: The number of pages listing the mappings.

  • results: A list of mappings returned. Each collection in the list contains these fields.

    • username: The edx username

    • remote_id: The Id from third party auth provider

Parameters:
  • provider_id (string) –

  • var (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:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].remote_id (string) – (read only)

  • results[].username (string) – (read only)

GET /third_party_auth/v0/users/#

Read provider information for a user.

Allows reading the list of providers for a specified user.

Status Codes:
GET /third_party_auth/v0/users/{username}#

Read provider information for a user.

Allows reading the list of providers for a specified user.

Parameters:
  • username (string) –

Status Codes:
GET /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.

Status Codes:
GET /toggles/v0/state/#

Expose toggle state report dict as a view.

Status Codes:
GET /user/v1/account/password_reset/#

HTTP end-point for GETting a description of the password reset form.

Status Codes:
POST /user/v1/account/password_reset/token/validate/#

HTTP end-point to validate password reset token.

Status Codes:
GET /user/v1/account/registration/#

HTTP end-points for creating a new user.

Status Codes:
POST /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.

Status Codes:
GET /user/v1/accounts#

GET /api/user/v1/accounts?username={username1,username2} GET /api/user/v1/accounts?email={user_email} (Staff Only) GET /api/user/v1/accounts?lms_user_id={lms_user_id} (Staff Only)

Status Codes:
POST /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:
POST /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:
POST /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:
POST /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:
POST /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 201:

POST /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 201:

POST /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 201:

POST /user/v1/accounts/retirement_cleanup/#

POST /api/user/v1/accounts/retirement_cleanup/

``` {

‘usernames’: [‘user1’, ‘user2’, …]

}#

Deletes a batch of retirement requests by username.

status 201:

POST /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:
PUT /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 /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:
GET /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:
GET /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:
POST /user/v1/accounts/search_emails#

POST /api/user/v1/accounts/search_emails Content Type: “application/json” {

“emails”: [”edx@example.com”, “staff@example.com”]

}

Status Codes:
PATCH /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 /user/v1/accounts/verifications/{attempt_id}/#

Get IDV attempt details by attempt_id. Only accessible by global staff.

Parameters:
  • attempt_id (string) –

Status Codes:
GET /user/v1/accounts/{username}#

GET /api/user/v1/accounts/{username}/

Parameters:
  • username (string) –

Status Codes:
PATCH /user/v1/accounts/{username}#

PATCH /api/user/v1/accounts/{username}/

Note that this implementation is the “merge patch” implementation proposed in

Parameters:
  • username (string) –

Status Codes:
POST /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:
POST /user/v1/accounts/{username}/image#

POST /api/user/v1/accounts/{username}/image

Parameters:
  • username (string) –

Status Codes:
DELETE /user/v1/accounts/{username}/image#

DELETE /api/user/v1/accounts/{username}/image

Parameters:
  • username (string) –

Status Codes:
GET /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:
GET /user/v1/accounts/{username}/verification_status/#

IDVerification Status endpoint

Parameters:
  • username (string) –

Status Codes:
GET /user/v1/accounts/{username}/verifications/#

IDVerificationStatusDeetails endpoint to retrieve more details about ID Verification status

Parameters:
  • username (string) –

Status Codes:
Response JSON Object:
  • [].expiration_datetime (string) – (required)

  • [].message (string) – (read only)

  • [].receipt_id (string) – (read only)

  • [].status (string) – (required)

  • [].type (string) – (read only)

  • [].updated_at (string) – (required)

GET /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:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].email (string) – (read only)

  • results[].id (integer) – (read only)

  • results[].name (string) – (read only)

  • results[].preferences (string) – (read only)

  • results[].url (string) – (read only)

  • results[].username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (read only)

GET /user/v1/me#

GET /api/user/v1/me

Status Codes:
POST /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.

Status Codes:
GET /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

Status Codes:
Response JSON Object:
  • [].description (string) – (required)

  • [].time_zone (string) – (required)

GET /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:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].email (string) – (read only)

  • results[].id (integer) – (read only)

  • results[].name (string) – (read only)

  • results[].preferences (string) – (read only)

  • results[].url (string) – (read only)

  • results[].username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (read only)

GET /user/v1/preferences/{username}#

GET /api/user/v1/preferences/{username}/

Parameters:
  • username (string) –

Status Codes:
PATCH /user/v1/preferences/{username}#

PATCH /api/user/v1/preferences/{username}/

Parameters:
  • username (string) –

Status Codes:
GET /user/v1/preferences/{username}/{preference_key}#

GET /api/user/v1/preferences/{username}/{preference_key}

Parameters:
  • preference_key (string) –

  • username (string) –

Status Codes:
PUT /user/v1/preferences/{username}/{preference_key}#

PUT /api/user/v1/preferences/{username}/{preference_key}

Parameters:
  • preference_key (string) –

  • username (string) –

Status Codes:
DELETE /user/v1/preferences/{username}/{preference_key}#

DELETE /api/user/v1/preferences/{username}/{preference_key}

Parameters:
  • preference_key (string) –

  • username (string) –

Status Codes:
GET /user/v1/skill_level/{job_id}/#

GET /api/user/v1/skill_level/{job_id}/

Parameters:
  • job_id (string) –

Status Codes:
GET /user/v1/user_prefs/#

DRF class for interacting with the UserPreference ORM

Query Parameters:
  • key (string) –

  • user (string) –

  • page (integer) – A page number within the paginated result set.

  • page_size (integer) – Number of results to return per page.

Status Codes:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].key (string) – (required)

  • results[].url (string) – (read only)

  • results[].user.email (string) – (read only)

  • results[].user.id (integer) – (read only)

  • results[].user.name (string) – (read only)

  • results[].user.preferences (string) – (read only)

  • results[].user.url (string) – (read only)

  • results[].user.username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (read only)

  • results[].value (string) – (required)

GET /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:
Response JSON Object:
  • key (string) – (required)

  • url (string) – (read only)

  • user.email (string) – (read only)

  • user.id (integer) – (read only)

  • user.name (string) – (read only)

  • user.preferences (string) – (read only)

  • user.url (string) – (read only)

  • user.username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (read only)

  • value (string) – (required)

GET /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:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].email (string) – (read only)

  • results[].id (integer) – (read only)

  • results[].name (string) – (read only)

  • results[].preferences (string) – (read only)

  • results[].url (string) – (read only)

  • results[].username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (read only)

GET /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:
Response JSON Object:
  • email (string) – (read only)

  • id (integer) – (read only)

  • name (string) – (read only)

  • preferences (string) – (read only)

  • url (string) – (read only)

  • username (string) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. (read only)

POST /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 201:

GET /user/v2/account/registration/#

HTTP end-points for creating a new user.

Status Codes:
POST /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.

Status Codes:
GET /user/{api_version}/account/login_session/#

HTTP end-points for logging in users.

Parameters:
  • api_version (string) –

Status Codes:
POST /user/{api_version}/account/login_session/#

Log in a user.

See login_user for details.

Example Usage:

POST /api/user/v1/login_session with POST params email, password.

200 {‘success’: true}

Parameters:
  • api_version (string) –

Status Codes:
GET /user_tours/discussion_tours/{tour_id}/#

Return a list of all tours in the database.

Parameters:
  • tour_id (string) –

Status Codes:
PUT /user_tours/discussion_tours/{tour_id}/#

Update an existing tour with the data in the request body.

Parameters:
  • tour_id (string) –

Status Codes:
GET /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 waffle flag is not enabled 404 if the UserTour does not exist (shouldn’t happen, but safety first)

Parameters:
  • username (string) –

Status Codes:
Response JSON Object:
  • course_home_tour_status (string) –

  • show_courseware_tour (boolean) –

PUT /user_tours/v1/{username}#

Unsupported method.

Parameters:
  • username (string) –

Request JSON Object:
  • course_home_tour_status (string) –

  • show_courseware_tour (boolean) –

Status Codes:
Response JSON Object:
  • course_home_tour_status (string) –

  • show_courseware_tour (boolean) –

PATCH /user_tours/v1/{username}#

Patch the User Tour for the request.user.

Supports updating the course_home_tour_status and show_courseware_tour fields.

Parameters:
  • username (string) –

Request JSON Object:
  • course_home_tour_status (string) –

  • show_courseware_tour (boolean) –

Status Codes:
Response JSON Object:
  • course_home_tour_status (string) –

  • show_courseware_tour (boolean) –

GET /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:
Response JSON Object:
  • count (integer) – (required)

  • next (string) –

  • previous (string) –

  • results[].client_video_id (string) –

  • results[].courses[] (string) –

  • results[].created (string) –

  • results[].duration (number) – (required)

  • results[].edx_video_id (string) – (required)

  • results[].encoded_videos[].bitrate (integer) – (required)

  • results[].encoded_videos[].created (string) –

  • results[].encoded_videos[].file_size (integer) – (required)

  • results[].encoded_videos[].modified (string) –

  • results[].encoded_videos[].profile (string) – (required)

  • results[].encoded_videos[].url (string) – (required)

  • results[].error_description (string) –

  • results[].status (string) – (required)

  • results[].url (string) – (read only)

POST /val/v0/videos/#

GETs or POST video objects

Request JSON Object:
  • client_video_id (string) –

  • courses[] (string) –

  • created (string) –

  • duration (number) – (required)

  • edx_video_id (string) – (required)

  • encoded_videos[].bitrate (integer) – (required)

  • encoded_videos[].created (string) –

  • encoded_videos[].file_size (integer) – (required)

  • encoded_videos[].modified (string) –

  • encoded_videos[].profile (string) – (required)

  • encoded_videos[].url (string) – (required)

  • error_description (string) –

  • status (string) – (required)

  • url (string) – (read only)

Status Codes:
Response JSON Object:
  • client_video_id (string) –

  • courses[] (string) –

  • created (string) –

  • duration (number) – (required)

  • edx_video_id (string) – (required)

  • encoded_videos[].bitrate (integer) – (required)

  • encoded_videos[].created (string) –

  • encoded_videos[].file_size (integer) – (required)

  • encoded_videos[].modified (string) –

  • encoded_videos[].profile (string) – (required)

  • encoded_videos[].url (string) – (required)

  • error_description (string) –

  • status (string) – (required)

  • url (string) – (read only)

POST /val/v0/videos/missing-hls/#

Retrieve video IDs that are missing HLS profiles. This endpoint supports 2 types of input data:

  1. 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

    }

  2. 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:
PUT /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:
PATCH /val/v0/videos/status/#

Update the status of a video.

Status Codes:
POST /val/v0/videos/video-images/update/#

Update a course video image instance with auto generated image names.

Status Codes:
POST /val/v0/videos/video-transcripts/create/#

Creates a video transcript instance with the given information.

Status Codes:
GET /val/v0/videos/{edx_video_id}#

Gets a video instance given its edx_video_id

Parameters:
  • edx_video_id (string) –

Status Codes:
Response JSON Object:
  • client_video_id (string) –

  • courses[] (string) –

  • created (string) –

  • duration (number) – (required)

  • edx_video_id (string) – (required)

  • encoded_videos[].bitrate (integer) – (required)

  • encoded_videos[].created (string) –

  • encoded_videos[].file_size (integer) – (required)

  • encoded_videos[].modified (string) –

  • encoded_videos[].profile (string) – (required)

  • encoded_videos[].url (string) – (required)

  • error_description (string) –

  • status (string) – (required)

  • url (string) – (read only)

PUT /val/v0/videos/{edx_video_id}#

Gets a video instance given its edx_video_id

Parameters:
  • edx_video_id (string) –

Request JSON Object:
  • client_video_id (string) –

  • courses[] (string) –

  • created (string) –

  • duration (number) – (required)

  • edx_video_id (string) – (required)

  • encoded_videos[].bitrate (integer) – (required)

  • encoded_videos[].created (string) –

  • encoded_videos[].file_size (integer) – (required)

  • encoded_videos[].modified (string) –

  • encoded_videos[].profile (string) – (required)

  • encoded_videos[].url (string) – (required)

  • error_description (string) –

  • status (string) – (required)

  • url (string) – (read only)

Status Codes:
Response JSON Object:
  • client_video_id (string) –

  • courses[] (string) –

  • created (string) –

  • duration (number) – (required)

  • edx_video_id (string) – (required)

  • encoded_videos[].bitrate (integer) – (required)

  • encoded_videos[].created (string) –

  • encoded_videos[].file_size (integer) – (required)

  • encoded_videos[].modified (string) –

  • encoded_videos[].profile (string) – (required)

  • encoded_videos[].url (string) – (required)

  • error_description (string) –

  • status (string) – (required)

  • url (string) – (read only)

PATCH /val/v0/videos/{edx_video_id}#

Gets a video instance given its edx_video_id

Parameters:
  • edx_video_id (string) –

Request JSON Object:
  • client_video_id (string) –

  • courses[] (string) –

  • created (string) –

  • duration (number) – (required)

  • edx_video_id (string) – (required)

  • encoded_videos[].bitrate (integer) – (required)

  • encoded_videos[].created (string) –

  • encoded_videos[].file_size (integer) – (required)

  • encoded_videos[].modified (string) –

  • encoded_videos[].profile (string) – (required)

  • encoded_videos[].url (string) – (required)

  • error_description (string) –

  • status (string) – (required)

  • url (string) – (read only)

Status Codes:
Response JSON Object:
  • client_video_id (string) –

  • courses[] (string) –

  • created (string) –

  • duration (number) – (required)

  • edx_video_id (string) – (required)

  • encoded_videos[].bitrate (integer) – (required)

  • encoded_videos[].created (string) –

  • encoded_videos[].file_size (integer) – (required)

  • encoded_videos[].modified (string) –

  • encoded_videos[].profile (string) – (required)

  • encoded_videos[].url (string) – (required)

  • error_description (string) –

  • status (string) – (required)

  • url (string) – (read only)

DELETE /val/v0/videos/{edx_video_id}#

Gets a video instance given its edx_video_id

Parameters:
  • edx_video_id (string) –

Status Codes:
GET /xblock/v2/xblocks/{usage_key_str}/#

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_str (string) –

Status Codes:
GET /xblock/v2/xblocks/{usage_key_str}/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_str (string) –

Status Codes:
GET /xblock/v2/xblocks/{usage_key_str}/view/{view_name}/#

Get the HTML, JS, and CSS needed to render the given XBlock.

Parameters:
  • usage_key_str (string) –

  • view_name (string) –

Status Codes: