swagger: '2.0' info: title: Open edX API description: APIs for access to Open edX information contact: email: api-access@example.com version: v1 basePath: /api consumes: - application/json produces: - application/json securityDefinitions: Basic: type: basic description: Obtain with a `POST` request to `/user/v1/account/login_session/`. If needed, copy the cookies from the response to your new call. jwt: type: apiKey name: Authorization in: header description: |2 Obtain by making a `POST` request to `/oauth2/v1/access_token`. You will need to be logged in and have a client ID and secret already created. Your request should have the headers ``` 'Content-Type': 'application/x-www-form-urlencoded' ``` Your request should have the data payload ``` 'grant_type': 'client_credentials' 'client_id': [your client ID] 'client_secret': [your client secret] 'token_type': 'jwt' ``` Your JWT will be returned in the response as `access_token`. Prefix with `JWT ` in your header. csrf: type: apiKey name: X-CSRFToken in: header description: Obtain by making a `GET` request to `/csrf/api/v1/token`. The token will be in the response cookie `csrftoken`. security: - Basic: [] - csrf: [] - jwt: [] paths: /agreements/v1/integrity_signature/{course_id}: get: operationId: agreements_v1_integrity_signature_read summary: In order to check whether the user has signed the integrity agreement for a given course. description: |- 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: [] responses: '200': description: '' tags: - agreements post: operationId: agreements_v1_integrity_signature_create description: |- 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: [] responses: '201': description: '' tags: - agreements parameters: - name: course_id in: path required: true type: string /agreements/v1/lti_pii_signature/{course_id}: post: operationId: agreements_v1_lti_pii_signature_create description: |- Create an LTI PII signature for the requesting user and course. If a signature already exists, returns the existing signature instead of creating a new one. /api/agreements/v1/lti_pii_signature/{course_id} Example response: { username: "janedoe", course_id: "org.2/course_2/Run_2", created_at: "2021-04-23T18:25:43.511Z" } parameters: [] responses: '201': description: '' tags: - agreements parameters: - name: course_id in: path required: true type: string /authz/v1/permissions/validate/me: post: operationId: authz_v1_permissions_validate_me_create summary: Validate one or more permissions for the authenticated user. description: Validate one or more permissions for the authenticated user. parameters: - name: data in: body required: true schema: description: The permissions to validate type: array items: $ref: '#/definitions/PermissionValidation' responses: '200': description: '' schema: $ref: '#/definitions/PermissionValidationResponse' '400': description: The request data is invalid '401': description: The user is not authenticated tags: - authz parameters: [] /authz/v1/roles/: get: operationId: authz_v1_roles_list summary: Retrieve all roles and their permissions for a specific scope. description: Retrieve all roles and their permissions for a specific scope. parameters: - name: scope in: query description: The scope to query roles for type: string - name: page in: query description: Page number for pagination type: integer - name: page_size in: query description: Number of items per page type: integer responses: '200': description: '' schema: type: array items: $ref: '#/definitions/ListRolesWithScopeResponse' '400': description: The request parameters are invalid '401': description: The user is not authenticated or does not have the required permissions tags: - authz parameters: [] /authz/v1/roles/users/: get: operationId: authz_v1_roles_users_list summary: Retrieve all users with role assignments within a specific scope. description: Retrieve all users with role assignments within a specific scope. parameters: - name: scope in: query description: The authorization scope for the role type: string - name: search in: query description: The search query to filter users by type: string - name: roles in: query description: The names of the roles to query type: string - name: page in: query description: Page number for pagination type: integer - name: page_size in: query description: Number of items per page type: integer - name: sort_by in: query description: The field to sort by type: string - name: order in: query description: The order to sort by type: string responses: '200': description: The users were retrieved successfully '400': description: The request parameters are invalid '401': description: The user is not authenticated or does not have the required permissions tags: - authz put: operationId: authz_v1_roles_users_update summary: Assign multiple users to a specific role within a scope. description: Assign multiple users to a specific role within a scope. parameters: - name: data in: body required: true schema: $ref: '#/definitions/AddUsersToRoleWithScope' responses: '207': description: The users were added to the role '400': description: The request data is invalid '401': description: The user is not authenticated or does not have the required permissions tags: - authz delete: operationId: authz_v1_roles_users_delete summary: Remove multiple users from a specific role within a scope. description: Remove multiple users from a specific role within a scope. parameters: - name: users in: query description: List of user identifiers (username or email) separated by a comma type: string - name: role in: query description: The role to remove the users from type: string - name: scope in: query description: The scope to remove the users from type: string responses: '207': description: The users were removed from the role '400': description: The request parameters are invalid '401': description: The user is not authenticated or does not have the required permissions tags: - authz parameters: [] /bookmarks/v1/bookmarks/: get: operationId: bookmarks_v1_bookmarks_list summary: Get a paginated list of bookmarks for a user. description: |- The list can be filtered by passing parameter "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=". 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 parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer - name: course_id in: query description: The id of the course to limit the list type: string - name: fields in: query description: 'The fields to return: display_name, path.' type: string responses: '200': description: '' tags: - bookmarks post: operationId: bookmarks_v1_bookmarks_create summary: Create a new bookmark for a user. description: |- 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": } parameters: [] responses: '201': description: '' tags: - bookmarks parameters: [] /bookmarks/v1/bookmarks/{username},{usage_id}/: get: operationId: bookmarks_v1_bookmarks_read summary: Get a specific bookmark for a user. description: |- **Example Requests** GET /api/bookmarks/v1/bookmarks/{username},{usage_id}?fields=display_name,path parameters: [] responses: '200': description: '' tags: - bookmarks delete: operationId: bookmarks_v1_bookmarks_delete description: DELETE /api/bookmarks/v1/bookmarks/{username},{usage_id} parameters: [] responses: '204': description: '' tags: - bookmarks parameters: - name: username in: path required: true type: string - name: usage_id in: path required: true type: string /bulk_enroll/v1/bulk_enroll: post: operationId: bulk_enroll_v1_bulk_enroll_create summary: '**Use Case**' description: |- 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. parameters: [] responses: '201': description: '' tags: - bulk_enroll parameters: [] /ccx/v0/ccx/: get: operationId: ccx_v0_ccx_list summary: Gets a list of CCX Courses for a given Master Course. description: Additional parameters are allowed for pagination purposes. parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/CCXCourse' tags: - ccx post: operationId: ccx_v0_ccx_create description: Creates a new CCX course for a given Master Course. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CCXCourse' responses: '201': description: '' schema: $ref: '#/definitions/CCXCourse' tags: - ccx parameters: [] /ccx/v0/ccx/{ccx_course_id}/: get: operationId: ccx_v0_ccx_read description: Gets a CCX Course information. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/CCXCourse' tags: - ccx patch: operationId: ccx_v0_ccx_partial_update description: Modifies a CCX course. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CCXCourse' responses: '200': description: '' schema: $ref: '#/definitions/CCXCourse' tags: - ccx delete: operationId: ccx_v0_ccx_delete description: Deletes a CCX course. parameters: [] responses: '204': description: '' tags: - ccx parameters: - name: ccx_course_id in: path required: true type: string /certificates/v0/certificates/{username}/: get: operationId: certificates_v0_certificates_read summary: Get a paginated list of certificates for a user. description: |- **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: - name: username in: path description: The users to get certificates for type: string required: true responses: '200': description: '' tags: - certificates parameters: - name: username in: path required: true type: string /certificates/v0/certificates/{username}/courses/{course_id}/: get: operationId: certificates_v0_certificates_courses_read description: Retrieves certificate information for a user in a specified course run. parameters: [] responses: '200': description: '' tags: - certificates parameters: - name: username in: path required: true type: string - name: course_id in: path required: true type: string /change_email_settings: post: operationId: change_email_settings_create description: Modify logged-in user's setting for receiving emails from a course. parameters: [] responses: '201': description: '' tags: - change_email_settings parameters: [] /cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}: get: operationId: cohorts_v1_courses_cohorts_read description: Endpoint to get either one or all cohorts. parameters: [] responses: '200': description: Successful response with cohort details. schema: $ref: '#/definitions/Cohort' tags: - cohorts post: operationId: cohorts_v1_courses_cohorts_create description: Endpoint to create a new cohort, must not include cohort_id. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CohortCreate' responses: '200': description: Successful response with created cohort details. schema: $ref: '#/definitions/Cohort' tags: - cohorts patch: operationId: cohorts_v1_courses_cohorts_partial_update description: Endpoint to update a cohort name, assignment type, and/or content group association. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CohortUpdate' responses: '204': description: Successful update, no content returned. tags: - cohorts parameters: - name: course_key_string in: path required: true type: string - name: cohort_id in: path required: true type: string /cohorts/v1/courses/{course_key_string}/cohorts/{cohort_id}/users/{username}: get: operationId: cohorts_v1_courses_cohorts_users_read description: Lists the users in a specific cohort. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/CohortUsersAPI' tags: - cohorts post: operationId: cohorts_v1_courses_cohorts_users_create description: Add given users to the cohort. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CohortUsersAPI' responses: '201': description: '' schema: $ref: '#/definitions/CohortUsersAPI' tags: - cohorts delete: operationId: cohorts_v1_courses_cohorts_users_delete description: Removes and user from a specific cohort. parameters: [] responses: '204': description: '' tags: - cohorts parameters: - name: course_key_string in: path required: true type: string - name: cohort_id in: path required: true type: string - name: username in: path required: true type: string /cohorts/v1/courses/{course_key_string}/users: post: operationId: cohorts_v1_courses_users_create description: |- 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: [] responses: '201': description: '' tags: - cohorts parameters: - name: course_key_string in: path required: true type: string /cohorts/v1/settings/{course_key_string}: get: operationId: cohorts_v1_settings_read description: Endpoint to fetch the course cohort settings. parameters: [] responses: '200': description: '' schema: type: object properties: {} tags: - cohorts put: operationId: cohorts_v1_settings_update description: Endpoint to set the course cohort settings. parameters: - name: data in: body required: true schema: type: object properties: {} responses: '200': description: '' schema: type: object properties: {} tags: - cohorts parameters: - name: course_key_string in: path required: true type: string /commerce/v0/baskets/: post: operationId: commerce_v0_baskets_create description: Attempt to enroll the user. parameters: [] responses: '201': description: '' tags: - commerce parameters: [] /commerce/v0/baskets/{basket_id}/order/: get: operationId: commerce_v0_baskets_order_list description: HTTP handler. parameters: [] responses: '200': description: '' tags: - commerce parameters: - name: basket_id in: path required: true type: string /commerce/v1/courses/: get: operationId: commerce_v1_courses_list description: List courses and modes. parameters: [] responses: '200': description: '' schema: type: array items: $ref: '#/definitions/commerce.Course' tags: - commerce parameters: [] /commerce/v1/courses/{course_id}/: get: operationId: commerce_v1_courses_read description: Retrieve, update, or create courses/modes. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/commerce.Course' tags: - commerce put: operationId: commerce_v1_courses_update description: Retrieve, update, or create courses/modes. parameters: - name: data in: body required: true schema: $ref: '#/definitions/commerce.Course' responses: '200': description: '' schema: $ref: '#/definitions/commerce.Course' tags: - commerce patch: operationId: commerce_v1_courses_partial_update description: Retrieve, update, or create courses/modes. parameters: - name: data in: body required: true schema: $ref: '#/definitions/commerce.Course' responses: '200': description: '' schema: $ref: '#/definitions/commerce.Course' tags: - commerce parameters: - name: course_id in: path required: true type: string /commerce/v1/orders/{number}/: get: operationId: commerce_v1_orders_read description: HTTP handler. parameters: [] responses: '200': description: '' tags: - commerce parameters: - name: number in: path required: true type: string /completion/v1/completion-batch: post: operationId: completion_v1_completion-batch_create summary: Inserts a batch of completions. description: |- 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. parameters: [] responses: '201': description: '' tags: - completion parameters: [] /completion/v1/subsection-completion/{username}/{course_key}/{subsection_id}: get: operationId: completion_v1_subsection-completion_read description: Returns completion for a (user, subsection, course). parameters: [] responses: '200': description: '' tags: - completion parameters: - name: username in: path required: true type: string - name: course_key in: path required: true type: string - name: subsection_id in: path required: true type: string /course_experience/v1/course_deadlines_info/{course_key_string}: get: operationId: course_experience_v1_course_deadlines_info_read summary: '**Use Cases**' description: |- 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: [] responses: '200': description: '' schema: $ref: '#/definitions/CourseDeadlinesMobile' tags: - course_experience parameters: - name: course_key_string in: path required: true type: string /course_experience/v1/reset_all_course_deadlines/: post: operationId: course_experience_v1_reset_all_course_deadlines_create summary: Set the start_date of a schedule to today for all enrolled courses description: |- Request Parameters: research_event_data: any data that should be included in the research tracking event Example: sending the location of where the reset deadlines banner (i.e. outline-tab) parameters: [] responses: '201': description: '' tags: - course_experience parameters: [] /course_experience/v1/reset_course_deadlines: post: operationId: course_experience_v1_reset_course_deadlines_create description: |- 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. parameters: [] responses: '201': description: '' tags: - course_experience parameters: [] /course_home/course_metadata/{course_key_string}: get: operationId: course_home_course_metadata_read summary: '**Use Cases**' description: |- 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: [] responses: '200': description: '' schema: $ref: '#/definitions/CourseHomeMetadata' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/dates/{course_key_string}: get: operationId: course_home_dates_read summary: '**Use Cases**' description: |- Request details for the Dates Tab **Example Requests** GET api/course_home/v1/dates/{course_key} **Response Values** Body consists of the following fields: course_date_blocks: List of serialized DateSummary objects. Each serialization has the following fields: complete: (bool) Meant to only be used by assignments. Indicates completeness for an assignment. date: (datetime) The date time corresponding for the event date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) description: (str) The description for the date event learner_has_access: (bool) Indicates if the learner has access to the date event link: (str) An absolute link to content related to the date event (ex. verified link or link to assignment) title: (str) The title of the date event dates_banner_info: (obj) content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. missed_deadlines: (bool) Indicates whether the user missed any graded content deadlines missed_gated_content: (bool) Indicates whether the user missed gated content verified_upgrade_link: (str) The link for upgrading to the Verified track in a course has_ended: (bool) Indicates whether course has ended learner_is_full_access: (bool) Indicates if the user is verified in the course user_timezone: (str) The user's preferred timezone **Returns** * 200 on success with above fields. * 401 if the user is not authenticated. * 403 if the user does not have access to the course. * 404 if the course is not available or cannot be seen. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/DatesTab' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/dismiss_welcome_message: post: operationId: course_home_dismiss_welcome_message_create description: '' parameters: [] responses: '201': description: '' tags: - course_home parameters: [] /course_home/navigation/{course_key_string}: get: operationId: course_home_navigation_read description: Get the visible course blocks (from course to vertical types) for the given course. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/CourseBlock' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/outline/{course_key_string}: get: operationId: course_home_outline_read summary: '**Use Cases**' description: |- Request details for the Outline Tab **Example Requests** GET api/course_home/v1/outline/{course_key} **Response Values** Body consists of two possible shapes. For a good 200 response, the response will include: access_expiration: An object detailing when access to this course will expire expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) course_blocks: blocks: List of serialized Course Block objects. Each serialization has the following fields: id: (str) The usage ID of the block. type: (str) The type of block. Possible values the names of any XBlock type in the system, including custom blocks. Examples are course, chapter, sequential, vertical, html, problem, video, and discussion. display_name: (str) The display name of the block. lms_web_url: (str) The URL to the navigational container of the xBlock on the web LMS. children: (list) If the block has child blocks, a list of IDs of the child blocks. resume_block: (bool) Whether the block is the resume block has_scheduled_content: (bool) Whether the block has more content scheduled for the future course_goals: selected_goal: days_per_week: (int) The number of days the learner wants to learn per week subscribed_to_reminders: (bool) Whether the learner wants email reminders about their goal weekly_learning_goal_enabled: Flag indicating if this feature is enabled for this call course_tools: List of serialized Course Tool objects. Each serialization has the following fields: analytics_id: (str) The unique id given to the tool. title: (str) The display title of the tool. url: (str) The link to access the tool. dates_banner_info: (obj) content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. missed_deadlines: (bool) Whether the user has missed any graded content deadlines for the given course. missed_gated_content: (bool) Whether the user has missed any gated content for the given course. verified_upgrade_link: (str) The URL to ecommerce IDA for purchasing the verified upgrade. dates_widget: course_date_blocks: List of serialized Course Dates objects. Each serialization has the following fields: complete: (bool) Meant to only be used by assignments. Indicates completeness for an assignment. date: (datetime) The date time corresponding for the event date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) description: (str) The description for the date event learner_has_access: (bool) Indicates if the learner has access to the date event link: (str) An absolute link to content related to the date event (ex. verified link or link to assignment) title: (str) The title of the date event dates_tab_link: (str) The URL to the Dates Tab user_timezone: (str) The timezone of the given user enroll_alert: can_enroll: (bool) Whether the user can enroll in the given course extra_text: (str) enrollment_mode: (str) Current enrollment mode. Null if the user is not enrolled. handouts_html: (str) Raw HTML for the handouts section of the course info has_ended: (bool) Indicates whether course has ended offer: An object detailing upgrade discount information code: (str) Checkout code expiration_date: (str) Expiration of offer, in ISO 8601 notation original_price: (str) Full upgrade price without checkout code; includes currency symbol discounted_price: (str) Upgrade price with checkout code; includes currency symbol percentage: (int) Amount of discount upgrade_url: (str) Checkout URL resume_course: has_visited_course: (bool) Whether the user has ever visited the course url: (str) The display name of the course block to resume welcome_message_html: (str) Raw HTML for the course updates banner user_has_passing_grade: (bool) Whether the user currently is passing the course If the learner does not have access to the course for a specific reason and should be redirected this view will return a 403 and the following data: url: (str) The URL to which the user should be redirected error_code: (str) A system identifier for the reason the user is being redirected developer_message: (str) A message explaining why the user is being redirected, intended for developer debugging. user_message: (str) A message explaining why the user is being redirected, intended to be shown to the user. **Returns** * 200 on success. * 403 if the user does not currently have access to the course and should be redirected. * 404 if the course is not available or cannot be seen. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/OutlineTab' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/progress/{course_key_string}: get: operationId: course_home_progress_read summary: '**Use Cases**' description: |- Request details for the Progress Tab **Example Requests** GET api/course_home/v1/progress/{course_key} GET api/course_home/v1/progress/{course_key}/{student_id}/ **Response Values** Body consists of the following fields: access_expiration: An object detailing when access to this course will expire expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) certificate_data: Object containing information about the user's certificate status cert_status: (str) the status of a user's certificate (full list of statuses are defined in lms/djangoapps/certificates/models.py) cert_web_view_url: (str) the url to view the certificate download_url: (str) the url to download the certificate completion_summary: Object containing unit completion counts with the following fields: complete_count: (float) number of complete units incomplete_count: (float) number of incomplete units locked_count: (float) number of units where contains_gated_content is True course_grade: Object containing the following fields: is_passing: (bool) whether the user's grade is above the passing grade cutoff letter_grade: (str) the user's letter grade based on the set grade range. If user is passing, value may be 'A', 'B', 'C', 'D', 'Pass', otherwise none percent: (float) the user's total graded percent in the course credit_course_requirements: Object containing credit course requirements with the following fields: eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be "eligible", "not_eligible", or "partial_eligible" requirements: List of requirements that must be fulfilled to be eligible to receive credit. See `get_credit_requirement_status` for details on the fields end: (date) end date of the course enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) grading_policy: assignment_policies: List of serialized assignment grading policy objects, each has the following fields: num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final grade short_label: (str) the abbreviated name given to the assignment type type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they range from just 'Pass', to a combination of 'A', 'B', 'C', and 'D'. If a letter grade is present, 'Pass' is not included. has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future section_scores: List of serialized Chapters. Each Chapter has the following fields: display_name: (str) a str of what the name of the Chapter is for displaying on the site subsections: List of serialized Subsections, each has the following fields: assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) block_key: (str) the key of the given subsection block display_name: (str) a str of what the name of the Subsection is for displaying on the site due: (str or None) the due date of the subsection in ISO 8601 format, or None if no due date is set has_graded_assignment: (bool) whether or not the Subsection is a graded assignment learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) num_points_earned: (int) the amount of points the user has earned for the given subsection num_points_possible: (int) the total amount of points possible for the given subsection override: Optional object if grade has been overridden by proctor or grading change system: (str) either GRADING or PROCTORING reason: (str) a comment on the grading override percent_graded: (float) the percentage of total points the user has received a grade for in a given subsection problem_scores: List of objects that represent individual problem scores with the following fields: earned: (float) number of earned points possible: (float) number of possible points show_correctness: (str) a str representing whether to show the problem/practice scores based on due date ('always', 'never', 'past_due', values defined in xmodule/modulestore/inheritance.py) show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer accessible to the learner due to a hide_after_due course team setting studio_url: (str) a str of the link to the grading in studio for the course user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course username: (str) username of the student whose progress information is being displayed. verification_data: an object containing link: (str) the link to either start or retry ID verification status: (str) the status of the ID verification status_date: (str) the date time string of when the ID verification status was set **Returns** * 200 on success with above fields. * 401 if the user is not authenticated or not enrolled. * 403 if the user does not have access to the course. * 404 if the course is not available or cannot be seen. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/ProgressTab' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/progress/{course_key_string}/{student_id}: get: operationId: course_home_progress_read summary: '**Use Cases**' description: |- Request details for the Progress Tab **Example Requests** GET api/course_home/v1/progress/{course_key} GET api/course_home/v1/progress/{course_key}/{student_id}/ **Response Values** Body consists of the following fields: access_expiration: An object detailing when access to this course will expire expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) certificate_data: Object containing information about the user's certificate status cert_status: (str) the status of a user's certificate (full list of statuses are defined in lms/djangoapps/certificates/models.py) cert_web_view_url: (str) the url to view the certificate download_url: (str) the url to download the certificate completion_summary: Object containing unit completion counts with the following fields: complete_count: (float) number of complete units incomplete_count: (float) number of incomplete units locked_count: (float) number of units where contains_gated_content is True course_grade: Object containing the following fields: is_passing: (bool) whether the user's grade is above the passing grade cutoff letter_grade: (str) the user's letter grade based on the set grade range. If user is passing, value may be 'A', 'B', 'C', 'D', 'Pass', otherwise none percent: (float) the user's total graded percent in the course credit_course_requirements: Object containing credit course requirements with the following fields: eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be "eligible", "not_eligible", or "partial_eligible" requirements: List of requirements that must be fulfilled to be eligible to receive credit. See `get_credit_requirement_status` for details on the fields end: (date) end date of the course enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) grading_policy: assignment_policies: List of serialized assignment grading policy objects, each has the following fields: num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final grade short_label: (str) the abbreviated name given to the assignment type type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they range from just 'Pass', to a combination of 'A', 'B', 'C', and 'D'. If a letter grade is present, 'Pass' is not included. has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future section_scores: List of serialized Chapters. Each Chapter has the following fields: display_name: (str) a str of what the name of the Chapter is for displaying on the site subsections: List of serialized Subsections, each has the following fields: assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) block_key: (str) the key of the given subsection block display_name: (str) a str of what the name of the Subsection is for displaying on the site due: (str or None) the due date of the subsection in ISO 8601 format, or None if no due date is set has_graded_assignment: (bool) whether or not the Subsection is a graded assignment learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) num_points_earned: (int) the amount of points the user has earned for the given subsection num_points_possible: (int) the total amount of points possible for the given subsection override: Optional object if grade has been overridden by proctor or grading change system: (str) either GRADING or PROCTORING reason: (str) a comment on the grading override percent_graded: (float) the percentage of total points the user has received a grade for in a given subsection problem_scores: List of objects that represent individual problem scores with the following fields: earned: (float) number of earned points possible: (float) number of possible points show_correctness: (str) a str representing whether to show the problem/practice scores based on due date ('always', 'never', 'past_due', values defined in xmodule/modulestore/inheritance.py) show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer accessible to the learner due to a hide_after_due course team setting studio_url: (str) a str of the link to the grading in studio for the course user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course username: (str) username of the student whose progress information is being displayed. verification_data: an object containing link: (str) the link to either start or retry ID verification status: (str) the status of the ID verification status_date: (str) the date time string of when the ID verification status was set **Returns** * 200 on success with above fields. * 401 if the user is not authenticated or not enrolled. * 403 if the user does not have access to the course. * 404 if the course is not available or cannot be seen. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/ProgressTab' tags: - course_home parameters: - name: course_key_string in: path required: true type: string - name: student_id in: path required: true type: string /course_home/save_course_goal: post: operationId: course_home_save_course_goal_create description: '' parameters: [] responses: '201': description: '' tags: - course_home parameters: [] /course_home/unsubscribe_from_course_goal/{token}: post: operationId: course_home_unsubscribe_from_course_goal_create summary: API calls to unsubscribe from course goal reminders. description: |- 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: [] responses: '201': description: '' tags: - course_home parameters: - name: token in: path required: true type: string /course_home/v1/course_metadata/{course_key_string}: get: operationId: course_home_v1_course_metadata_read summary: '**Use Cases**' description: |- 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: [] responses: '200': description: '' schema: $ref: '#/definitions/CourseHomeMetadata' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/v1/dates/{course_key_string}: get: operationId: course_home_v1_dates_read summary: '**Use Cases**' description: |- Request details for the Dates Tab **Example Requests** GET api/course_home/v1/dates/{course_key} **Response Values** Body consists of the following fields: course_date_blocks: List of serialized DateSummary objects. Each serialization has the following fields: complete: (bool) Meant to only be used by assignments. Indicates completeness for an assignment. date: (datetime) The date time corresponding for the event date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) description: (str) The description for the date event learner_has_access: (bool) Indicates if the learner has access to the date event link: (str) An absolute link to content related to the date event (ex. verified link or link to assignment) title: (str) The title of the date event dates_banner_info: (obj) content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. missed_deadlines: (bool) Indicates whether the user missed any graded content deadlines missed_gated_content: (bool) Indicates whether the user missed gated content verified_upgrade_link: (str) The link for upgrading to the Verified track in a course has_ended: (bool) Indicates whether course has ended learner_is_full_access: (bool) Indicates if the user is verified in the course user_timezone: (str) The user's preferred timezone **Returns** * 200 on success with above fields. * 401 if the user is not authenticated. * 403 if the user does not have access to the course. * 404 if the course is not available or cannot be seen. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/DatesTab' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/v1/dismiss_welcome_message: post: operationId: course_home_v1_dismiss_welcome_message_create description: '' parameters: [] responses: '201': description: '' tags: - course_home parameters: [] /course_home/v1/navigation/{course_key_string}: get: operationId: course_home_v1_navigation_read description: Get the visible course blocks (from course to vertical types) for the given course. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/CourseBlock' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/v1/outline/{course_key_string}: get: operationId: course_home_v1_outline_read summary: '**Use Cases**' description: |- Request details for the Outline Tab **Example Requests** GET api/course_home/v1/outline/{course_key} **Response Values** Body consists of two possible shapes. For a good 200 response, the response will include: access_expiration: An object detailing when access to this course will expire expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) course_blocks: blocks: List of serialized Course Block objects. Each serialization has the following fields: id: (str) The usage ID of the block. type: (str) The type of block. Possible values the names of any XBlock type in the system, including custom blocks. Examples are course, chapter, sequential, vertical, html, problem, video, and discussion. display_name: (str) The display name of the block. lms_web_url: (str) The URL to the navigational container of the xBlock on the web LMS. children: (list) If the block has child blocks, a list of IDs of the child blocks. resume_block: (bool) Whether the block is the resume block has_scheduled_content: (bool) Whether the block has more content scheduled for the future course_goals: selected_goal: days_per_week: (int) The number of days the learner wants to learn per week subscribed_to_reminders: (bool) Whether the learner wants email reminders about their goal weekly_learning_goal_enabled: Flag indicating if this feature is enabled for this call course_tools: List of serialized Course Tool objects. Each serialization has the following fields: analytics_id: (str) The unique id given to the tool. title: (str) The display title of the tool. url: (str) The link to access the tool. dates_banner_info: (obj) content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. missed_deadlines: (bool) Whether the user has missed any graded content deadlines for the given course. missed_gated_content: (bool) Whether the user has missed any gated content for the given course. verified_upgrade_link: (str) The URL to ecommerce IDA for purchasing the verified upgrade. dates_widget: course_date_blocks: List of serialized Course Dates objects. Each serialization has the following fields: complete: (bool) Meant to only be used by assignments. Indicates completeness for an assignment. date: (datetime) The date time corresponding for the event date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) description: (str) The description for the date event learner_has_access: (bool) Indicates if the learner has access to the date event link: (str) An absolute link to content related to the date event (ex. verified link or link to assignment) title: (str) The title of the date event dates_tab_link: (str) The URL to the Dates Tab user_timezone: (str) The timezone of the given user enroll_alert: can_enroll: (bool) Whether the user can enroll in the given course extra_text: (str) enrollment_mode: (str) Current enrollment mode. Null if the user is not enrolled. handouts_html: (str) Raw HTML for the handouts section of the course info has_ended: (bool) Indicates whether course has ended offer: An object detailing upgrade discount information code: (str) Checkout code expiration_date: (str) Expiration of offer, in ISO 8601 notation original_price: (str) Full upgrade price without checkout code; includes currency symbol discounted_price: (str) Upgrade price with checkout code; includes currency symbol percentage: (int) Amount of discount upgrade_url: (str) Checkout URL resume_course: has_visited_course: (bool) Whether the user has ever visited the course url: (str) The display name of the course block to resume welcome_message_html: (str) Raw HTML for the course updates banner user_has_passing_grade: (bool) Whether the user currently is passing the course If the learner does not have access to the course for a specific reason and should be redirected this view will return a 403 and the following data: url: (str) The URL to which the user should be redirected error_code: (str) A system identifier for the reason the user is being redirected developer_message: (str) A message explaining why the user is being redirected, intended for developer debugging. user_message: (str) A message explaining why the user is being redirected, intended to be shown to the user. **Returns** * 200 on success. * 403 if the user does not currently have access to the course and should be redirected. * 404 if the course is not available or cannot be seen. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/OutlineTab' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/v1/progress/{course_key_string}: get: operationId: course_home_v1_progress_read summary: '**Use Cases**' description: |- Request details for the Progress Tab **Example Requests** GET api/course_home/v1/progress/{course_key} GET api/course_home/v1/progress/{course_key}/{student_id}/ **Response Values** Body consists of the following fields: access_expiration: An object detailing when access to this course will expire expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) certificate_data: Object containing information about the user's certificate status cert_status: (str) the status of a user's certificate (full list of statuses are defined in lms/djangoapps/certificates/models.py) cert_web_view_url: (str) the url to view the certificate download_url: (str) the url to download the certificate completion_summary: Object containing unit completion counts with the following fields: complete_count: (float) number of complete units incomplete_count: (float) number of incomplete units locked_count: (float) number of units where contains_gated_content is True course_grade: Object containing the following fields: is_passing: (bool) whether the user's grade is above the passing grade cutoff letter_grade: (str) the user's letter grade based on the set grade range. If user is passing, value may be 'A', 'B', 'C', 'D', 'Pass', otherwise none percent: (float) the user's total graded percent in the course credit_course_requirements: Object containing credit course requirements with the following fields: eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be "eligible", "not_eligible", or "partial_eligible" requirements: List of requirements that must be fulfilled to be eligible to receive credit. See `get_credit_requirement_status` for details on the fields end: (date) end date of the course enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) grading_policy: assignment_policies: List of serialized assignment grading policy objects, each has the following fields: num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final grade short_label: (str) the abbreviated name given to the assignment type type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they range from just 'Pass', to a combination of 'A', 'B', 'C', and 'D'. If a letter grade is present, 'Pass' is not included. has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future section_scores: List of serialized Chapters. Each Chapter has the following fields: display_name: (str) a str of what the name of the Chapter is for displaying on the site subsections: List of serialized Subsections, each has the following fields: assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) block_key: (str) the key of the given subsection block display_name: (str) a str of what the name of the Subsection is for displaying on the site due: (str or None) the due date of the subsection in ISO 8601 format, or None if no due date is set has_graded_assignment: (bool) whether or not the Subsection is a graded assignment learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) num_points_earned: (int) the amount of points the user has earned for the given subsection num_points_possible: (int) the total amount of points possible for the given subsection override: Optional object if grade has been overridden by proctor or grading change system: (str) either GRADING or PROCTORING reason: (str) a comment on the grading override percent_graded: (float) the percentage of total points the user has received a grade for in a given subsection problem_scores: List of objects that represent individual problem scores with the following fields: earned: (float) number of earned points possible: (float) number of possible points show_correctness: (str) a str representing whether to show the problem/practice scores based on due date ('always', 'never', 'past_due', values defined in xmodule/modulestore/inheritance.py) show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer accessible to the learner due to a hide_after_due course team setting studio_url: (str) a str of the link to the grading in studio for the course user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course username: (str) username of the student whose progress information is being displayed. verification_data: an object containing link: (str) the link to either start or retry ID verification status: (str) the status of the ID verification status_date: (str) the date time string of when the ID verification status was set **Returns** * 200 on success with above fields. * 401 if the user is not authenticated or not enrolled. * 403 if the user does not have access to the course. * 404 if the course is not available or cannot be seen. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/ProgressTab' tags: - course_home parameters: - name: course_key_string in: path required: true type: string /course_home/v1/progress/{course_key_string}/{student_id}: get: operationId: course_home_v1_progress_read summary: '**Use Cases**' description: |- Request details for the Progress Tab **Example Requests** GET api/course_home/v1/progress/{course_key} GET api/course_home/v1/progress/{course_key}/{student_id}/ **Response Values** Body consists of the following fields: access_expiration: An object detailing when access to this course will expire expiration_date: (str) When the access expires, in ISO 8601 notation masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) upgrade_url: (str) Upgrade link (or None if can't upgrade anymore) certificate_data: Object containing information about the user's certificate status cert_status: (str) the status of a user's certificate (full list of statuses are defined in lms/djangoapps/certificates/models.py) cert_web_view_url: (str) the url to view the certificate download_url: (str) the url to download the certificate completion_summary: Object containing unit completion counts with the following fields: complete_count: (float) number of complete units incomplete_count: (float) number of incomplete units locked_count: (float) number of units where contains_gated_content is True course_grade: Object containing the following fields: is_passing: (bool) whether the user's grade is above the passing grade cutoff letter_grade: (str) the user's letter grade based on the set grade range. If user is passing, value may be 'A', 'B', 'C', 'D', 'Pass', otherwise none percent: (float) the user's total graded percent in the course credit_course_requirements: Object containing credit course requirements with the following fields: eligibility_status: (str) Indicates if the user is eligible to receive credit. Value may be "eligible", "not_eligible", or "partial_eligible" requirements: List of requirements that must be fulfilled to be eligible to receive credit. See `get_credit_requirement_status` for details on the fields end: (date) end date of the course enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...) grading_policy: assignment_policies: List of serialized assignment grading policy objects, each has the following fields: num_droppable: (int) the number of lowest scored assignments that will not be counted towards the final grade short_label: (str) the abbreviated name given to the assignment type type: (str) the assignment type weight: (float) the percent weight the given assigment type has on the overall grade grade_range: an object containing the grade range cutoffs. The exact keys in the object can vary, but they range from just 'Pass', to a combination of 'A', 'B', 'C', and 'D'. If a letter grade is present, 'Pass' is not included. has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future section_scores: List of serialized Chapters. Each Chapter has the following fields: display_name: (str) a str of what the name of the Chapter is for displaying on the site subsections: List of serialized Subsections, each has the following fields: assignment_type: (str) the format, if any, of the Subsection (Homework, Exam, etc) block_key: (str) the key of the given subsection block display_name: (str) a str of what the name of the Subsection is for displaying on the site due: (str or None) the due date of the subsection in ISO 8601 format, or None if no due date is set has_graded_assignment: (bool) whether or not the Subsection is a graded assignment learner_has_access: (bool) whether the learner has access to the subsection (could be FBE gated) num_points_earned: (int) the amount of points the user has earned for the given subsection num_points_possible: (int) the total amount of points possible for the given subsection override: Optional object if grade has been overridden by proctor or grading change system: (str) either GRADING or PROCTORING reason: (str) a comment on the grading override percent_graded: (float) the percentage of total points the user has received a grade for in a given subsection problem_scores: List of objects that represent individual problem scores with the following fields: earned: (float) number of earned points possible: (float) number of possible points show_correctness: (str) a str representing whether to show the problem/practice scores based on due date ('always', 'never', 'past_due', values defined in xmodule/modulestore/inheritance.py) show_grades: (bool) a bool for whether to show grades based on the access the user has url: (str or None) the absolute path url to the Subsection or None if the Subsection is no longer accessible to the learner due to a hide_after_due course team setting studio_url: (str) a str of the link to the grading in studio for the course user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course username: (str) username of the student whose progress information is being displayed. verification_data: an object containing link: (str) the link to either start or retry ID verification status: (str) the status of the ID verification status_date: (str) the date time string of when the ID verification status was set **Returns** * 200 on success with above fields. * 401 if the user is not authenticated or not enrolled. * 403 if the user does not have access to the course. * 404 if the course is not available or cannot be seen. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/ProgressTab' tags: - course_home parameters: - name: course_key_string in: path required: true type: string - name: student_id in: path required: true type: string /course_home/v1/save_course_goal: post: operationId: course_home_v1_save_course_goal_create description: '' parameters: [] responses: '201': description: '' tags: - course_home parameters: [] /course_home/v1/unsubscribe_from_course_goal/{token}: post: operationId: course_home_v1_unsubscribe_from_course_goal_create summary: API calls to unsubscribe from course goal reminders. description: |- 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: [] responses: '201': description: '' tags: - course_home parameters: - name: token in: path required: true type: string /course_live/course/{course_id}/: get: operationId: course_live_course_read summary: Handle HTTP/GET requests description: Handle HTTP/GET requests parameters: - name: course_id in: path description: The course for which to get provider list type: string required: true responses: '200': description: '' schema: $ref: '#/definitions/CourseLiveConfiguration' '401': description: The requester is not authenticated. '403': description: The requester cannot access the specified course. '404': description: The requested course does not exist. tags: - course_live post: operationId: course_live_course_create summary: Handle HTTP/POST requests description: Handle HTTP/POST requests parameters: - name: course_id in: path description: The course for which to get provider list type: string required: true - name: lti_1p1_client_key in: path description: The LTI provider's client key type: string required: true - name: lti_1p1_client_secret in: path description: The LTI provider's client secretL type: string required: true - name: lti_1p1_launch_url in: path description: The LTI provider's launch URL type: string required: true - name: provider_type in: path description: The LTI provider's launch URL type: string required: true - name: lti_config in: query description: 'The lti_config object with required additional parameters ' type: object responses: '200': description: '' schema: $ref: '#/definitions/CourseLiveConfiguration' '400': description: Required parameters are missing. '401': description: The requester is not authenticated. '403': description: The requester cannot access the specified course. '404': description: The requested course does not exist. tags: - course_live parameters: - name: course_id in: path required: true type: string /course_live/iframe/{course_id}/: get: operationId: course_live_iframe_read description: Handle HTTP/GET requests parameters: [] responses: '200': description: '' tags: - course_live parameters: - name: course_id in: path required: true type: string /course_live/providers/{course_id}/: get: operationId: course_live_providers_read description: A view for retrieving Program live IFrame . parameters: [] responses: '200': description: '' tags: - course_live parameters: - name: course_id in: path required: true type: string /course_modes/v1/courses/{course_id}/: get: operationId: course_modes_v1_courses_list summary: View to list or create course modes for a course. description: |- **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: [] responses: '200': description: '' schema: type: array items: $ref: '#/definitions/course_modes.CourseMode' tags: - course_modes post: operationId: course_modes_v1_courses_create summary: View to list or create course modes for a course. description: |- **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: - name: data in: body required: true schema: $ref: '#/definitions/course_modes.CourseMode' responses: '201': description: '' schema: $ref: '#/definitions/course_modes.CourseMode' tags: - course_modes parameters: - name: course_id in: path required: true type: string /course_modes/v1/courses/{course_id}/{mode_slug}: get: operationId: course_modes_v1_courses_read summary: View to retrieve, update, or delete a specific course mode for a course. description: |- **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: [] responses: '200': description: '' schema: $ref: '#/definitions/course_modes.CourseMode' consumes: - application/merge-patch+json tags: - course_modes patch: operationId: course_modes_v1_courses_partial_update description: Performs a partial update of a CourseMode instance. parameters: - name: data in: body required: true schema: $ref: '#/definitions/course_modes.CourseMode' responses: '200': description: '' schema: $ref: '#/definitions/course_modes.CourseMode' consumes: - application/merge-patch+json tags: - course_modes delete: operationId: course_modes_v1_courses_delete summary: View to retrieve, update, or delete a specific course mode for a course. description: |- **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: [] responses: '204': description: '' consumes: - application/merge-patch+json tags: - course_modes parameters: - name: course_id in: path required: true type: string - name: mode_slug in: path required: true type: string /courses/v1/block_metadata/{usage_key_string}: get: operationId: courses_v1_block_metadata_list summary: '**Use Case**' description: |- 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//? &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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - courses parameters: - name: usage_key_string in: path required: true type: string /courses/v1/blocks/: get: operationId: courses_v1_blocks_list summary: '**Use Case**' description: |- Returns the blocks in the course according to the requesting user's access level. **Example requests**: GET /api/courses/v1/blocks/?course_id= GET /api/courses/v1/blocks/?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// for the root usage key of the course specified by course_id. The view accepts all parameters accepted by :class:`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 :class:`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. parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - courses parameters: [] /courses/v1/blocks/{usage_key_string}: get: operationId: courses_v1_blocks_list summary: '**Use Case**' description: |- Returns the blocks within the requested block tree according to the requesting user's access level. **Example requests**: GET /api/courses/v1/blocks//?depth=all GET /api/courses/v1/blocks//? 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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - courses parameters: - name: usage_key_string in: path required: true type: string /courses/v1/course_ids/: get: operationId: courses_v1_course_ids_list summary: '**Use Cases**' description: |- 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 } } parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: type: string tags: - courses parameters: [] /courses/v1/courses/: get: operationId: courses_v1_courses_list summary: '**Use Cases**' description: |- Request information on all courses visible to the specified user. **Example Requests** GET /api/courses/v1/courses/ POST /api/courses/v1/courses/ **Response Values** Body comprises a list of objects as returned by `CourseDetailView`. **Parameters** search_term (optional): Search term to filter courses (used by ElasticSearch). username (optional): The username of the specified user whose visible courses we want to see. The username is not required only if the API is requested by an Anonymous user. org (optional): If specified, visible `CourseOverview` objects are filtered such that only those belonging to the organization with the provided org code (e.g., "HarvardX") are returned. Case-insensitive. permissions (optional): If specified, it filters visible `CourseOverview` objects by checking if each permission specified is granted for the username. Notice that Staff users are always granted permission to list any course. active_only (optional): If this boolean is specified, only the courses that have not ended or do not have any end date are returned. This is different from search_term because this filtering is done on CourseOverview and not ElasticSearch. course_keys (optional): If specified, it fetches the `CourseOverview` objects for the the specified course keys mobile_search (bool): Optional parameter that limits the number of returned courses to MOBILE_SEARCH_COURSE_LIMIT. **Returns** * 200 on success, with a list of course discovery objects as returned by `CourseDetailView`. * 400 if an invalid parameter was sent or the username was not provided for an authenticated request. * 403 if a user who does not have permission to masquerade as another user specifies a username other than their own. * 404 if the specified user does not exist, or the requesting user does not have permission to view their courses. Example response: [ { "blocks_url": "/api/courses/v1/blocks/?course_id=edX%2Fexample%2F2012_Fall", "media": { "course_image": { "uri": "/c4x/edX/example/asset/just_a_test.jpg", "name": "Course Image" } }, "description": "An example course.", "end": "2015-09-19T18:00:00Z", "enrollment_end": "2015-07-15T00:00:00Z", "enrollment_start": "2015-06-15T00:00:00Z", "course_id": "edX/example/2012_Fall", "name": "Example Course", "number": "example", "org": "edX", "start": "2015-07-17T12:00:00Z", "start_display": "July 17, 2015", "start_type": "timestamp" } ] **Note** The POST /api/courses/v1/courses/ reads `request.body` for parameters, allowing for larger input than the query string. parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/Course' tags: - courses post: operationId: courses_v1_courses_create description: POST courses filter. parameters: - name: data in: body required: true schema: $ref: '#/definitions/Course' responses: '201': description: '' schema: $ref: '#/definitions/Course' tags: - courses parameters: [] /courses/v1/courses/{course_key_string}: get: operationId: courses_v1_courses_read summary: '**Use Cases**' description: |- 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: "

A verbose description of the course.

" "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: [] responses: '200': description: '' schema: $ref: '#/definitions/CourseDetail' tags: - courses parameters: - name: course_key_string in: path required: true type: string /courses/v2/block_metadata/{usage_key_string}: get: operationId: courses_v2_block_metadata_list summary: '**Use Case**' description: |- 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//? &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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - courses parameters: - name: usage_key_string in: path required: true type: string /courses/v2/blocks/: get: operationId: courses_v2_blocks_list summary: '**Use Case**' description: |- Returns the blocks in the course according to the requesting user's access level. **Example requests**: GET /api/courses/v1/blocks/?course_id= GET /api/courses/v1/blocks/?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// for the root usage key of the course specified by course_id. The view accepts all parameters accepted by :class:`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 :class:`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. parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - courses parameters: [] /courses/v2/blocks/{usage_key_string}: get: operationId: courses_v2_blocks_list summary: '**Use Case**' description: |- Returns the blocks within the requested block tree according to the requesting user's access level. **Example requests**: GET /api/courses/v1/blocks//?depth=all GET /api/courses/v1/blocks//? 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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - courses parameters: - name: usage_key_string in: path required: true type: string /courseware/celebration/{course_key_string}: post: operationId: courseware_celebration_create description: Handle a POST request. parameters: [] responses: '201': description: '' tags: - courseware parameters: - name: course_key_string in: path required: true type: string /courseware/course/{course_key_string}: get: operationId: courseware_course_read summary: '**Use Cases**' description: |- Request details for a course **Example Requests** GET /api/courseware/course/{course_key} **Response Values** Body consists of the following fields: * access_expiration: An object detailing when access to this course will expire * expiration_date: (str) When the access expires, in ISO 8601 notation * masquerading_expired_course: (bool) Whether this course is expired for the masqueraded user * upgrade_deadline: (str) Last chance to upgrade, in ISO 8601 notation (or None if can't upgrade anymore) * upgrade_url: (str) Upgrade linke (or None if can't upgrade anymore) * celebrations: An object detailing which celebrations to render * first_section: (bool) If the first section celebration should render Note: Also uses information from frontend so this value is not final * streak_length_to_celebrate: (int) The streak length to celebrate for the learner * streak_discount_enabled: (bool) If the frontend should render an upgrade discount for hitting the streak * weekly_goal: (bool) If the weekly goal celebration should render * course_goals: * selected_goal: * days_per_week: (int) The number of days the learner wants to learn per week * subscribed_to_reminders: (bool) Whether the learner wants email reminders about their goal * weekly_learning_goal_enabled: Flag indicating if this feature is enabled for this call * effort: A textual description of the weekly hours of effort expected in the course. * end: Date the course ends, in ISO 8601 notation * enrollment: Enrollment status of authenticated user * mode: `audit`, `verified`, etc * is_active: boolean * enrollment_end: Date enrollment ends, in ISO 8601 notation * enrollment_start: Date enrollment begins, in ISO 8601 notation * entrance_exam_data: An object containing information about the course's entrance exam * entrance_exam_current_score: (float) The users current score on the entrance exam * entrance_exam_enabled: (bool) If the course has an entrance exam * entrance_exam_id: (str) The block id for the entrance exam if enabled. Will be a section (chapter) * entrance_exam_minimum_score_pct: (float) The minimum score a user must receive on the entrance exam to unlock the remainder of the course. Returned as a float (i.e. 0.7 for 70%) * entrance_exam_passed: (bool) Indicates if the entrance exam has been passed * id: A unique identifier of the course; a serialized representation of the opaque key identifying the course. * language: The language code for the course * media: An object that contains named media items. Included here: * course_image: An image to show for the course. Represented as an object with the following fields: * uri: The location of the image * name: Name of the course * offer: An object detailing upgrade discount information * code: (str) Checkout code * expiration_date: (str) Expiration of offer, in ISO 8601 notation * original_price: (str) Full upgrade price without checkout code; includes currency symbol * discounted_price: (str) Upgrade price with checkout code; includes currency symbol * percentage: (int) Amount of discount * upgrade_url: (str) Checkout URL * org: Name of the organization that owns the course * related_programs: A list of objects that contains program data related to the given course including: * progress: An object containing program progress: * complete: (int) Number of complete courses in the program (a course is completed if the user has earned a certificate for any of the nested course runs) * in_progress: (int) Number of courses in the program that are in progress (a course is in progress if the user has enrolled in any of the nested course runs) * not_started: (int) Number of courses in the program that have not been started * slug: (str) The program type * title: (str) The title of the program * url: (str) The link to the program's landing page * uuid: (str) A unique identifier of the program * short_description: A textual description of the course * start: Date the course begins, in ISO 8601 notation * start_display: Readably formatted start of the course * start_type: Hint describing how `start_display` is set. One of: * `"string"`: manually set by the course author * `"timestamp"`: generated from the `start` timestamp * `"empty"`: no start date is specified * pacing: Course pacing. Possible values: instructor, self * user_timezone: User's chosen timezone setting (or null for browser default) * user_has_passing_grade: Whether or not the effective user's grade is equal to or above the courses minimum passing grade * course_exit_page_is_active: Flag for the learning mfe on whether or not the course exit page should display * certificate_data: data regarding the effective user's certificate for the given course * verify_identity_url: URL for a learner to verify their identity. Only returned for learners enrolled in a verified mode. Will update to reverify URL if necessary. * verification_status: The verification status of the effective user in the course. Possible values: * 'none': No verification has been created for the user * 'expired': The verification has expired * 'approved': The verification has been approved * 'pending': The verification is pending * 'must_reverify': The user must reverify their identity * linkedin_add_to_profile_url: URL to add the effective user's certificate to a LinkedIn Profile. * user_needs_integrity_signature: Whether the user needs to sign the integrity agreement for the course * learning_assistant_enabled: Whether the Xpert Learning Assistant is enabled for the requesting user * show_courseware_link: Whether the courseware link should be shown in the course details page * is_course_full: Whether the course is full * can_enroll: Whether the user can enroll in the course * invitation_only: Whether the course is invitation only * is_shib_course: Whether the course is a Shibboleth course * allow_anonymous: Whether the course allows anonymous access * ecommerce_checkout: Whether the course has an ecommerce checkout * single_paid_mode: An object representing the single paid mode for the course, if it exists * sku: (str) The SKU for the single paid mode * name: (str) The name of the single paid mode * min_price: (str) The minimum price for the single paid mode, formatted with the currency symbol * description: (str) The description of the single paid mode * ecommerce_checkout_link: The ecommerce checkout link for the course, if it exists * course_image_urls: A list of course image URLs * start_date_is_still_default: Whether the course start date is still the default value * advertised_start: The advertised start date of the course * course_price: The course price, formatted with the currency symbol * pre_requisite_courses: A list of pre-requisite courses for the course * about_sidebar_html: The HTML content for the course about section, if enabled * display_number_with_default: The course number with the org name, if set * display_org_with_default: The org name with the course number, if set * content_type_gating_enabled: Whether the content type gating is enabled for the course * show_calculator: Whether the calculator should be shown in the course details page * can_access_proctored_exams: Whether the user is eligible to access proctored exams * notes: An object containing note settings for the course * enabled: Boolean indicating whether edxnotes feature is enabled for the course * visible: Boolean indicating whether notes are visible in the course * marketing_url: The marketing URL for the course * overview: The overview HTML content for the course * license: The license for the course **Parameters:** requested_fields (optional) comma separated list: If set, then only those fields will be returned. username (optional) username to masquerade as (if requesting user is staff) **Returns** * 200 on success with above fields. * 400 if an invalid parameter was sent or the username was not provided for an authenticated request. * 403 if a user who does not have permission to masquerade as another user specifies a username other than their own. * 404 if the course is not available or cannot be seen. parameters: [] responses: '200': description: '' tags: - courseware parameters: - name: course_key_string in: path required: true type: string /courseware/resume/{course_key_string}: get: operationId: courseware_resume_read description: Return response to a GET request. parameters: [] responses: '200': description: '' tags: - courseware parameters: - name: course_key_string in: path required: true type: string /courseware/sequence/{usage_key_string}: get: operationId: courseware_sequence_read description: Return response to a GET request. parameters: [] responses: '200': description: '' tags: - courseware parameters: - name: usage_key_string in: path required: true type: string /credit/v1/courses/: get: operationId: credit_v1_courses_list description: CreditCourse endpoints. parameters: [] responses: '200': description: '' schema: type: array items: $ref: '#/definitions/CreditCourse' tags: - credit post: operationId: credit_v1_courses_create description: CreditCourse endpoints. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CreditCourse' responses: '201': description: '' schema: $ref: '#/definitions/CreditCourse' tags: - credit parameters: [] /credit/v1/courses/{course_key}/: get: operationId: credit_v1_courses_read description: CreditCourse endpoints. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/CreditCourse' tags: - credit put: operationId: credit_v1_courses_update description: Create/update course modes for a course. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CreditCourse' responses: '200': description: '' schema: $ref: '#/definitions/CreditCourse' tags: - credit patch: operationId: credit_v1_courses_partial_update description: CreditCourse endpoints. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CreditCourse' responses: '200': description: '' schema: $ref: '#/definitions/CreditCourse' tags: - credit parameters: - name: course_key in: path required: true type: string pattern: (?:[^/+]+(/|\+)[^/+]+(/|\+)[^/?]+) /credit/v1/eligibility/: get: operationId: credit_v1_eligibility_list description: Returns eligibility for a user-course combination. parameters: [] responses: '200': description: '' schema: type: array items: $ref: '#/definitions/CreditEligibility' tags: - credit parameters: [] /credit/v1/providers/: get: operationId: credit_v1_providers_list description: Credit provider endpoints. parameters: [] responses: '200': description: '' schema: type: array items: $ref: '#/definitions/CreditProvider' tags: - credit parameters: [] /credit/v1/providers/{provider_id}/: get: operationId: credit_v1_providers_read description: Credit provider endpoints. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/CreditProvider' tags: - credit parameters: - name: provider_id in: path description: Unique identifier for this credit provider. Only alphanumeric characters and hyphens (-) are allowed. The identifier is case-sensitive. required: true type: string pattern: '[a-z,A-Z,0-9,\-]+' /credit/v1/providers/{provider_id}/callback/: post: operationId: credit_v1_providers_callback_create description: POST handler. parameters: [] responses: '201': description: '' tags: - credit parameters: - name: provider_id in: path required: true type: string /credit/v1/providers/{provider_id}/request/: post: operationId: credit_v1_providers_request_create description: POST handler. parameters: [] responses: '201': description: '' tags: - credit parameters: - name: provider_id in: path required: true type: string /dashboard/v0/programs/: get: operationId: dashboard_v0_programs_list description: |- For a learner, get list of enrolled programs with progress. If an enterprise UUID ias provided, filter out all non-enterprise enrollments for the learner. **Example Request** GET /api/dashboard/v1/programs/{enterprise_uuid}/ **Parameters** * `enterprise_uuid`: UUID of an enterprise customer. **Example Response** [ { "uuid": "ff41a5eb-2a73-4933-8e80-a1c66068ed2c", "title": "Demonstration Program", "type": "MicroMasters", "banner_image": { "large": { "url": "http://example.com/images/foo.large.jpg", "width": 1440, "height": 480 }, "medium": { "url": "http://example.com/images/foo.medium.jpg", "width": 726, "height": 242 }, "small": { "url": "http://example.com/images/foo.small.jpg", "width": 435, "height": 145 }, "x-small": { "url": "http://example.com/images/foo.x-small.jpg", "width": 348, "height": 116 } }, "authoring_organizations": [ { "key": "example" } ], "progress": { "uuid": "ff41a5eb-2a73-4933-8e80-a1c66068ed2c", "completed": 0, "in_progress": 0, "not_started": 2 } } ] parameters: [] responses: '200': description: '' tags: - dashboard parameters: [] /dashboard/v0/programs/{enterprise_uuid}/: get: operationId: dashboard_v0_programs_read description: |- For a learner, get list of enrolled programs with progress. If an enterprise UUID ias provided, filter out all non-enterprise enrollments for the learner. **Example Request** GET /api/dashboard/v1/programs/{enterprise_uuid}/ **Parameters** * `enterprise_uuid`: UUID of an enterprise customer. **Example Response** [ { "uuid": "ff41a5eb-2a73-4933-8e80-a1c66068ed2c", "title": "Demonstration Program", "type": "MicroMasters", "banner_image": { "large": { "url": "http://example.com/images/foo.large.jpg", "width": 1440, "height": 480 }, "medium": { "url": "http://example.com/images/foo.medium.jpg", "width": 726, "height": 242 }, "small": { "url": "http://example.com/images/foo.small.jpg", "width": 435, "height": 145 }, "x-small": { "url": "http://example.com/images/foo.x-small.jpg", "width": 348, "height": 116 } }, "authoring_organizations": [ { "key": "example" } ], "progress": { "uuid": "ff41a5eb-2a73-4933-8e80-a1c66068ed2c", "completed": 0, "in_progress": 0, "not_started": 2 } } ] parameters: [] responses: '200': description: '' tags: - dashboard parameters: - name: enterprise_uuid in: path required: true type: string /dashboard/v0/programs/{program_uuid}/progress_details/: get: operationId: dashboard_v0_programs_progress_details_list summary: Retrieves progress details of a learner in a specified program. description: |- **Example Request** GET api/dashboard/v1/programs/{program_uuid}/progress_details/ **Parameters** * `program_uuid`: A string representation of the uuid of the program. **Response Values** If the request for information about the program is successful, an HTTP 200 "OK" response is returned. The HTTP 200 response has the following values. * `urls`: Urls to enroll/purchase a course or view program record. * `program_data`: Holds meta information about the program. * `course_data`: Learner's progress details for all courses in the program (in-progress/remaining/completed). * `certificate_data`: Details about learner's certificates status for all courses in the program and the program itself. * `industry_pathways`: Industry pathways for the program, comes under additional credit opportunities. * `credit_pathways`: Credit pathways for the program, comes under additional credit opportunities. **Example Response** { "urls": { "program_listing_url": "/dashboard/programs/", "track_selection_url": "/course_modes/choose/", "commerce_api_url": "/api/commerce/v1/baskets/", "buy_button_url": "http://example.com/basket/add/?", "program_record_url": "https://example.com/records/programs/8675309" }, "program_data": { "uuid": "a156a6e2-de91-4ce7-947a-888943e6b12a", "title": "Demonstration Program", "subtitle": "", "type": "MicroMasters", "status": "active", "marketing_slug": "demo-program", "marketing_url": "micromasters/demo-program", "authoring_organizations": [], "card_image_url": "http://example.com/asset-v1:DemoX+Demo_Course.jpg", "is_program_eligible_for_one_click_purchase": false, "pathway_ids": [ 1, 2 ], "is_learner_eligible_for_one_click_purchase": false, "skus": ["AUD90210"], }, "course_data": { "uuid": "a156a6e2-de91-4ce7-947a-888943e6b12a", "completed": [], "in_progress": [], "not_started": [ { "key": "example+DemoX", "uuid": "fe1a9ad4-a452-45cd-80e5-9babd3d43f96", "title": "Demonstration Course", "course_runs": [], "entitlements": [], "owners": [], "image": "", "short_description": "", "type": "457f07ec-a78f-45b4-ba09-5fb176520d8a", } ], }, "certificate_data": [{ "type": "course", "title": "Demo Course", 'url': "/certificates/8675309", }], "industry_pathways": [ { "id": 2, "uuid": "1b8fadf1-f6aa-4282-94e3-325b922a027f", "name": "Demo Industry Pathway", "org_name": "example", "email": "example@example.com", "description": "Sample demo industry pathway", "destination_url": "http://example.edu/online/pathways/example-methods", "pathway_type": "industry", "program_uuids": [ "a156a6e2-de91-4ce7-947a-888943e6b12a" ] } ], "credit_pathways": [ { "id": 1, "uuid": "86b9701a-61e6-48a2-92eb-70a824521c1f", "name": "Demo Credit Pathway", "org_name": "example", "email": "example@example.com", "description": "Sample demo credit pathway!", "destination_url": "http://example.edu/online/pathways/example-thinking", "pathway_type": "credit", "program_uuids": [ "a156a6e2-de91-4ce7-947a-888943e6b12a" ] } ] } parameters: [] responses: '200': description: '' tags: - dashboard parameters: - name: program_uuid in: path required: true type: string /discounts/course/{course_key_string}: get: operationId: discounts_course_read description: Return the discount percent, if the user has appropriate permissions. parameters: [] responses: '200': description: '' tags: - discounts parameters: - name: course_key_string in: path required: true type: string /discounts/user/{user_id}/course/{course_key_string}: get: operationId: discounts_user_course_read description: Return the discount percent, if the user has appropriate permissions. parameters: [] responses: '200': description: '' tags: - discounts parameters: - name: user_id in: path required: true type: string - name: course_key_string in: path required: true type: string /discussion/v1/accounts/replace_username: post: operationId: discussion_v1_accounts_replace_username_create description: Implements the username replacement endpoint parameters: [] responses: '201': description: '' tags: - discussion parameters: [] /discussion/v1/accounts/retire_forum/: post: operationId: discussion_v1_accounts_retire_forum_create description: Implements the retirement endpoint. parameters: [] responses: '201': description: '' tags: - discussion parameters: [] /discussion/v1/bulk_delete_user_posts/{course_id}: post: operationId: discussion_v1_bulk_delete_user_posts_create description: Implements the delete user posts endpoint. parameters: [] responses: '201': description: '' tags: - discussion parameters: - name: course_id in: path required: true type: string /discussion/v1/comments/: get: operationId: discussion_v1_comments_list summary: |- Implements the GET method for the list endpoint as described in the class docstring. description: |- 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. parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion post: operationId: discussion_v1_comments_create description: |- Implements the POST method for the list endpoint as described in the class docstring. parameters: [] responses: '201': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion parameters: [] /discussion/v1/comments/{comment_id}/: get: operationId: discussion_v1_comments_read description: Implements the GET method for comments against response ID parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion patch: operationId: discussion_v1_comments_partial_update description: |- Implements the PATCH method for the instance endpoint as described in the class docstring. parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion delete: operationId: discussion_v1_comments_delete description: |- Implements the DELETE method for the instance endpoint as described in the class docstring parameters: [] responses: '204': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion parameters: - name: comment_id in: path required: true type: string /discussion/v1/course_topics/{course_id}: get: operationId: discussion_v1_course_topics_read description: Implements the GET method as described in the class docstring. parameters: [] responses: '200': description: '' tags: - discussion parameters: - name: course_id in: path required: true type: string /discussion/v1/courses/{course_id}: get: operationId: discussion_v1_courses_read summary: Retrieve general discussion metadata for a course. description: |- **Example Requests**: GET /api/discussion/v1/courses/course-v1:ExampleX+Subject101+2015 parameters: - name: course_id in: path description: Course ID type: string required: true responses: '200': description: '' schema: $ref: '#/definitions/CourseMetadataSerailizer' '401': description: The requester is not authenticated. '403': description: The requester cannot access the specified course. '404': description: The requested course does not exist. tags: - discussion parameters: - name: course_id in: path required: true type: string /discussion/v1/courses/{course_id}/learner/: get: operationId: discussion_v1_courses_learner_list description: Implements the GET method as described in the class docstring. parameters: [] responses: '200': description: '' tags: - discussion parameters: - name: course_id in: path required: true type: string /discussion/v1/courses/{course_id}/roles/{rolename}/: get: operationId: discussion_v1_courses_roles_read description: Implement a handler for the GET method. parameters: [] responses: '200': description: '' tags: - discussion post: operationId: discussion_v1_courses_roles_create description: Implement a handler for the POST method. parameters: [] responses: '201': description: '' tags: - discussion parameters: - name: course_id in: path required: true type: string - name: rolename in: path required: true type: string /discussion/v1/courses/{course_id}/settings: get: operationId: discussion_v1_courses_settings_list description: Implement a handler for the GET method. parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion patch: operationId: discussion_v1_courses_settings_partial_update description: Implement a handler for the PATCH method. parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion parameters: - name: course_id in: path required: true type: string /discussion/v1/courses/{course_id}/upload: post: operationId: discussion_v1_courses_upload_create description: Handles a file upload. parameters: [] responses: '201': description: '' tags: - discussion parameters: - name: course_id in: path required: true type: string /discussion/v1/courses/{course_key_string}/activity_stats: get: operationId: discussion_v1_courses_activity_stats_list description: Implements the GET method as described in the class docstring. parameters: [] responses: '200': description: '' tags: - discussion parameters: - name: course_key_string in: path required: true type: string /discussion/v1/threads/: get: operationId: discussion_v1_threads_list description: |- Implements the GET method for the list endpoint as described in the class docstring. parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion post: operationId: discussion_v1_threads_create description: |- Implements the POST method for the list endpoint as described in the class docstring. parameters: [] responses: '201': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion parameters: [] /discussion/v1/threads/{thread_id}/: get: operationId: discussion_v1_threads_read description: Implements the GET method for thread ID parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion patch: operationId: discussion_v1_threads_partial_update description: |- Implements the PATCH method for the instance endpoint as described in the class docstring. parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion delete: operationId: discussion_v1_threads_delete description: |- Implements the DELETE method for the instance endpoint as described in the class docstring parameters: [] responses: '204': description: '' consumes: - application/json - application/merge-patch+json tags: - discussion parameters: - name: thread_id in: path required: true type: string /discussion/v2/course_topics/{course_id}: get: operationId: discussion_v2_course_topics_read summary: '**Use Cases**' description: |2- 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: - name: course_id in: path description: Course ID type: string required: true - name: topic_id in: query description: Comma-separated list of topic ids to filter type: string - name: order_by in: query description: Sort ordering for topics required: false type: string enum: - course_structure - activity - name responses: '200': description: '' schema: $ref: '#/definitions/DiscussionTopicSerializerV2' '401': description: The requester is not authenticated. '403': description: The requester cannot access the specified course. '404': description: The requested course does not exist. tags: - discussion parameters: - name: course_id in: path required: true type: string /discussion/v2/courses/{course_id}: get: operationId: discussion_v2_courses_read summary: Retrieve general discussion metadata for a course. description: |- **Example Requests**: GET /api/discussion/v2/courses/course-v1:ExampleX+Subject101+2015 parameters: - name: course_id in: path description: Course ID type: string required: true responses: '200': description: '' schema: $ref: '#/definitions/CourseMetadataSerailizer' '401': description: The requester is not authenticated. '403': description: The requester cannot access the specified course. '404': description: The requested course does not exist. tags: - discussion parameters: - name: course_id in: path required: true type: string /discussion/v3/course_topics/{course_id}: get: operationId: discussion_v3_course_topics_read summary: '**Use Cases**' description: |- Retrieve the topic listing for a course. **Example Requests**: GET /api/discussion/v3/course_topics/course-v1:ExampleX+Subject101+2015 parameters: [] responses: '200': description: '' tags: - discussion parameters: - name: course_id in: path required: true type: string /edx_proctoring/proctoring_review_callback/: post: operationId: edx_proctoring_proctoring_review_callback_create description: Post callback handler parameters: [] responses: '201': description: '' tags: - edx_proctoring parameters: [] /edx_proctoring/v1/instructor/{course_id}: get: operationId: edx_proctoring_v1_instructor_read description: Redirect to dashboard for a given course and optional exam_id parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string /edx_proctoring/v1/instructor/{course_id}/{exam_id}: get: operationId: edx_proctoring_v1_instructor_read description: Redirect to dashboard for a given course and optional exam_id parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string - name: exam_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/active_attempt: get: operationId: edx_proctoring_v1_proctored_exam_active_attempt_list description: HTTP GET handler. Returns active attempt parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: [] /edx_proctoring/v1/proctored_exam/active_exams_for_user: get: operationId: edx_proctoring_v1_proctored_exam_active_exams_for_user_list description: Returns the get_active_exams_for_user parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: [] /edx_proctoring/v1/proctored_exam/allowance: get: operationId: edx_proctoring_v1_proctored_exam_allowance_list description: |- HTTP GET handler. Get all allowances for a course. Course and Global staff can view both timed and proctored exam allowances. parameters: [] responses: '200': description: '' tags: - edx_proctoring put: operationId: edx_proctoring_v1_proctored_exam_allowance_update description: HTTP GET handler. Adds or updates Allowance parameters: [] responses: '200': description: '' tags: - edx_proctoring delete: operationId: edx_proctoring_v1_proctored_exam_allowance_delete description: HTTP DELETE handler. Removes Allowance. parameters: [] responses: '204': description: '' tags: - edx_proctoring parameters: [] /edx_proctoring/v1/proctored_exam/attempt: get: operationId: edx_proctoring_v1_proctored_exam_attempt_list description: HTTP GET Handler. Returns the status of the exam attempt. parameters: [] responses: '200': description: '' tags: - edx_proctoring post: operationId: edx_proctoring_v1_proctored_exam_attempt_create description: HTTP POST handler. To create an exam attempt. parameters: [] responses: '201': description: '' tags: - edx_proctoring parameters: [] /edx_proctoring/v1/proctored_exam/attempt/course_id/{course_id}: get: operationId: edx_proctoring_v1_proctored_exam_attempt_course_id_read description: HTTP GET handler. Returns exam with attempt and active attempt parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/attempt/grouped/course_id/{course_id}: get: operationId: edx_proctoring_v1_proctored_exam_attempt_grouped_course_id_read description: HTTP GET Handler. parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/attempt/grouped/course_id/{course_id}/search/{search_by}: get: operationId: edx_proctoring_v1_proctored_exam_attempt_grouped_course_id_search_read description: HTTP GET Handler. parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string - name: search_by in: path required: true type: string /edx_proctoring/v1/proctored_exam/attempt/{attempt_id}: get: operationId: edx_proctoring_v1_proctored_exam_attempt_read description: HTTP GET Handler. Returns the status of the exam attempt. parameters: [] responses: '200': description: '' tags: - edx_proctoring put: operationId: edx_proctoring_v1_proctored_exam_attempt_update description: HTTP PUT handler to update exam attempt status based on an action. parameters: [] responses: '200': description: '' tags: - edx_proctoring delete: operationId: edx_proctoring_v1_proctored_exam_attempt_delete description: HTTP DELETE handler. Removes an exam attempt. parameters: [] responses: '204': description: '' tags: - edx_proctoring parameters: - name: attempt_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/attempt/{attempt_id}/review_status: put: operationId: edx_proctoring_v1_proctored_exam_attempt_review_status_update description: Update the is_status_acknowledged flag for the specific attempt parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: attempt_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/attempt/{external_id}/ready: post: operationId: edx_proctoring_v1_proctored_exam_attempt_ready_create description: Post callback handler parameters: [] responses: '201': description: '' tags: - edx_proctoring parameters: - name: external_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/attempt/{external_id}/reviewed: post: operationId: edx_proctoring_v1_proctored_exam_attempt_reviewed_create description: |- Called when 3rd party proctoring service has finished its review of an attempt. parameters: [] responses: '201': description: '' tags: - edx_proctoring parameters: - name: external_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/bulk_allowance: put: operationId: edx_proctoring_v1_proctored_exam_bulk_allowance_update description: HTTP PUT handler. Adds or updates Allowances for many exams and students parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: [] /edx_proctoring/v1/proctored_exam/exam: get: operationId: edx_proctoring_v1_proctored_exam_exam_list description: |- HTTP GET handler. Scenarios: by exam_id: calls get_exam_by_id() by course_id, content_id: get_exam_by_content_id() parameters: [] responses: '200': description: '' tags: - edx_proctoring post: operationId: edx_proctoring_v1_proctored_exam_exam_create description: Http POST handler. Creates an exam. parameters: [] responses: '201': description: '' tags: - edx_proctoring put: operationId: edx_proctoring_v1_proctored_exam_exam_update description: |- HTTP PUT handler. To update an exam. calls the update_exam parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: [] /edx_proctoring/v1/proctored_exam/exam/course_id/{course_id}: get: operationId: edx_proctoring_v1_proctored_exam_exam_course_id_read description: |- HTTP GET handler. Scenarios: by exam_id: calls get_exam_by_id() by course_id, content_id: get_exam_by_content_id() parameters: [] responses: '200': description: '' tags: - edx_proctoring post: operationId: edx_proctoring_v1_proctored_exam_exam_course_id_create description: Http POST handler. Creates an exam. parameters: [] responses: '201': description: '' tags: - edx_proctoring put: operationId: edx_proctoring_v1_proctored_exam_exam_course_id_update description: |- HTTP PUT handler. To update an exam. calls the update_exam parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/exam/course_id/{course_id}/content_id/{content_id}: get: operationId: edx_proctoring_v1_proctored_exam_exam_course_id_content_id_read description: |- HTTP GET handler. Scenarios: by exam_id: calls get_exam_by_id() by course_id, content_id: get_exam_by_content_id() parameters: [] responses: '200': description: '' tags: - edx_proctoring post: operationId: edx_proctoring_v1_proctored_exam_exam_course_id_content_id_create description: Http POST handler. Creates an exam. parameters: [] responses: '201': description: '' tags: - edx_proctoring put: operationId: edx_proctoring_v1_proctored_exam_exam_course_id_content_id_update description: |- HTTP PUT handler. To update an exam. calls the update_exam parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string - name: content_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/exam/exam_id/{exam_id}: get: operationId: edx_proctoring_v1_proctored_exam_exam_exam_id_read description: |- HTTP GET handler. Scenarios: by exam_id: calls get_exam_by_id() by course_id, content_id: get_exam_by_content_id() parameters: [] responses: '200': description: '' tags: - edx_proctoring post: operationId: edx_proctoring_v1_proctored_exam_exam_exam_id_create description: Http POST handler. Creates an exam. parameters: [] responses: '201': description: '' tags: - edx_proctoring put: operationId: edx_proctoring_v1_proctored_exam_exam_exam_id_update description: |- HTTP PUT handler. To update an exam. calls the update_exam parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: exam_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/exam_id/{exam_id}/user_id/{user_id}/reset_attempts: delete: operationId: edx_proctoring_v1_proctored_exam_exam_id_user_id_reset_attempts_delete description: HTTP DELETE handler, deletes all attempts for a given exam and username parameters: [] responses: '204': description: '' tags: - edx_proctoring parameters: - name: exam_id in: path required: true type: string - name: user_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/exam_registration/course_id/{course_id}: patch: operationId: edx_proctoring_v1_proctored_exam_exam_registration_course_id_partial_update description: |- Create or update a list of all active exams. Exams not included in the registration payload will be deactivated parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/review_policy/exam_id/{exam_id}/: get: operationId: edx_proctoring_v1_proctored_exam_review_policy_exam_id_read description: HTTP GET handler. Returns review policy for proctored exam. parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: exam_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/settings/exam_id/{exam_id}/: get: operationId: edx_proctoring_v1_proctored_exam_settings_exam_id_read description: HTTP GET handler. Returns proctoring_settings and exam_proctoring_backend config for proctored exam. parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: exam_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/{course_id}/allowance: get: operationId: edx_proctoring_v1_proctored_exam_allowance_list description: |- HTTP GET handler. Get all allowances for a course. Course and Global staff can view both timed and proctored exam allowances. parameters: [] responses: '200': description: '' tags: - edx_proctoring put: operationId: edx_proctoring_v1_proctored_exam_allowance_update description: HTTP GET handler. Adds or updates Allowance parameters: [] responses: '200': description: '' tags: - edx_proctoring delete: operationId: edx_proctoring_v1_proctored_exam_allowance_delete description: HTTP DELETE handler. Removes Allowance. parameters: [] responses: '204': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/{course_id}/bulk_allowance: put: operationId: edx_proctoring_v1_proctored_exam_bulk_allowance_update description: HTTP PUT handler. Adds or updates Allowances for many exams and students parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string /edx_proctoring/v1/proctored_exam/{course_id}/grouped/allowance: get: operationId: edx_proctoring_v1_proctored_exam_grouped_allowance_list description: HTTP GET Handler. parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string /edx_proctoring/v1/retire_backend_user/{user_id}/: post: operationId: edx_proctoring_v1_retire_backend_user_create description: |- Deletes all user data for the particular user_id from all configured backends parameters: [] responses: '201': description: '' tags: - edx_proctoring parameters: - name: user_id in: path required: true type: string /edx_proctoring/v1/retire_user/{user_id}/: post: operationId: edx_proctoring_v1_retire_user_create description: Obfuscates all PII for a given user_id parameters: [] responses: '201': description: '' tags: - edx_proctoring parameters: - name: user_id in: path required: true type: string /edx_proctoring/v1/user_onboarding/status: get: operationId: edx_proctoring_v1_user_onboarding_status_list description: HTTP GET handler. Returns the learner's onboarding status. parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: [] /edx_proctoring/v1/user_onboarding/status/course_id/{course_id}: get: operationId: edx_proctoring_v1_user_onboarding_status_course_id_read description: HTTP GET handler. parameters: [] responses: '200': description: '' tags: - edx_proctoring parameters: - name: course_id in: path required: true type: string /edxnotes/v1/retire_user/: post: operationId: edxnotes_v1_retire_user_create description: Implements the retirement endpoint. parameters: [] responses: '201': description: '' tags: - edxnotes parameters: [] /embargo/v1/course_access/: get: operationId: embargo_v1_course_access_list description: GET /api/embargo/v1/course_access/ parameters: [] responses: '200': description: '' tags: - embargo parameters: [] /enrollment/v1/course/{course_id}: get: operationId: enrollment_v1_course_read summary: Read enrollment information for a particular course. description: HTTP Endpoint for retrieving course level enrollment information. parameters: [] responses: '200': description: '' tags: - enrollment parameters: - name: course_id in: path required: true type: string /enrollment/v1/enrollment: get: operationId: enrollment_v1_enrollment_list summary: Gets a list of all course enrollments for a user. description: |- 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. parameters: [] responses: '200': description: '' tags: - enrollment post: operationId: enrollment_v1_enrollment_create summary: Enrolls the currently logged-in user in a course. description: |- 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. parameters: [] responses: '201': description: '' tags: - enrollment parameters: [] /enrollment/v1/enrollment/{course_id}: get: operationId: enrollment_v1_enrollment_read summary: Create, read, or update enrollment information for a user. description: |- 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: [] responses: '200': description: '' tags: - enrollment parameters: - name: course_id in: path required: true type: string /enrollment/v1/enrollment/{username},{course_id}: get: operationId: enrollment_v1_enrollment_read summary: Create, read, or update enrollment information for a user. description: |- 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: [] responses: '200': description: '' tags: - enrollment parameters: - name: username in: path required: true type: string - name: course_id in: path required: true type: string /enrollment/v1/enrollment_allowed/: get: operationId: enrollment_v1_enrollment_allowed_list summary: Returns the enrollments allowed for a given user email. description: |- **Example Requests** GET /api/enrollment/v1/enrollment_allowed?email=user@example.com **Parameters** - `email` (optional, string, _query_params_) - defaults to the calling user if not provided. **Responses** - 200: Success. - 403: Forbidden, you need to be staff. parameters: [] responses: '200': description: '' tags: - enrollment post: operationId: enrollment_v1_enrollment_allowed_create summary: Creates an enrollment allowed for a given user email and course id. description: |- **Example Request** POST /api/enrollment/v1/enrollment_allowed/ parameters: [] responses: '201': description: '' tags: - enrollment delete: operationId: enrollment_v1_enrollment_allowed_delete summary: Deletes an enrollment allowed for a given user email and course id. description: |- **Example Request** DELETE /api/enrollment/v1/enrollment_allowed/ parameters: [] responses: '204': description: '' tags: - enrollment parameters: [] /enrollment/v1/enrollments/: get: operationId: enrollment_v1_enrollments_list summary: '**Use Cases**' description: |- Get a list of all course enrollments, optionally filtered by a course ID or list of usernames. **Example Requests** GET /api/enrollment/v1/enrollments GET /api/enrollment/v1/enrollments?course_id={course_id} GET /api/enrollment/v1/enrollments?course_ids={course_id},{course_id},{course_id} GET /api/enrollment/v1/enrollments?username={username},{username},{username} GET /api/enrollment/v1/enrollments?course_id={course_id}&username={username} GET /api/enrollment/v1/enrollments?email={email},{email} **Query Parameters for GET** * course_id: Filters the result to course enrollments for the course corresponding to the given course ID. The value must be URL encoded. Optional. * course_ids: List of comma-separated course IDs. Filters the result to course enrollments for the courses corresponding to the given course IDs. Course IDs could be course run IDs or course IDs. The value must be URL encoded. Optional. * username: List of comma-separated usernames. Filters the result to the course enrollments of the given users. Optional. * email: List of comma-separated emails. Filters the result to the course enrollments of the given users. Optional. * page_size: Number of results to return per page. Optional. * page: Page number to retrieve. Optional. **Response Values** If the request for information about the course enrollments is successful, an HTTP 200 "OK" response is returned. The HTTP 200 response has the following values. * results: A list of the course enrollments matching the request. * created: Date and time when the course enrollment was created. * mode: Mode for the course enrollment. * is_active: Whether the course enrollment is active or not. * user: Username of the user in the course enrollment. * course_id: Course ID of the course in the course enrollment. * next: The URL to the next page of results, or null if this is the last page. * previous: The URL to the next page of results, or null if this is the first page. If the user is not logged in, a 401 error is returned. If the user is not global staff, a 403 error is returned. If the specified course_id is not valid or any of the specified usernames are not valid, a 400 error is returned. If the specified course_id does not correspond to a valid course or if all the specified usernames do not correspond to valid users, an HTTP 200 "OK" response is returned with an empty 'results' field. parameters: - name: cursor in: query description: The pagination cursor value. required: false type: string - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - results type: object properties: next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/CourseEnrollmentsApiList' tags: - enrollment parameters: [] /enrollment/v1/roles/: get: operationId: enrollment_v1_roles_list description: Gets a list of all roles for the currently logged-in user, filtered by course_id if supplied parameters: [] responses: '200': description: '' tags: - enrollment parameters: [] /enrollment/v1/unenroll/: post: operationId: enrollment_v1_unenroll_create description: Unenrolls the specified user from all courses. parameters: [] responses: '201': description: '' tags: - enrollment parameters: [] /entitlements/v1/entitlements/: get: operationId: entitlements_v1_entitlements_list description: |- Override the list method to expire records that are past the policy and requested via the API before returning those records. parameters: - name: uuid in: query description: '' required: false type: string - name: user in: query description: '' required: false type: string - name: course_uuid in: query description: '' required: false type: string - name: expired_at__isnull in: query description: '' required: false type: string - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/CourseEntitlement' tags: - entitlements post: operationId: entitlements_v1_entitlements_create description: ViewSet for the Entitlements API. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CourseEntitlement' responses: '201': description: '' schema: $ref: '#/definitions/CourseEntitlement' tags: - entitlements parameters: [] /entitlements/v1/entitlements/{uuid}/: get: operationId: entitlements_v1_entitlements_read description: |- Override the retrieve method to expire a record that is past the policy and is requested via the API before returning that record. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/CourseEntitlement' tags: - entitlements put: operationId: entitlements_v1_entitlements_update description: ViewSet for the Entitlements API. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CourseEntitlement' responses: '200': description: '' schema: $ref: '#/definitions/CourseEntitlement' tags: - entitlements patch: operationId: entitlements_v1_entitlements_partial_update description: ViewSet for the Entitlements API. parameters: - name: data in: body required: true schema: $ref: '#/definitions/CourseEntitlement' responses: '200': description: '' schema: $ref: '#/definitions/CourseEntitlement' tags: - entitlements delete: operationId: entitlements_v1_entitlements_delete description: ViewSet for the Entitlements API. parameters: [] responses: '204': description: '' tags: - entitlements parameters: - name: uuid in: path required: true type: string pattern: '[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}' /entitlements/v1/entitlements/{uuid}/enrollments: post: operationId: entitlements_v1_entitlements_enrollments_create description: |- 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: [] responses: '201': description: '' tags: - entitlements delete: operationId: entitlements_v1_entitlements_enrollments_delete summary: On DELETE call to this API we will unenroll the course enrollment for the provided uuid description: |- If is_refund parameter is provided then unenroll the user, set Entitlement expiration, and issue a refund parameters: [] responses: '204': description: '' tags: - entitlements parameters: - name: uuid in: path required: true type: string format: uuid /experiments/v0/custom/REV-934/: get: operationId: experiments_v0_custom_REV-934_list description: Return the if the course should be upsold in the mobile app, if the user has appropriate permissions. parameters: [] responses: '200': description: '' tags: - experiments parameters: [] /experiments/v0/custom/userMetadata/{username},{course_id}: get: operationId: experiments_v0_custom_userMetadata_read description: Return user-metadata for the given course and user parameters: [] responses: '200': description: '' tags: - experiments parameters: - name: username in: path required: true type: string - name: course_id in: path required: true type: string /experiments/v0/data/: get: operationId: experiments_v0_data_list description: '' parameters: - name: experiment_id in: query description: '' required: false type: string - name: key in: query description: '' required: false type: string - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/ExperimentData' tags: - experiments post: operationId: experiments_v0_data_create description: '' parameters: - name: data in: body required: true schema: $ref: '#/definitions/ExperimentDataCreate' responses: '201': description: '' schema: $ref: '#/definitions/ExperimentDataCreate' tags: - experiments put: operationId: experiments_v0_data_update description: '' parameters: - name: data in: body required: true schema: $ref: '#/definitions/ExperimentData' responses: '200': description: '' schema: $ref: '#/definitions/ExperimentData' tags: - experiments parameters: [] /experiments/v0/data/{id}/: get: operationId: experiments_v0_data_read description: '' parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/ExperimentData' tags: - experiments put: operationId: experiments_v0_data_update description: '' parameters: - name: data in: body required: true schema: $ref: '#/definitions/ExperimentData' responses: '200': description: '' schema: $ref: '#/definitions/ExperimentData' tags: - experiments patch: operationId: experiments_v0_data_partial_update description: '' parameters: - name: data in: body required: true schema: $ref: '#/definitions/ExperimentData' responses: '200': description: '' schema: $ref: '#/definitions/ExperimentData' tags: - experiments delete: operationId: experiments_v0_data_delete description: '' parameters: [] responses: '204': description: '' tags: - experiments parameters: - name: id in: path description: A unique integer value identifying this Experiment Data. required: true type: integer /experiments/v0/key-value/: get: operationId: experiments_v0_key-value_list description: '' parameters: - name: experiment_id in: query description: '' required: false type: string - name: key in: query description: '' required: false type: string - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/ExperimentKeyValue' tags: - experiments post: operationId: experiments_v0_key-value_create description: '' parameters: - name: data in: body required: true schema: $ref: '#/definitions/ExperimentKeyValue' responses: '201': description: '' schema: $ref: '#/definitions/ExperimentKeyValue' tags: - experiments parameters: [] /experiments/v0/key-value/{id}/: get: operationId: experiments_v0_key-value_read description: '' parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/ExperimentKeyValue' tags: - experiments put: operationId: experiments_v0_key-value_update description: '' parameters: - name: data in: body required: true schema: $ref: '#/definitions/ExperimentKeyValue' responses: '200': description: '' schema: $ref: '#/definitions/ExperimentKeyValue' tags: - experiments patch: operationId: experiments_v0_key-value_partial_update description: '' parameters: - name: data in: body required: true schema: $ref: '#/definitions/ExperimentKeyValue' responses: '200': description: '' schema: $ref: '#/definitions/ExperimentKeyValue' tags: - experiments delete: operationId: experiments_v0_key-value_delete description: '' parameters: [] responses: '204': description: '' tags: - experiments parameters: - name: id in: path description: A unique integer value identifying this Experiment Key-Value Pair. required: true type: integer /grades/v1/courses/: get: operationId: grades_v1_courses_list description: Gets a course progress status. parameters: - name: cursor in: query description: The pagination cursor value. required: false type: string - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - grades parameters: [] /grades/v1/courses/{course_id}/: get: operationId: grades_v1_courses_read description: Gets a course progress status. parameters: [] responses: '200': description: '' tags: - grades parameters: - name: course_id in: path required: true type: string /grades/v1/gradebook/{course_id}/: get: operationId: grades_v1_gradebook_read description: |- 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: [] responses: '200': description: '' tags: - grades parameters: - name: course_id in: path required: true type: string /grades/v1/gradebook/{course_id}/bulk-update: post: operationId: grades_v1_gradebook_bulk-update_create description: |- 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: [] responses: '201': description: '' tags: - grades parameters: - name: course_id in: path required: true type: string /grades/v1/gradebook/{course_id}/grading-info: get: operationId: grades_v1_gradebook_grading-info_list description: |- 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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - grades parameters: - name: course_id in: path required: true type: string /grades/v1/policy/courses/{course_id}/: get: operationId: grades_v1_policy_courses_list summary: '**Use Case**' description: |- 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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - grades parameters: - name: course_id in: path required: true type: string /grades/v1/section_grades_breakdown/: get: operationId: grades_v1_section_grades_breakdown_list summary: '**Use Cases**' description: |- 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. parameters: - name: cursor in: query description: The pagination cursor value. required: false type: string - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - grades parameters: [] /grades/v1/submission_history/{course_id}/: get: operationId: grades_v1_submission_history_read description: |- Get submission history details. This submission history is related to only ProblemBlock and it doesn't support LegacyLibraryContentBlock or ContentLibraries as of now. **Usecases**: Users with GlobalStaff status can retrieve everyone's submission history. **Example Requests**: GET /api/grades/v1/submission_history/{course_id} GET /api/grades/v1/submission_history/{course_id}/?username={username} **Query Parameters for GET** * course_id: Course id to retrieve submission history. * username: Single username for which this view will retrieve the submission history details. **Response Values**: If there's an error while getting the submission history an empty response will be returned. The submission history response has the following attributes: * Results: A list of submission history: * course_id: Course id * course_name: Course name * user: Username * problems: List of problems * location: problem location * name: problem's display name * submission_history: List of submission history * state: State of submission. * grade: Grade. * max_grade: Maximum possible grade. * data: problem's data. parameters: [] responses: '200': description: '' tags: - grades parameters: - name: course_id in: path required: true type: string /grades/v1/subsection/{subsection_id}/: get: operationId: grades_v1_subsection_read description: |- Returns subection grade data, override grade data and a history of changes made to a specific users specific subsection grade. parameters: [] responses: '200': description: '' tags: - grades parameters: - name: subsection_id in: path required: true type: string /instructor/v1/reports/{course_id}: get: operationId: instructor_v1_reports_read summary: List report CSV files that are available for download for this course. description: |- **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": "mock_file_name_1", "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 parameters: - name: course_id in: path description: ID for the course whose reports need to be listed. type: string required: true - name: report_name in: query description: Filter results to only return details of for the report with the specified name. type: string responses: '200': description: '' schema: $ref: '#/definitions/ReportDownloadsList' '401': description: The requesting user is not authenticated. '403': description: The requesting user lacks access to the course. '404': description: The requested course does not exist. tags: - instructor parameters: - name: course_id in: path required: true type: string /instructor/v1/reports/{course_id}/generate/problem_responses: post: operationId: instructor_v1_reports_generate_problem_responses_create summary: Initiate generation of a CSV file containing all student answers description: |- 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. parameters: - name: data in: body required: true schema: $ref: '#/definitions/ProblemResponseReportPostParams' - name: course_id in: path description: ID of the course for which report is to be generate. type: string required: true responses: '200': description: '' schema: $ref: '#/definitions/ProblemResponsesReportStatus' '400': description: The provided parameters were invalid. Make sure you've provided at least one valid usage key for `problem_locations`. '401': description: The requesting user is not authenticated. '403': description: The requesting user lacks access to the course. tags: - instructor parameters: - name: course_id in: path required: true type: string /instructor/v1/tasks/{course_id}: get: operationId: instructor_v1_tasks_read summary: List instructor tasks filtered by `course_id`. description: |- **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: - name: course_id in: path description: ID for the course whose tasks need to be listed. type: string required: true - name: problem_location_str in: query description: Filter instructor tasks to this problem location. type: string - name: unique_student_identifier in: query description: Filter tasks to a singe problem and a single student. Must be used in combination with `problem_location_str`. type: string responses: '200': description: '' schema: $ref: '#/definitions/InstructorTasksList' '401': description: The requesting user is not authenticated. '403': description: The requesting user lacks access to the course. '404': description: The requested course does not exist. tags: - instructor parameters: - name: course_id in: path required: true type: string /instructor/v2/courses/{course_id}: get: operationId: instructor_v2_courses_read summary: Retrieve comprehensive course information including metadata, enrollment statistics, description: |- dashboard configuration, and user permissions. **Use Cases** Retrieve comprehensive course metadata including enrollment counts, dashboard configuration, permissions, and navigation sections. **Example Requests** GET /api/instructor/v2/courses/{course_id} **Response Values** { "course_id": "course-v1:edX+DemoX+Demo_Course", "display_name": "Demonstration Course", "org": "edX", "course_number": "DemoX", "enrollment_start": "2013-02-05T00:00:00Z", "enrollment_end": null, "start": "2013-02-05T05:00:00Z", "end": "2024-12-31T23:59:59Z", "pacing": "instructor", "has_started": true, "has_ended": false, "total_enrollment": 150, "enrollment_counts": { "total": 150, "audit": 100, "verified": 40, "honor": 10 }, "num_sections": 12, "grade_cutoffs": "A is 0.9, B is 0.8, C is 0.7, D is 0.6", "course_errors": [], "studio_url": "https://studio.example.com/course/course-v1:edX+DemoX+2024", "permissions": { "admin": false, "instructor": true, "finance_admin": false, "sales_admin": false, "staff": true, "forum_admin": true, "data_researcher": false }, "tabs": [ { "tab_id": "courseware", "title": "Course", "url": "INSTRUCTOR_MICROFRONTEND_URL/courses/course-v1:edX+DemoX+2024/courseware" }, { "tab_id": "progress", "title": "Progress", "url": "INSTRUCTOR_MICROFRONTEND_URL/courses/course-v1:edX+DemoX+2024/progress" }, ], "disable_buttons": false, "analytics_dashboard_message": "To gain insights into student enrollment and participation..." } **Parameters** course_key: Course key for the course. **Returns** * 200: OK - Returns course metadata * 401: Unauthorized - User is not authenticated * 403: Forbidden - User lacks instructor permissions * 404: Not Found - Course does not exist parameters: - name: course_id in: path description: Course key for the course. type: string required: true responses: '200': description: '' schema: $ref: '#/definitions/CourseInformationSerializerV2' '401': description: The requesting user is not authenticated. '403': description: The requesting user lacks instructor access to the course. '404': description: The requested course does not exist. tags: - instructor parameters: - name: course_id in: path required: true type: string /instructor/v2/courses/{course_id}/change_due_date: post: operationId: instructor_v2_courses_change_due_date_create description: Grants a due date extension to a learner for a particular unit. parameters: [] responses: '201': description: '' tags: - instructor parameters: - name: course_id in: path required: true type: string /instructor/v2/courses/{course_id}/graded_subsections: get: operationId: instructor_v2_courses_graded_subsections_list description: Retrieves a list of graded subsections (units with due dates) within a specified course. parameters: [] responses: '200': description: '' tags: - instructor parameters: - name: course_id in: path required: true type: string /instructor/v2/courses/{course_id}/instructor_tasks: get: operationId: instructor_v2_courses_instructor_tasks_list summary: List instructor tasks for a course. description: List instructor tasks for a course. parameters: - name: course_id in: path description: Course key for the course. type: string required: true - name: problem_location_str in: query description: 'Optional: Filter tasks to a specific problem location.' type: string - name: unique_student_identifier in: query description: 'Optional: Filter tasks to a specific student (requires problem_location_str).' type: string responses: '200': description: '' schema: $ref: '#/definitions/InstructorTaskList' '400': description: Invalid parameters provided. '401': description: The requesting user is not authenticated. '403': description: The requesting user lacks instructor access to the course. '404': description: The requested course does not exist. tags: - instructor parameters: - name: course_id in: path required: true type: string /instructor_task/v1/schedules/{course_id}/bulk_email/: get: operationId: instructor_task_v1_schedules_bulk_email_list description: Read only view to list all scheduled bulk email messages for a course-run. parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/ScheduledBulkEmail' tags: - instructor_task parameters: - name: course_id in: path required: true type: string /instructor_task/v1/schedules/{course_id}/bulk_email/{schedule_id}: put: operationId: instructor_task_v1_schedules_bulk_email_update description: |- 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: - name: data in: body required: true schema: $ref: '#/definitions/ScheduledBulkEmail' responses: '200': description: '' schema: $ref: '#/definitions/ScheduledBulkEmail' tags: - instructor_task patch: operationId: instructor_task_v1_schedules_bulk_email_partial_update description: |- 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: - name: data in: body required: true schema: $ref: '#/definitions/ScheduledBulkEmail' responses: '200': description: '' schema: $ref: '#/definitions/ScheduledBulkEmail' tags: - instructor_task delete: operationId: instructor_task_v1_schedules_bulk_email_delete description: |- 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: [] responses: '204': description: '' tags: - instructor_task parameters: - name: course_id in: path required: true type: string - name: schedule_id in: path required: true type: string /learner_home/init/: get: operationId: learner_home_init_list description: Get masquerade user and proxy to init request parameters: [] responses: '200': description: '' tags: - learner_home parameters: [] /learner_home/mock/init/: get: operationId: learner_home_mock_init_read description: Returns static JSON authored in MOCK_DATA_FILE parameters: [] responses: '200': description: '' tags: - learner_home parameters: [] /learner_home/v1/programs/: get: operationId: learner_home_v1_programs_list description: |- For a learner, get list of enrolled programs with progress. If an enterprise UUID ias provided, filter out all non-enterprise enrollments for the learner. **Example Request** GET /api/dashboard/v1/programs/{enterprise_uuid}/ **Parameters** * `enterprise_uuid`: UUID of an enterprise customer. **Example Response** [ { "uuid": "ff41a5eb-2a73-4933-8e80-a1c66068ed2c", "title": "Demonstration Program", "type": "MicroMasters", "banner_image": { "large": { "url": "http://example.com/images/foo.large.jpg", "width": 1440, "height": 480 }, "medium": { "url": "http://example.com/images/foo.medium.jpg", "width": 726, "height": 242 }, "small": { "url": "http://example.com/images/foo.small.jpg", "width": 435, "height": 145 }, "x-small": { "url": "http://example.com/images/foo.x-small.jpg", "width": 348, "height": 116 } }, "authoring_organizations": [ { "key": "example" } ], "progress": { "uuid": "ff41a5eb-2a73-4933-8e80-a1c66068ed2c", "completed": 0, "in_progress": 0, "not_started": 2 } } ] parameters: [] responses: '200': description: '' tags: - learner_home parameters: [] /learner_home/v1/programs/{enterprise_uuid}/: get: operationId: learner_home_v1_programs_read description: |- For a learner, get list of enrolled programs with progress. If an enterprise UUID ias provided, filter out all non-enterprise enrollments for the learner. **Example Request** GET /api/dashboard/v1/programs/{enterprise_uuid}/ **Parameters** * `enterprise_uuid`: UUID of an enterprise customer. **Example Response** [ { "uuid": "ff41a5eb-2a73-4933-8e80-a1c66068ed2c", "title": "Demonstration Program", "type": "MicroMasters", "banner_image": { "large": { "url": "http://example.com/images/foo.large.jpg", "width": 1440, "height": 480 }, "medium": { "url": "http://example.com/images/foo.medium.jpg", "width": 726, "height": 242 }, "small": { "url": "http://example.com/images/foo.small.jpg", "width": 435, "height": 145 }, "x-small": { "url": "http://example.com/images/foo.x-small.jpg", "width": 348, "height": 116 } }, "authoring_organizations": [ { "key": "example" } ], "progress": { "uuid": "ff41a5eb-2a73-4933-8e80-a1c66068ed2c", "completed": 0, "in_progress": 0, "not_started": 2 } } ] parameters: [] responses: '200': description: '' tags: - learner_home parameters: - name: enterprise_uuid in: path required: true type: string /learner_home/v1/programs/{program_uuid}/progress_details/: get: operationId: learner_home_v1_programs_progress_details_list summary: Retrieves progress details of a learner in a specified program. description: |- **Example Request** GET api/dashboard/v1/programs/{program_uuid}/progress_details/ **Parameters** * `program_uuid`: A string representation of the uuid of the program. **Response Values** If the request for information about the program is successful, an HTTP 200 "OK" response is returned. The HTTP 200 response has the following values. * `urls`: Urls to enroll/purchase a course or view program record. * `program_data`: Holds meta information about the program. * `course_data`: Learner's progress details for all courses in the program (in-progress/remaining/completed). * `certificate_data`: Details about learner's certificates status for all courses in the program and the program itself. * `industry_pathways`: Industry pathways for the program, comes under additional credit opportunities. * `credit_pathways`: Credit pathways for the program, comes under additional credit opportunities. **Example Response** { "urls": { "program_listing_url": "/dashboard/programs/", "track_selection_url": "/course_modes/choose/", "commerce_api_url": "/api/commerce/v1/baskets/", "buy_button_url": "http://example.com/basket/add/?", "program_record_url": "https://example.com/records/programs/8675309" }, "program_data": { "uuid": "a156a6e2-de91-4ce7-947a-888943e6b12a", "title": "Demonstration Program", "subtitle": "", "type": "MicroMasters", "status": "active", "marketing_slug": "demo-program", "marketing_url": "micromasters/demo-program", "authoring_organizations": [], "card_image_url": "http://example.com/asset-v1:DemoX+Demo_Course.jpg", "is_program_eligible_for_one_click_purchase": false, "pathway_ids": [ 1, 2 ], "is_learner_eligible_for_one_click_purchase": false, "skus": ["AUD90210"], }, "course_data": { "uuid": "a156a6e2-de91-4ce7-947a-888943e6b12a", "completed": [], "in_progress": [], "not_started": [ { "key": "example+DemoX", "uuid": "fe1a9ad4-a452-45cd-80e5-9babd3d43f96", "title": "Demonstration Course", "course_runs": [], "entitlements": [], "owners": [], "image": "", "short_description": "", "type": "457f07ec-a78f-45b4-ba09-5fb176520d8a", } ], }, "certificate_data": [{ "type": "course", "title": "Demo Course", 'url': "/certificates/8675309", }], "industry_pathways": [ { "id": 2, "uuid": "1b8fadf1-f6aa-4282-94e3-325b922a027f", "name": "Demo Industry Pathway", "org_name": "example", "email": "example@example.com", "description": "Sample demo industry pathway", "destination_url": "http://example.edu/online/pathways/example-methods", "pathway_type": "industry", "program_uuids": [ "a156a6e2-de91-4ce7-947a-888943e6b12a" ] } ], "credit_pathways": [ { "id": 1, "uuid": "86b9701a-61e6-48a2-92eb-70a824521c1f", "name": "Demo Credit Pathway", "org_name": "example", "email": "example@example.com", "description": "Sample demo credit pathway!", "destination_url": "http://example.edu/online/pathways/example-thinking", "pathway_type": "credit", "program_uuids": [ "a156a6e2-de91-4ce7-947a-888943e6b12a" ] } ] } parameters: [] responses: '200': description: '' tags: - learner_home parameters: - name: program_uuid in: path required: true type: string /learning_sequences/v1/course_outline/{course_key_str}: get: operationId: learning_sequences_v1_course_outline_read description: The CourseOutline, customized for a given user. parameters: [] responses: '200': description: '' tags: - learning_sequences parameters: - name: course_key_str in: path required: true type: string /lti_consumer/v1/lti/{lti_config_id}/lti-ags: get: operationId: lti_consumer_v1_lti_lti-ags_list summary: LineItem endpoint implementation from LTI Advantage. description: 'See full documentation at:' parameters: [] responses: '200': description: '' schema: type: array items: $ref: '#/definitions/LtiAgsLineItem' consumes: - application/vnd.ims.lis.v2.lineitem+json produces: - application/vnd.ims.lis.v2.lineitemcontainer+json - application/vnd.ims.lis.v2.lineitem+json tags: - lti_consumer post: operationId: lti_consumer_v1_lti_lti-ags_create summary: LineItem endpoint implementation from LTI Advantage. description: 'See full documentation at:' parameters: - name: data in: body required: true schema: $ref: '#/definitions/LtiAgsLineItem' responses: '201': description: '' schema: $ref: '#/definitions/LtiAgsLineItem' consumes: - application/vnd.ims.lis.v2.lineitem+json produces: - application/vnd.ims.lis.v2.lineitemcontainer+json - application/vnd.ims.lis.v2.lineitem+json tags: - lti_consumer parameters: - name: lti_config_id in: path required: true type: string /lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}: get: operationId: lti_consumer_v1_lti_lti-ags_read summary: LineItem endpoint implementation from LTI Advantage. description: 'See full documentation at:' parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/LtiAgsLineItem' consumes: - application/vnd.ims.lis.v2.lineitem+json produces: - application/vnd.ims.lis.v2.lineitemcontainer+json - application/vnd.ims.lis.v2.lineitem+json tags: - lti_consumer put: operationId: lti_consumer_v1_lti_lti-ags_update summary: LineItem endpoint implementation from LTI Advantage. description: 'See full documentation at:' parameters: - name: data in: body required: true schema: $ref: '#/definitions/LtiAgsLineItem' responses: '200': description: '' schema: $ref: '#/definitions/LtiAgsLineItem' consumes: - application/vnd.ims.lis.v2.lineitem+json produces: - application/vnd.ims.lis.v2.lineitemcontainer+json - application/vnd.ims.lis.v2.lineitem+json tags: - lti_consumer patch: operationId: lti_consumer_v1_lti_lti-ags_partial_update summary: LineItem endpoint implementation from LTI Advantage. description: 'See full documentation at:' parameters: - name: data in: body required: true schema: $ref: '#/definitions/LtiAgsLineItem' responses: '200': description: '' schema: $ref: '#/definitions/LtiAgsLineItem' consumes: - application/vnd.ims.lis.v2.lineitem+json produces: - application/vnd.ims.lis.v2.lineitemcontainer+json - application/vnd.ims.lis.v2.lineitem+json tags: - lti_consumer delete: operationId: lti_consumer_v1_lti_lti-ags_delete summary: LineItem endpoint implementation from LTI Advantage. description: 'See full documentation at:' parameters: [] responses: '204': description: '' consumes: - application/vnd.ims.lis.v2.lineitem+json produces: - application/vnd.ims.lis.v2.lineitemcontainer+json - application/vnd.ims.lis.v2.lineitem+json tags: - lti_consumer parameters: - name: lti_config_id in: path required: true type: string - name: id in: path required: true type: string /lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}/results/{user_id}: get: operationId: lti_consumer_v1_lti_lti-ags_results summary: Return a Result list for an LtiAgsLineItem description: |- 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: [] responses: '200': description: '' schema: $ref: '#/definitions/LtiAgsLineItem' consumes: - application/vnd.ims.lis.v2.lineitem+json produces: - application/vnd.ims.lis.v2.resultcontainer+json tags: - lti_consumer parameters: - name: lti_config_id in: path required: true type: string - name: id in: path required: true type: string - name: user_id in: path required: true type: string /lti_consumer/v1/lti/{lti_config_id}/lti-ags/{id}/scores: post: operationId: lti_consumer_v1_lti_lti-ags_scores description: Create a Score record for an LtiAgsLineItem parameters: - name: data in: body required: true schema: $ref: '#/definitions/LtiAgsLineItem' responses: '201': description: '' schema: $ref: '#/definitions/LtiAgsLineItem' consumes: - application/vnd.ims.lis.v1.score+json produces: - application/vnd.ims.lis.v1.score+json tags: - lti_consumer parameters: - name: lti_config_id in: path required: true type: string - name: id in: path required: true type: string /lti_consumer/v1/lti/{lti_config_id}/memberships: get: operationId: lti_consumer_v1_lti_memberships_list description: |- Overrides default list method of ModelViewSet. Calls LMS `get_course_members` API and returns result. parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' produces: - application/vnd.ims.lti-nrps.v2.membershipcontainer+json tags: - lti_consumer parameters: - name: lti_config_id in: path required: true type: string /lti_consumer/v1/lti/{lti_config_id}/memberships/{id}: get: operationId: lti_consumer_v1_lti_memberships_read summary: LTI NRPS Context Membership Service endpoint. description: 'See full documentation at:' parameters: [] responses: '200': description: '' produces: - application/vnd.ims.lti-nrps.v2.membershipcontainer+json tags: - lti_consumer parameters: - name: lti_config_id in: path required: true type: string - name: id in: path required: true type: string /mfe_config/v1: get: operationId: mfe_config_v1_list summary: Return the MFE configuration, optionally including MFE-specific overrides. description: |- This configuration currently also pulls specific settings from site configuration or django settings. This is a temporary change as a part of the migration of some legacy pages to MFEs. This is a temporary compatibility layer which will eventually be deprecated. See [DEPR ticket](https://github.com/openedx/edx-platform/issues/37210) for more details. The compatability means that settings from the legacy locations will continue to work but the settings listed below in the `_get_legacy_config` function should be added to the MFE config by operators. **Usage** Get common config: GET /api/mfe_config/v1 Get app config (common + app-specific overrides): GET /api/mfe_config/v1?mfe=name_of_mfe **GET Response Values** ``` { "BASE_URL": "https://name_of_mfe.example.com", "LANGUAGE_PREFERENCE_COOKIE_NAME": "example-language-preference", "CREDENTIALS_BASE_URL": "https://credentials.example.com", "DISCOVERY_API_BASE_URL": "https://discovery.example.com", "LMS_BASE_URL": "https://courses.example.com", "LOGIN_URL": "https://courses.example.com/login", "LOGOUT_URL": "https://courses.example.com/logout", "STUDIO_BASE_URL": "https://studio.example.com", "LOGO_URL": "https://courses.example.com/logo.png", "ENABLE_COURSE_SORTING_BY_START_DATE": True, "HOMEPAGE_COURSE_MAX": 10, ... and so on } ``` parameters: - name: mfe in: query description: Name of an MFE (a.k.a. an APP_ID). type: string responses: '200': description: '' tags: - mfe_config parameters: [] /mfe_context: get: operationId: mfe_context_list description: |- Returns - dynamic registration fields - dynamic optional fields - the context for third party auth providers - user country code - the currently running pipeline. parameters: [] responses: '200': description: '' tags: - mfe_context parameters: [] /mobile/{api_version}/course_info/blocks/: get: operationId: mobile_course_info_blocks_list summary: '**Use Case**' description: |- This API endpoint is specifically optimized for the course homepage on Mobile Apps. The endpoint returns the blocks in the course according to the requesting user's access level. Additionally, response encompasses info fields with information about the course, including certificate URL, media dictionary with course image URLs, start and end dates for the course. **Example requests**: This api works with all versions {api_version}, you can use: v0.5, v1, v2 or v3 GET /api/mobile/{api_version}/course_info/blocks/?course_id= GET /api/mobile/{api_version}/course_info/blocks/?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:** username (str): The username of the specified user for whom the course data is being accessed. depth (integer, str, None): Optional number of blocks you receive in response course nesting depth, you can get only sections, sections and subsections, or provide string 'all' to receive all blocks of the course. requested_field (list): Optional list of names of additional fields to return for each block. Supported fields can be found in transformers.SUPPORTED_FIELDS. block_counts (list): Optional list of names of block types for which an aggregated count of blocks is returned. student_view_data (list): Optional list of names of block types for which student_view_data is returned. block_types_filter (list): Filter by block types: 'video', 'discussion', 'html', 'chapter', 'sequential', 'vertical'. return_type (list, dict): Optional list or dictionary of block's fields based on 'return_type'. **Response example** Body consists of the following fields, you received this response if you use 'return_type=dict' in query params: root: (str) The ID of the root node of the requested course block structure. blocks: (dict) 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: (str) The Course's id (Course Run key) name: (str) The course's name number: (str) The course's number org: (str) The course's organisation start: (str) Date the course begins, in ISO 8601 notation start_display: (str) Readably formatted start of the course start_type: (str) 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 end: (str) Date the course ends, in ISO 8601 notation media: (dict) 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 certificate: (dict) Information about the user's earned certificate in the course. Included here: * uri: The location of the user's certificate is_self_paced: (bool) Indicates if the course is self paced Body consists of the following fields, you received this response if you use 'return_type=list' in query params: id: (str) The Course's id (Course Run key) block_id: (str) The unique identifier for the block_id lms_web_url: (str) The URL to the navigational container of the xBlock on the web. legacy_web_url: (str) Like `lms_web_url`, but always directs to the "Legacy" frontend experience. student_view_url: (str) The URL to retrieve the HTML rendering of this block's student view 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. course_progress: (dict) Contains information about how many assignments are in the course and how many assignments the student has completed. Included here: * total_assignments_count: (int) Total course's assignments count. * assignments_completed: (int) Assignments witch the student has completed. **Returns** * 200 on success with above fields. * 400 if an invalid parameter was sent or the username was not provided * 401 unauthorized, the provided access token has expired and is no longer valid 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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - mobile parameters: - name: api_version in: path required: true type: string /mobile/{api_version}/course_info/record_user_activity: post: operationId: mobile_course_info_record_user_activity_create summary: Handle the POST request description: Populate the user activity table. parameters: [] responses: '201': description: '' tags: - mobile parameters: - name: api_version in: path required: true type: string /mobile/{api_version}/course_info/{course_id}/enrollment_details: get: operationId: mobile_course_info_enrollment_details_list summary: Handle the GET request description: Returns user enrollment and course details. parameters: [] responses: '200': description: '' tags: - mobile parameters: - name: api_version in: path required: true type: string - name: course_id in: path required: true type: string /mobile/{api_version}/course_info/{course_id}/handouts: get: operationId: mobile_course_info_handouts_list summary: '**Use Case**' description: |- 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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - mobile parameters: - name: api_version in: path required: true type: string - name: course_id in: path required: true type: string /mobile/{api_version}/course_info/{course_id}/updates: get: operationId: mobile_course_info_updates_list summary: '**Use Case**' description: |- 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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - mobile parameters: - name: api_version in: path required: true type: string - name: course_id in: path required: true type: string /mobile/{api_version}/my_user_info: get: operationId: mobile_my_user_info_list description: Redirect to the currently-logged-in user's info page parameters: [] responses: '200': description: '' tags: - mobile parameters: - name: api_version in: path required: true type: string /mobile/{api_version}/notifications/create-token/: post: operationId: mobile_notifications_create-token_create summary: |- **Use Case** This endpoint allows clients to register a device for push notifications. description: |- If the device is already registered, the existing registration will be updated. If setting PUSH_NOTIFICATIONS_SETTINGS is not configured, the endpoint will return a 501 error. **Example Request** POST /api/mobile/{version}/notifications/create-token/ **POST Parameters** The body of the POST request can include the following parameters. * name (optional) - A name of the device. * registration_id (required) - The device token of the device. * device_id (optional) - ANDROID_ID / TelephonyManager.getDeviceId() (always as hex) * active (optional) - Whether the device is active, default is True. If False, the device will not receive notifications. * cloud_message_type (required) - You should choose FCM or GCM. Currently, only FCM is supported. * application_id (optional) - Opaque application identity, should be filled in for multiple key/certificate access. Should be equal settings.FCM_APP_NAME. **Example Response** ```json { "id": 1, "name": "My Device", "registration_id": "fj3j4", "device_id": 1234, "active": true, "date_created": "2024-04-18T07:39:37.132787Z", "cloud_message_type": "FCM", "application_id": "my_app_id" } ``` parameters: - name: data in: body required: true schema: $ref: '#/definitions/GCMDevice' responses: '201': description: '' schema: $ref: '#/definitions/GCMDevice' tags: - mobile parameters: - name: api_version in: path required: true type: string /mobile/{api_version}/users/{username}: get: operationId: mobile_users_read summary: '**Use Case**' description: |- 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: [] responses: '200': description: '' schema: $ref: '#/definitions/mobile_api.User' tags: - mobile parameters: - name: api_version in: path required: true type: string - name: username in: path description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. required: true type: string pattern: ^[\w.@+-]+$ /mobile/{api_version}/users/{username}/course_enrollments/: get: operationId: mobile_users_course_enrollments_list summary: '**Use Case**' description: |- 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. In v4 we added to the response primary object. Primary object contains the latest user's enrollment or course where user has the latest progress. Primary object has been cut from user's enrolments array and inserted into separated section with key `primary`. **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. * course_progress: Contains information about how many assignments are in the course and how many assignments the student has completed. * total_assignments_count: Total course's assignments count. * assignments_completed: Assignments witch the student has completed. parameters: [] responses: '200': description: '' tags: - mobile parameters: - name: api_version in: path required: true type: string - name: username in: path required: true type: string /mobile/{api_version}/users/{username}/course_status_info/{course_id}: get: operationId: mobile_users_course_status_info_read description: Get the ID of the module that the specified user last visited in the specified course. parameters: [] responses: '200': description: '' tags: - mobile patch: operationId: mobile_users_course_status_info_partial_update description: Update the ID of the module that the specified user last visited in the specified course. parameters: [] responses: '200': description: '' tags: - mobile parameters: - name: api_version in: path required: true type: string - name: username in: path required: true type: string - name: course_id in: path required: true type: string /mobile/{api_version}/users/{username}/enrollments_status/: get: operationId: mobile_users_enrollments_status_list description: Gets user's enrollments status. parameters: [] responses: '200': description: '' tags: - mobile parameters: - name: api_version in: path required: true type: string - name: username in: path required: true type: string /notifications/: get: operationId: notifications_list summary: API view for listing notifications for a user. description: |- **Permissions**: User must be authenticated. **Response Format** (paginated): { "results" : [ { "id": (int) notification_id, "app_name": (str) app_name, "notification_type": (str) notification_type, "content": (str) content, "content_context": (dict) content_context, "content_url": (str) content_url, "last_read": (datetime) last_read, "last_seen": (datetime) last_seen }, ... ], "count": (int) total_number_of_notifications, "next": (str) url_to_next_page_of_notifications, "previous": (str) url_to_previous_page_of_notifications, "page_size": (int) number_of_notifications_per_page, } Response Error Codes: - 403: The requester cannot access resource. parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/Notification' tags: - notifications parameters: [] /notifications/count/: get: operationId: notifications_count_list summary: Get the unseen notifications count and show_notification_tray flag for a user. description: |- **Permissions**: User must be authenticated. **Response Format**: ```json { "show_notifications_tray": (bool) show_notifications_tray, "count": (int) total_number_of_unseen_notifications, "count_by_app_name": { (str) app_name: (int) number_of_unseen_notifications, ... }, "notification_expiry_days": 60 } ``` **Response Error Codes**: - 403: The requester cannot access resource. parameters: [] responses: '200': description: '' tags: - notifications parameters: [] /notifications/mark-seen/{app_name}/: put: operationId: notifications_mark-seen_update description: API view for marking user's all notifications seen for a provided app_name. parameters: [] responses: '200': description: '' tags: - notifications patch: operationId: notifications_mark-seen_partial_update description: API view for marking user's all notifications seen for a provided app_name. parameters: [] responses: '200': description: '' tags: - notifications parameters: - name: app_name in: path required: true type: string /notifications/preferences/update/{username}/: get: operationId: notifications_preferences_update_read description: |- View to update user preferences from encrypted username and patch. username and patch must be string parameters: [] responses: '200': description: '' tags: - notifications post: operationId: notifications_preferences_update_create description: |- View to update user preferences from encrypted username and patch. username and patch must be string parameters: [] responses: '201': description: '' tags: - notifications parameters: - name: username in: path required: true type: string /notifications/preferences/update/{username}/{patch}/: get: operationId: notifications_preferences_update_read description: |- View to update user preferences from encrypted username and patch. username and patch must be string parameters: [] responses: '200': description: '' tags: - notifications post: operationId: notifications_preferences_update_create description: |- View to update user preferences from encrypted username and patch. username and patch must be string parameters: [] responses: '201': description: '' tags: - notifications parameters: - name: username in: path required: true type: string - name: patch in: path required: true type: string /notifications/read/: patch: operationId: notifications_read_partial_update description: |- Marks all notifications or single notification read for the given app name or notification id for the authenticated user. parameters: [] responses: '200': description: '' tags: - notifications parameters: [] /notifications/v2/configurations/: get: operationId: notifications_v2_configurations_list summary: Handles GET requests to retrieve notification preferences. description: |- This method fetches the user's active notification preferences and merges them with a default structure provided by NotificationAppManager. This provides a complete view of all possible notifications and the user's current settings for them. parameters: [] responses: '200': description: '' tags: - notifications put: operationId: notifications_v2_configurations_update summary: Handles PUT requests to update notification preferences. description: |- This method updates the user's notification preferences based on the provided data in the request body. It expects a dictionary with notification types and their settings. parameters: [] responses: '200': description: '' tags: - notifications parameters: [] /ora_staff_grader/assessments/feedback/from/: get: operationId: ora_staff_grader_assessments_feedback_get_from summary: View for fetching assessment feedback for a submission. description: |- **Methods** * (GET) `api/ora_staff_grader/assessments/feedback/from` List all assessments received by a user (according to their submissionUUID) in an ORA assignment. * (GET) `api/ora_staff_grader/assessments/feedback/to` List all assessments given by a user (according to their submissionUUID) in an ORA assignment. **Query Params**: * `oraLocation` (str): ORA location for XBlock handling * `submissionUUID` (str): The ORA submission UUID **Response**: { assessments (List[dict]): [ { "assessment_id: (str) Assessment id "scorer_name: (str) Scorer name "scorer_username: (str) Scorer username "scorer_email: (str) Scorer email "assessment_date: (str) Assessment date "assessment_scores (List[dict]) [ { "criterion_name: (str) Criterion name "score_earned: (int) Score earned "score_type: (str) Score type } ] "problem_step (str) Problem step (Self, Peer, or Staff) "feedback: (str) Feedback of the assessment } ] } **Errors**: * `MissingParamResponse` (HTTP 400) for missing params * `BadOraLocationResponse` (HTTP 400) for bad ORA location * `XBlockInternalError` (HTTP 500) for an issue with ORA * `UnknownError` (HTTP 500) for other errors parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/assessments/feedback/to/: get: operationId: ora_staff_grader_assessments_feedback_get_to summary: View for fetching assessment feedback for a submission. description: |- **Methods** * (GET) `api/ora_staff_grader/assessments/feedback/from` List all assessments received by a user (according to their submissionUUID) in an ORA assignment. * (GET) `api/ora_staff_grader/assessments/feedback/to` List all assessments given by a user (according to their submissionUUID) in an ORA assignment. **Query Params**: * `oraLocation` (str): ORA location for XBlock handling * `submissionUUID` (str): The ORA submission UUID **Response**: { assessments (List[dict]): [ { "assessment_id: (str) Assessment id "scorer_name: (str) Scorer name "scorer_username: (str) Scorer username "scorer_email: (str) Scorer email "assessment_date: (str) Assessment date "assessment_scores (List[dict]) [ { "criterion_name: (str) Criterion name "score_earned: (int) Score earned "score_type: (str) Score type } ] "problem_step (str) Problem step (Self, Peer, or Staff) "feedback: (str) Feedback of the assessment } ] } **Errors**: * `MissingParamResponse` (HTTP 400) for missing params * `BadOraLocationResponse` (HTTP 400) for bad ORA location * `XBlockInternalError` (HTTP 500) for an issue with ORA * `UnknownError` (HTTP 500) for other errors parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/assessments/feedback/{id}/: get: operationId: ora_staff_grader_assessments_feedback_read summary: View for fetching assessment feedback for a submission. description: |- **Methods** * (GET) `api/ora_staff_grader/assessments/feedback/from` List all assessments received by a user (according to their submissionUUID) in an ORA assignment. * (GET) `api/ora_staff_grader/assessments/feedback/to` List all assessments given by a user (according to their submissionUUID) in an ORA assignment. **Query Params**: * `oraLocation` (str): ORA location for XBlock handling * `submissionUUID` (str): The ORA submission UUID **Response**: { assessments (List[dict]): [ { "assessment_id: (str) Assessment id "scorer_name: (str) Scorer name "scorer_username: (str) Scorer username "scorer_email: (str) Scorer email "assessment_date: (str) Assessment date "assessment_scores (List[dict]) [ { "criterion_name: (str) Criterion name "score_earned: (int) Score earned "score_type: (str) Score type } ] "problem_step (str) Problem step (Self, Peer, or Staff) "feedback: (str) Feedback of the assessment } ] } **Errors**: * `MissingParamResponse` (HTTP 400) for missing params * `BadOraLocationResponse` (HTTP 400) for bad ORA location * `XBlockInternalError` (HTTP 500) for an issue with ORA * `UnknownError` (HTTP 500) for other errors parameters: [] responses: '200': description: '' tags: - ora_staff_grader parameters: - name: id in: path required: true type: string /ora_staff_grader/initialize: get: operationId: ora_staff_grader_initialize_read description: GET course metadata parameters: [] responses: '200': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/mock/initialize: get: operationId: ora_staff_grader_mock_initialize_read description: Returns initial app state parameters: [] responses: '200': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/mock/submission: get: operationId: ora_staff_grader_mock_submission_read description: Get a submission parameters: [] responses: '200': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/mock/submission/grade: get: operationId: ora_staff_grader_mock_submission_grade_read description: Submit a grade parameters: [] responses: '200': description: '' tags: - ora_staff_grader post: operationId: ora_staff_grader_mock_submission_grade_create description: Save a grade update to the data store parameters: [] responses: '201': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/mock/submission/lock: post: operationId: ora_staff_grader_mock_submission_lock_create description: Claim a submission lock, updating lock status parameters: [] responses: '201': description: '' tags: - ora_staff_grader delete: operationId: ora_staff_grader_mock_submission_lock_delete description: Delete a submission lock, updating lock status parameters: [] responses: '204': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/mock/submission/status: get: operationId: ora_staff_grader_mock_submission_status_read description: Get a submission status, leaving out the response parameters: [] responses: '200': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/submission: get: operationId: ora_staff_grader_submission_read description: GET submission contents and assessment info, if any parameters: [] responses: '200': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/submission/batch/unlock: get: operationId: ora_staff_grader_submission_batch_unlock_read description: POST delete a group of submission locks, limited to just those in the list that the user owns. parameters: [] responses: '200': description: '' tags: - ora_staff_grader post: operationId: ora_staff_grader_submission_batch_unlock_create description: Batch delete submission locks parameters: [] responses: '201': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/submission/files: get: operationId: ora_staff_grader_submission_files_read summary: GET file metadata for a submission. description: |- Used to get updated file download links to avoid signed download link expiration issues. parameters: [] responses: '200': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/submission/grade: get: operationId: ora_staff_grader_submission_grade_read description: POST submit a grade for a submission parameters: [] responses: '200': description: '' tags: - ora_staff_grader post: operationId: ora_staff_grader_submission_grade_create description: Update a grade parameters: [] responses: '201': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/submission/lock: get: operationId: ora_staff_grader_submission_lock_read description: |- POST claim a submission lock for grading DELETE release a submission lock parameters: [] responses: '200': description: '' tags: - ora_staff_grader post: operationId: ora_staff_grader_submission_lock_create description: Claim a submission lock parameters: [] responses: '201': description: '' tags: - ora_staff_grader delete: operationId: ora_staff_grader_submission_lock_delete description: Clear a submission lock parameters: [] responses: '204': description: '' tags: - ora_staff_grader parameters: [] /ora_staff_grader/submission/status: get: operationId: ora_staff_grader_submission_status_read description: GET submission grade status, lock status, and grade data parameters: [] responses: '200': description: '' tags: - ora_staff_grader parameters: [] /organizations/v0/organizations/: get: operationId: organizations_v0_organizations_list description: |- Organization view to: - list organization data (GET .../) - retrieve single organization (GET .../) - create or update an organization via the PUT endpoint (PUT .../) parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/Organization' tags: - organizations parameters: [] /organizations/v0/organizations/{short_name}/: get: operationId: organizations_v0_organizations_read description: |- Organization view to: - list organization data (GET .../) - retrieve single organization (GET .../) - create or update an organization via the PUT endpoint (PUT .../) parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/Organization' tags: - organizations put: operationId: organizations_v0_organizations_update summary: We perform both Update and Create action via the PUT method. description: |- 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: - name: data in: body required: true schema: $ref: '#/definitions/Organization' responses: '200': description: '' schema: $ref: '#/definitions/Organization' tags: - organizations patch: operationId: organizations_v0_organizations_partial_update description: We disable PATCH because all updates and creates should use the PUT action above. parameters: - name: data in: body required: true schema: $ref: '#/definitions/Organization' responses: '200': description: '' schema: $ref: '#/definitions/Organization' tags: - organizations parameters: - name: short_name in: path description: Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_). required: true type: string pattern: '[^/+]+' /profile_images/v1/{username}/remove: post: operationId: profile_images_v1_remove_create description: POST /api/profile_images/v1/{username}/remove parameters: [] responses: '201': description: '' tags: - profile_images parameters: - name: username in: path required: true type: string /profile_images/v1/{username}/upload: post: operationId: profile_images_v1_upload_create description: POST /api/profile_images/v1/{username}/upload parameters: [] responses: '201': description: '' consumes: - multipart/form-data - application/x-www-form-urlencoded tags: - profile_images parameters: - name: username in: path required: true type: string /program_enrollments/v1/integration-reset: post: operationId: program_enrollments_v1_integration-reset_create description: Reset enrollment and user data for organization parameters: [] responses: '201': description: '' tags: - program_enrollments parameters: [] /program_enrollments/v1/programs/enrollments/: get: operationId: program_enrollments_v1_programs_enrollments_list description: How to respond to a GET request to this endpoint parameters: [] responses: '200': description: '' tags: - program_enrollments parameters: [] /program_enrollments/v1/programs/readonly_access/: get: operationId: program_enrollments_v1_programs_readonly_access_list description: How to respond to a GET request to this endpoint parameters: [] responses: '200': description: '' tags: - program_enrollments parameters: [] /program_enrollments/v1/programs/{program_uuid}/courses/{course_id}/enrollments/: get: operationId: program_enrollments_v1_programs_courses_enrollments_list description: Get a list of students enrolled in a course within a program. parameters: - name: cursor in: query description: The pagination cursor value. required: false type: string - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - program_enrollments post: operationId: program_enrollments_v1_programs_courses_enrollments_create description: Enroll a list of students in a course in a program parameters: [] responses: '201': description: '' tags: - program_enrollments put: operationId: program_enrollments_v1_programs_courses_enrollments_update description: Create or Update the program course enrollments of a list of learners parameters: [] responses: '200': description: '' tags: - program_enrollments patch: operationId: program_enrollments_v1_programs_courses_enrollments_partial_update description: Modify the program course enrollments of a list of learners parameters: [] responses: '200': description: '' tags: - program_enrollments parameters: - name: program_uuid in: path required: true type: string - name: course_id in: path required: true type: string /program_enrollments/v1/programs/{program_uuid}/courses/{course_id}/grades/: get: operationId: program_enrollments_v1_programs_courses_grades_list description: Defines the GET list endpoint for ProgramCourseGrade objects. parameters: - name: cursor in: query description: The pagination cursor value. required: false type: string - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - program_enrollments parameters: - name: program_uuid in: path required: true type: string - name: course_id in: path required: true type: string /program_enrollments/v1/programs/{program_uuid}/enrollments/: get: operationId: program_enrollments_v1_programs_enrollments_list description: Defines the GET list endpoint for ProgramEnrollment objects. parameters: - name: cursor in: query description: The pagination cursor value. required: false type: string - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - program_enrollments post: operationId: program_enrollments_v1_programs_enrollments_create description: Create program enrollments for a list of learners parameters: [] responses: '201': description: '' tags: - program_enrollments put: operationId: program_enrollments_v1_programs_enrollments_update description: Create/update program enrollments for a list of learners parameters: [] responses: '200': description: '' tags: - program_enrollments patch: operationId: program_enrollments_v1_programs_enrollments_partial_update description: Update program enrollments for a list of learners parameters: [] responses: '200': description: '' tags: - program_enrollments parameters: - name: program_uuid in: path required: true type: string /program_enrollments/v1/programs/{program_uuid}/overview/: get: operationId: program_enrollments_v1_programs_overview_read description: |- A view for getting data associated with a user's course enrollments as part of a program enrollment. parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/CourseRunOverviewList' tags: - program_enrollments parameters: - name: program_uuid in: path required: true type: string /program_enrollments/v1/users/{username}/programs/{program_uuid}/courses: get: operationId: program_enrollments_v1_users_programs_courses_list summary: Get an overview of each of a user's course enrollments associated with a program. description: |- 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](https://github.com/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" } ] } ``` parameters: - name: cursor in: query description: The pagination cursor value. required: false type: string - name: page_size in: query description: Number of results to return per page. Defaults to 10. Maximum is 25. type: integer - name: username in: path description: 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. type: string required: true - name: program_uuid in: path description: UUID of a program. Enrollments will be returned for course runs in this program. type: string required: true responses: '200': description: '' schema: $ref: '#/definitions/PageOfCourseRunOverview' '401': description: The requester is not authenticated. '403': description: The requester cannot access the specified program and/or the requester may not retrieve this data for the specified user. '404': description: The requested program does not exist. tags: - program_enrollments parameters: - name: username in: path required: true type: string - name: program_uuid in: path required: true type: string /send_account_activation_email: post: operationId: send_account_activation_email_create description: Returns status code. parameters: [] responses: '201': description: '' tags: - send_account_activation_email parameters: [] /support/v1/manage_course_team/: get: operationId: support_v1_manage_course_team_list summary: Retrieve a list of courses accessible by the authenticated user description: |- **Use Case** GET API to retrieve a list of courses accessible by the authenticated user, along with the specified user's role ("instructor", "staff", or null) in each course. **Endpoint** GET /api/support/v1/manage_course_team/ **Query Parameters** At least one of the following parameters is required: - email: User's email address - username: User's username - user_id: User's ID **Returns** List of courses accessible to the authenticated user, each annotated with the specified user's role in that course. Each course includes organizational information and identifiers. **Example Response** ```json { "results": [ { "course_id": "course-v1:edX+DemoX+2025_T1", "course_name": "edX Demonstration Course", "course_url": "https://studio.example.com/course/course-v1:edX+DemoX+2025_T1", "role": "instructor", "status": "active", "org": "edX", "run": "2025_T1", "number": "DemoX" }, { "course_id": "course-v1:MITx+6.00x+2024_Fall", "course_name": "Introduction to Computer Science", "course_url": "https://studio.example.com/course/course-v1:MITx+6.00x+2024_Fall", "role": "staff", "status": "archived", "org": "MITx", "run": "2024_Fall", "number": "6.00x" } ] } ``` parameters: - name: email in: query description: User's email address type: string - name: username in: query description: User's username type: string - name: user_id in: query description: User's ID type: integer responses: '200': description: '' schema: type: array items: $ref: '#/definitions/CourseTeamManage' tags: - support put: operationId: support_v1_manage_course_team_update summary: Bulk assign or revoke course team roles for a user across multiple courses. description: |- **Endpoint** PUT /api/support/v1/manage_course_team/ **Permissions** - Admin/Staff users: Can manage roles for any course - Instructor users: Can only manage roles for courses/orgs they have instructor access to - Other users: Access denied **Request Data** A JSON object containing: - email: User's email address - bulk_role_operations: List of role operations, each containing: - course_id: Course key string - role: Role to assign or revoke ("instructor" or "staff") - action: "assign" or "revoke" **Example Request** ```json { "email": "user1@example.com", "bulk_role_operations": [ { "course_id": "course-v1:edX+DemoX+2025_T1", "role": "instructor", "action": "assign" }, { "course_id": "course-v1:edX+DemoX+2025_T2", "role": "staff", "action": "revoke" } ] } ``` **Returns** - HTTP 200 with results for each operation (success or error details) - HTTP 400 if the request data is invalid **Example Response** ```json { "email": "user1@example.com", "results": [ { "course_id": "course-v1:edX+DemoX+2025_T1", "role": "instructor", "action": "assign", "status": "success" }, { "course_id": "course-v1:edX+DemoX+2025_T2", "role": "staff", "action": "revoke", "status": "failed", "error": "error_message" } ] } ``` parameters: - name: data in: body required: true schema: $ref: '#/definitions/CourseTeamManage' responses: '200': description: '' schema: $ref: '#/definitions/CourseTeamManage' tags: - support parameters: [] /team/v0/bulk_team_membership/{course_id}: get: operationId: team_v0_bulk_team_membership_read description: Download CSV with team membership data for given course run. parameters: [] responses: '200': description: '' tags: - team post: operationId: team_v0_bulk_team_membership_create description: Process uploaded CSV to modify team memberships for given course run. parameters: [] responses: '201': description: '' tags: - team parameters: - name: course_id in: path required: true type: string /team/v0/team_membership/: get: operationId: team_v0_team_membership_list description: GET /api/team/v0/team_membership parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - team post: operationId: team_v0_team_membership_create description: POST /api/team/v0/team_membership parameters: [] responses: '201': description: '' tags: - team parameters: [] /team/v0/team_membership/{team_id},{username}: get: operationId: team_v0_team_membership_read description: GET /api/team/v0/team_membership/{team_id},{username} parameters: [] responses: '200': description: '' tags: - team delete: operationId: team_v0_team_membership_delete description: DELETE /api/team/v0/team_membership/{team_id},{username} parameters: [] responses: '204': description: '' tags: - team parameters: - name: team_id in: path required: true type: string - name: username in: path required: true type: string /team/v0/teams/: get: operationId: team_v0_teams_list description: GET /api/team/v0/teams/ parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - team post: operationId: team_v0_teams_create description: POST /api/team/v0/teams/ parameters: [] responses: '201': description: '' tags: - team parameters: [] /team/v0/teams/{team_id}: get: operationId: team_v0_teams_read description: Retrieves the specified resource using the RetrieveModelMixin. parameters: [] responses: '200': description: '' consumes: - application/merge-patch+json tags: - team patch: operationId: team_v0_teams_partial_update description: Checks for validation errors, then updates the model using the UpdateModelMixin. parameters: [] responses: '200': description: '' consumes: - application/merge-patch+json tags: - team delete: operationId: team_v0_teams_delete description: DELETE /api/team/v0/teams/{team_id} parameters: [] responses: '204': description: '' consumes: - application/merge-patch+json tags: - team parameters: - name: team_id in: path required: true type: string /team/v0/teams/{team_id}/assignments: get: operationId: team_v0_teams_assignments_list description: GET v0/teams/{team_id_pattern}/assignments parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - team parameters: - name: team_id in: path required: true type: string /team/v0/topics/: get: operationId: team_v0_topics_list description: GET /api/team/v0/topics/?course_id={course_id} parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - team parameters: [] /team/v0/topics/{topic_id},{course_id}: get: operationId: team_v0_topics_read description: GET /api/team/v0/topics/{topic_id},{course_id}/ parameters: [] responses: '200': description: '' tags: - team parameters: - name: topic_id in: path required: true type: string - name: course_id in: path required: true type: string /third_party_auth/v0/providers/user_status: get: operationId: third_party_auth_v0_providers_user_status_list summary: GET /api/third_party_auth/v0/providers/user_status/ description: |- **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" } ``` parameters: [] responses: '200': description: '' tags: - third_party_auth parameters: [] /third_party_auth/v0/providers/{provider_id}/users: get: operationId: third_party_auth_v0_providers_users_list summary: Map between the third party auth account IDs (remote_id) and EdX username. description: |- 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}& remote_id_field_name={external_id_field_name} 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 * remote_id_field_name: Optional. The field name to use for the remote id lookup. Useful when learners are coming from external LMS. e.g. ?remote_id_field_name=ext_userid_sf * 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: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' tags: - third_party_auth parameters: - name: provider_id in: path required: true type: string /third_party_auth/v0/users/: get: operationId: third_party_auth_v0_users_list summary: Read provider information for a user. description: Allows reading the list of providers for a specified user. parameters: [] responses: '200': description: '' tags: - third_party_auth delete: operationId: third_party_auth_v0_users_delete description: Delete given social auth record for a user. parameters: [] responses: '204': description: '' tags: - third_party_auth parameters: [] /third_party_auth/v0/users/{username}: get: operationId: third_party_auth_v0_users_read summary: Read provider information for a user. description: Allows reading the list of providers for a specified user. parameters: [] responses: '200': description: '' tags: - third_party_auth parameters: - name: username in: path required: true type: string /third_party_auth_context: get: operationId: third_party_auth_context_list description: |- Returns - dynamic registration fields - dynamic optional fields - the context for third party auth providers - user country code - the currently running pipeline. parameters: [] responses: '200': description: '' tags: - third_party_auth_context parameters: [] /toggles/v0/state/: get: operationId: toggles_v0_state_list description: Expose toggle state report dict as a view. parameters: [] responses: '200': description: '' tags: - toggles parameters: [] /user/v1/account/password_reset/: get: operationId: user_v1_account_password_reset_list description: HTTP end-point for GETting a description of the password reset form. parameters: [] responses: '200': description: '' tags: - user parameters: [] /user/v1/account/password_reset/token/validate/: post: operationId: user_v1_account_password_reset_token_validate_create description: HTTP end-point to validate password reset token. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/account/registration/: get: operationId: user_v1_account_registration_list description: HTTP end-points for creating a new user. parameters: [] responses: '200': description: '' tags: - user post: operationId: user_v1_account_registration_create summary: Create the user's account. description: |- 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. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/accounts: get: operationId: user_v1_accounts_list summary: Return a list of user details objects description: |- **Example Requests** GET /api/user/v1/accounts?usernames={username1,username2}[?view=shared] GET /api/user/v1/accounts?email={user_email} (staff only) GET /api/user/v1/accounts?lms_user_id={user_email} (staff only) **Responses** If no user exists with the specified username, or email, an HTTP 404 "Not Found" response is returned. If the user makes the request for her own account, or makes a request for another account and has "is_staff" access, an HTTP 200 "OK" response is returned. The response consists of a list of one or more user objects, in the same format as is returned for `GET /user/v1/accounts/{username}`. parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - user parameters: [] /user/v1/accounts/cancel_retirement/: post: operationId: user_v1_accounts_cancel_retirement summary: POST /api/user/v1/accounts/cancel_retirement/ description: |- Cancels the retirement for a user's account. This also handles the top level error handling, and permissions. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/accounts/deactivate_logout/: post: operationId: user_v1_accounts_deactivate_logout_create summary: POST /api/user/v1/accounts/deactivate_logout/ description: |- Marks the user as having no password set for deactivation purposes, and logs the user out. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/accounts/name_change/: post: operationId: user_v1_accounts_name_change_create summary: POST /api/user/v1/accounts/name_change/ description: |- 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" } parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/accounts/name_change/{username}/confirm/: post: operationId: user_v1_accounts_name_change_confirm summary: POST /api/user/v1/account/name_change/{username}/confirm description: Confirm a name change request for the specified user, and update their profile name. parameters: [] responses: '201': description: '' tags: - user parameters: - name: username in: path required: true type: string /user/v1/accounts/replace_usernames/: post: operationId: user_v1_accounts_replace_usernames_create description: |- 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"} ] } ``` parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/accounts/retire/: post: operationId: user_v1_accounts_post summary: POST /api/user/v1/accounts/retire/ description: |- ``` { '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. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/accounts/retire_misc/: post: operationId: user_v1_accounts_post summary: POST /api/user/v1/accounts/retire_misc/ description: |- ``` { 'username': 'user_to_retire' } ``` Retires the user with the given username in the LMS. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/accounts/retirement_cleanup/: post: operationId: user_v1_accounts_cleanup summary: POST /api/user/v1/accounts/retirement_cleanup/ description: |- ``` { 'usernames': ['user1', 'user2', ...] } ``` Deletes a batch of retirement requests by username. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/accounts/retirement_partner_report/: post: operationId: user_v1_accounts_retirement_partner_report_create summary: POST /api/user/v1/accounts/retirement_partner_report/ description: |- Returns the list of UserRetirementPartnerReportingStatus users that are not already being processed and updates their status to indicate they are currently being processed. parameters: [] responses: '201': description: '' tags: - user put: operationId: user_v1_accounts_retirement_partner_report_update summary: PUT /api/user/v1/accounts/retirement_partner_report/ description: |- ``` { 'username': 'user_to_retire' } ``` Creates a UserRetirementPartnerReportingStatus object for the given user as part of the retirement pipeline. parameters: [] responses: '200': description: '' tags: - user parameters: [] /user/v1/accounts/retirement_partner_report_cleanup/: post: operationId: user_v1_accounts_retirement_partner_cleanup summary: POST /api/user/v1/accounts/retirement_partner_report_cleanup/ description: |- [{'original_username': 'user1'}, {'original_username': 'user2'}, ...] Deletes UserRetirementPartnerReportingStatus objects for a list of users that have been reported on. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/accounts/retirement_queue/: get: operationId: user_v1_accounts_retirement_queue summary: |- GET /api/user/v1/accounts/retirement_queue/ {'cool_off_days': 7, 'states': ['PENDING', 'COMPLETE'], 'limit': 500} description: |- Returns the list of RetirementStatus users in the given states that were created in the retirement queue at least `cool_off_days` ago. parameters: [] responses: '200': description: '' tags: - user parameters: [] /user/v1/accounts/retirements_by_status_and_date/: get: operationId: user_v1_accounts_retirements_by_status_and_date summary: |- GET /api/user/v1/accounts/retirements_by_status_and_date/ ?start_date=2018-09-05&end_date=2018-09-07&state=COMPLETE description: |- 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. parameters: [] responses: '200': description: '' tags: - user parameters: [] /user/v1/accounts/search_emails: post: operationId: user_v1_accounts_search_emails summary: Return information about users associated with a list of email addresses description: |- **Example Requests** POST /api/user/v1/accounts/search_emails { "emails": ["edx@example.com", "staff@example.com"] } **Response** If no `emails` key is present in the request, or the user does not have "is_staff" access, an HTTP 404 "Not Found" response is returned. If the has "is_staff" access, an HTTP 200 "OK" response is returned. The response contains the following values. [ { "username": "edx", "email": "edx@example.com", "id": 3, }, { "username": "staff", "email": "staff@example.com", "id": 8, } ] parameters: [] responses: '201': description: '' consumes: - application/json - application/merge-patch+json tags: - user parameters: [] /user/v1/accounts/update_retirement_status/: patch: operationId: user_v1_accounts_update_retirement_status_partial_update summary: PATCH /api/user/v1/accounts/update_retirement_status/ description: |- ``` { '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'. parameters: [] responses: '200': description: '' tags: - user parameters: [] /user/v1/accounts/{username}: get: operationId: user_v1_accounts_read summary: Retrieve a single detailed user object description: |- **Example Requests** GET /api/user/v1/accounts/{username}/ **Response** If no user exists with the specified username, or email, an HTTP 404 "Not Found" response is returned. If the user makes the request for her own account, or makes a request for another account and has "is_staff" access, an HTTP 200 "OK" response is returned. The response contains the following values. * `id`: numerical lms user id in db * `activation_key`: auto-genrated activation key when signed up via email * `bio`: null or textual representation of user biographical information ("about me"). * `country`: An ISO 3166 country code or null. * `date_joined`: The date the account was created, in the string format provided by datetime. For example, "2014-08-26T17:52:11Z". * `last_login`: The latest date the user logged in, in the string datetime format. * `email`: Email address for the user. New email addresses must be confirmed via a confirmation email, so GET does not reflect the change until the address has been confirmed. * `secondary_email`: A secondary email address for the user. Unlike the email field, GET will reflect the latest update to this field even if changes have yet to be confirmed. * `verified_name`: Approved verified name of the learner present in name affirmation plugin * `extended_profile`: A list of objects with the keys `field_name` and `field_value`, returning any populated `extended_profile_fields` configured in the **Site Configuration** * `gender`: One of the following values: * null * "f" * "m" * "o" * `goals`: The textual representation of the user's goals, or null. * `is_active`: Boolean representation of whether a user is active. * `language`: The user's preferred language, or null. * `language_proficiencies`: Array of language preferences. Each preference is a JSON object with the following keys: * "code": string ISO 639-1 language code e.g. "en". * `level_of_education`: One of the following values: * "p": PhD or Doctorate * "m": Master's or professional degree * "b": Bachelor's degree * "a": Associate's degree * "hs": Secondary/high school * "jhs": Junior secondary/junior high/middle school * "el": Elementary/primary school * "none": None * "o": Other * null: The user did not enter a value * `mailing_address`: The textual representation of the user's mailing address, or null. * `name`: The full name of the user. * `profile_image`: A JSON representation of a user's profile image information. This representation has the following keys. * "has_image": Boolean indicating whether the user has a profile image. * "image_url_*": Absolute URL to various sizes of a user's profile image, where '*' matches a representation of the corresponding image size, such as 'small', 'medium', 'large', and 'full'. These are configurable via PROFILE_IMAGE_SIZES_MAP. * `requires_parental_consent`: True if the user is a minor requiring parental consent. * `social_links`: Array of social links, sorted alphabetically by "platform". Each preference is a JSON object with the following keys: * "platform": A particular social platform, ex: 'facebook' * "social_link": The link to the user's profile on the particular platform * `username`: The username associated with the account. * `year_of_birth`: The year the user was born, as an integer, or null. * `account_privacy`: The user's setting for sharing her personal profile. Possible values are "all_users", "private", or "custom". If "custom", the user has selectively chosen a subset of shareable fields to make visible to others via the User Preferences API. * `phone_number`: The phone number for the user. String of numbers with an optional `+` sign at the start. * `pending_name_change`: If the user has an active name change request, returns the requested name. For all text fields, plain text instead of HTML is supported. The data is stored exactly as specified. Clients must HTML escape rendered values to avoid script injections. If a user who does not have "is_staff" access requests account information for a different user, only a subset of these fields is returned. The returned fields depend on the `ACCOUNT_VISIBILITY_CONFIGURATION` configuration setting and the visibility preference of the user for whom data is requested. A user can view which account fields they have shared with other users by requesting their own username and providing the "view=shared" URL parameter. parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - user patch: operationId: user_v1_accounts_partial_update summary: Update user account or profile information description: |- **Example Requests** Content-Type: application/merge-patch+json PATCH /api/user/v1/accounts/{username} **Request Body { "level_of_education": "m", "extended_profile": [ {"field_name": "favorite_beatle", "field_value": {"name": "ringo"}}, {"field_name": "conlangs_spoken", "field_value":["Láadan", "Rikchik", "Lojban"]} ] } **Notes regarding `social_links`** Requested updates to social_links are automatically merged with previously set links. That is, any newly introduced platforms are add to the previous list. Updated links to pre-existing platforms replace their values in the previous list. Pre-existing platforms can be removed by setting the value of the social_link to an empty string (""). **Response Values for PATCH** Users can only modify their own account information. If the requesting user does not have the specified username and has staff access, the request returns an HTTP 403 "Forbidden" response. If the requesting user does not have staff access, the request returns an HTTP 404 "Not Found" response to avoid revealing the existence of the account. If no user exists with the specified username, an HTTP 404 "Not Found" response is returned. If "application/merge-patch+json" is not the specified content type, a 415 "Unsupported Media Type" response is returned. If validation errors prevent the update, this method returns a 400 "Bad Request" response that includes a "field_errors" field that lists all error messages. This will happen if an attempt is made to edit any read-only fields. If a failure at the time of the update prevents the update, a 400 "Bad Request" error is returned. The JSON collection contains specific errors. If the update is successful, updated user account data is returned. parameters: [] responses: '200': description: '' consumes: - application/json - application/merge-patch+json tags: - user parameters: - name: username in: path required: true type: string /user/v1/accounts/{username}/deactivate/: post: operationId: user_v1_accounts_deactivate_create summary: POST /api/user/v1/accounts/{username}/deactivate/ description: Marks the user as having no password set for deactivation purposes. parameters: [] responses: '201': description: '' tags: - user parameters: - name: username in: path required: true type: string /user/v1/accounts/{username}/image: post: operationId: user_v1_accounts_image_create description: POST /api/user/v1/accounts/{username}/image parameters: [] responses: '201': description: '' consumes: - multipart/form-data - application/x-www-form-urlencoded tags: - user delete: operationId: user_v1_accounts_image_delete description: DELETE /api/user/v1/accounts/{username}/image parameters: [] responses: '204': description: '' consumes: - multipart/form-data - application/x-www-form-urlencoded tags: - user parameters: - name: username in: path required: true type: string /user/v1/accounts/{username}/retirement_status/: get: operationId: user_v1_accounts_retirement_status_read description: |- GET /api/user/v1/accounts/{username}/retirement_status/ Returns the RetirementStatus of a given user, or 404 if that row doesn't exist. parameters: [] responses: '200': description: '' tags: - user parameters: - name: username in: path required: true type: string /user/v1/accounts/{username}/verification_status/: get: operationId: user_v1_accounts_verification_status_list description: IDVerification Status endpoint parameters: [] responses: '200': description: '' tags: - user parameters: - name: username in: path required: true type: string /user/v1/accounts/{username}/verifications/: get: operationId: user_v1_accounts_verifications_list description: IDVerificationStatusDeetails endpoint to retrieve more details about ID Verification status parameters: [] responses: '200': description: '' schema: type: array items: $ref: '#/definitions/IDVerificationDetails' tags: - user parameters: - name: username in: path required: true type: string /user/v1/forum_roles/{name}/users/: get: operationId: user_v1_forum_roles_users_list description: Forum roles are represented by a list of user dicts parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/user_api.User' tags: - user parameters: - name: name in: path required: true type: string /user/v1/me: get: operationId: user_v1_get summary: Return an authenticated user's username description: |- **Example Requests** GET /api/user/v1/me[?view=shared] parameters: [] responses: '200': description: '' schema: type: object properties: username: type: string '401': description: '' consumes: - application/json - application/merge-patch+json tags: - user parameters: [] /user/v1/preferences/email_opt_in/: post: operationId: user_v1_preferences_email_opt_in_create summary: Post function for updating the email opt in preference. description: |- Allows the modification or creation of the email opt in preference at an organizational level. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v1/preferences/time_zones/: get: operationId: user_v1_preferences_time_zones_list summary: '**Use Cases**' description: |- 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 parameters: [] responses: '200': description: '' schema: type: array items: $ref: '#/definitions/CountryTimeZone' tags: - user parameters: [] /user/v1/preferences/{pref_key}/users/: get: operationId: user_v1_preferences_users_list description: DRF class for listing a user's preferences parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/user_api.User' tags: - user parameters: - name: pref_key in: path required: true type: string /user/v1/preferences/{username}: get: operationId: user_v1_preferences_read description: GET /api/user/v1/preferences/{username}/ parameters: [] responses: '200': description: '' consumes: - application/merge-patch+json tags: - user patch: operationId: user_v1_preferences_partial_update description: PATCH /api/user/v1/preferences/{username}/ parameters: [] responses: '200': description: '' consumes: - application/merge-patch+json tags: - user parameters: - name: username in: path required: true type: string /user/v1/preferences/{username}/{preference_key}: get: operationId: user_v1_preferences_read description: GET /api/user/v1/preferences/{username}/{preference_key} parameters: [] responses: '200': description: '' tags: - user put: operationId: user_v1_preferences_update description: PUT /api/user/v1/preferences/{username}/{preference_key} parameters: [] responses: '200': description: '' tags: - user delete: operationId: user_v1_preferences_delete description: DELETE /api/user/v1/preferences/{username}/{preference_key} parameters: [] responses: '204': description: '' tags: - user parameters: - name: username in: path required: true type: string - name: preference_key in: path required: true type: string /user/v1/user_prefs/: get: operationId: user_v1_user_prefs_list description: DRF class for interacting with the UserPreference ORM parameters: - name: key in: query description: '' required: false type: string - name: user in: query description: '' required: false type: string - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/UserPreference' tags: - user parameters: [] /user/v1/user_prefs/{id}/: get: operationId: user_v1_user_prefs_read description: DRF class for interacting with the UserPreference ORM parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/UserPreference' tags: - user parameters: - name: id in: path description: A unique integer value identifying this user preference. required: true type: integer /user/v1/users/: get: operationId: user_v1_users_list description: DRF class for interacting with the User ORM object parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/user_api.User' tags: - user parameters: [] /user/v1/users/{id}/: get: operationId: user_v1_users_read description: DRF class for interacting with the User ORM object parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/user_api.User' tags: - user parameters: - name: id in: path description: A unique integer value identifying this user. required: true type: integer /user/v1/validation/registration: post: operationId: user_v1_validation_registration_create summary: POST /api/user/v1/validation/registration/ description: |- 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. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/v2/account/registration/: get: operationId: user_v2_account_registration_list description: HTTP end-points for creating a new user. parameters: [] responses: '200': description: '' tags: - user post: operationId: user_v2_account_registration_create summary: Create the user's account. description: |- 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. parameters: [] responses: '201': description: '' tags: - user parameters: [] /user/{api_version}/account/login_session/: get: operationId: user_account_login_session_list description: HTTP end-points for logging in users. parameters: [] responses: '200': description: '' tags: - user post: operationId: user_account_login_session_create summary: POST /user/{api_version}/account/login_session/ description: Returns 200 on success, and a detailed error message otherwise. parameters: - name: data in: body required: true schema: type: object properties: email: type: string password: type: string responses: '200': description: '' schema: type: object properties: success: type: boolean value: type: string error_code: type: string '400': description: '' schema: type: object properties: success: type: boolean value: type: string error_code: type: string '403': description: '' schema: type: object properties: success: type: boolean value: type: string error_code: type: string tags: - user security: - csrf: [] parameters: - name: api_version in: path required: true type: string /user_tours/discussion_tours/{tour_id}/: get: operationId: user_tours_discussion_tours_read description: Return a list of all tours in the database. parameters: [] responses: '200': description: '' tags: - user_tours put: operationId: user_tours_discussion_tours_update description: Update an existing tour with the data in the request body. parameters: [] responses: '200': description: '' tags: - user_tours parameters: - name: tour_id in: path required: true type: string /user_tours/v1/{username}: get: operationId: user_tours_v1_read summary: Retrieve the User Tour for the given username. description: |- Allows staff users to retrieve any user's User Tour. Returns 200 with the following fields: course_home_tour_status (str): one of UserTour.CourseHomeChoices show_courseware_tour (bool): indicates if courseware tour should be shown. 400 if there is a not allowed request (requesting a user you don't have access to) 401 if unauthorized request 403 if tours are disabled 404 if the UserTour does not exist (shouldn't happen, but safety first) parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/UserTour' tags: - user_tours put: operationId: user_tours_v1_update description: Unsupported method. parameters: - name: data in: body required: true schema: $ref: '#/definitions/UserTour' responses: '200': description: '' schema: $ref: '#/definitions/UserTour' tags: - user_tours patch: operationId: user_tours_v1_partial_update summary: Patch the User Tour for the request.user. description: Supports updating the `course_home_tour_status` and `show_courseware_tour` fields. parameters: - name: data in: body required: true schema: $ref: '#/definitions/UserTour' responses: '200': description: '' schema: $ref: '#/definitions/UserTour' tags: - user_tours parameters: - name: username in: path required: true type: string /val/v0/videos/: get: operationId: val_v0_videos_list description: GETs or POST video objects parameters: - name: page in: query description: A page number within the paginated result set. required: false type: integer - name: page_size in: query description: Number of results to return per page. required: false type: integer responses: '200': description: '' schema: required: - count - results type: object properties: count: type: integer next: type: string format: uri x-nullable: true previous: type: string format: uri x-nullable: true results: type: array items: $ref: '#/definitions/Video' tags: - val post: operationId: val_v0_videos_create description: GETs or POST video objects parameters: - name: data in: body required: true schema: $ref: '#/definitions/Video' responses: '201': description: '' schema: $ref: '#/definitions/Video' tags: - val parameters: [] /val/v0/videos/course-transcripts/{course_id}/: get: operationId: val_v0_videos_course-transcripts_read description: Returns all transcript data for a course when given a course_id. parameters: [] responses: '200': description: '' tags: - val parameters: - name: course_id in: path required: true type: string /val/v0/videos/courses/{course_id}/video-ids: get: operationId: val_v0_videos_courses_video-ids_list description: Returns all video_ids for a course when given a course_id. parameters: [] responses: '200': description: '' tags: - val parameters: - name: course_id in: path required: true type: string /val/v0/videos/missing-hls/: post: operationId: val_v0_videos_missing-hls_create summary: 'Retrieve video IDs that are missing HLS profiles. This endpoint supports 2 types of input data:' description: |- 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', ...] } parameters: [] responses: '201': description: '' tags: - val put: operationId: val_v0_videos_missing-hls_update summary: Update a single profile for a given video. description: |- Example request data: ``` { 'edx_video_id': '1234' 'profile': 'hls', 'encode_data': { 'url': 'foo.com/qwe.m3u8' 'file_size': 34 'bitrate': 12 } } ``` parameters: [] responses: '200': description: '' tags: - val parameters: [] /val/v0/videos/status/: patch: operationId: val_v0_videos_status_partial_update description: Update the status of a video. parameters: [] responses: '200': description: '' tags: - val parameters: [] /val/v0/videos/video-images/update/: post: operationId: val_v0_videos_video-images_update_create description: Update a course video image instance with auto generated image names. parameters: [] responses: '201': description: '' tags: - val parameters: [] /val/v0/videos/video-transcripts/: post: operationId: val_v0_videos_video-transcripts_create description: Creates a video transcript instance with the given information. parameters: [] responses: '201': description: '' tags: - val patch: operationId: val_v0_videos_video-transcripts_partial_update description: Partially update a video transcript, only supporting updating the `provider` field. parameters: [] responses: '200': description: '' tags: - val delete: operationId: val_v0_videos_video-transcripts_delete description: Delete a video transcript instance with the given information. parameters: [] responses: '204': description: '' tags: - val parameters: [] /val/v0/videos/video-transcripts/create/: post: operationId: val_v0_videos_video-transcripts_create_create description: Creates a video transcript instance with the given information. parameters: [] responses: '201': description: '' tags: - val patch: operationId: val_v0_videos_video-transcripts_create_partial_update description: Partially update a video transcript, only supporting updating the `provider` field. parameters: [] responses: '200': description: '' tags: - val delete: operationId: val_v0_videos_video-transcripts_create_delete description: Delete a video transcript instance with the given information. parameters: [] responses: '204': description: '' tags: - val parameters: [] /val/v0/videos/{edx_video_id}: get: operationId: val_v0_videos_read description: Gets a video instance given its edx_video_id parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/Video' tags: - val put: operationId: val_v0_videos_update description: Gets a video instance given its edx_video_id parameters: - name: data in: body required: true schema: $ref: '#/definitions/Video' responses: '200': description: '' schema: $ref: '#/definitions/Video' tags: - val patch: operationId: val_v0_videos_partial_update description: Gets a video instance given its edx_video_id parameters: - name: data in: body required: true schema: $ref: '#/definitions/Video' responses: '200': description: '' schema: $ref: '#/definitions/Video' tags: - val delete: operationId: val_v0_videos_delete description: Gets a video instance given its edx_video_id parameters: [] responses: '204': description: '' tags: - val parameters: - name: edx_video_id in: path required: true type: string pattern: ^[a-zA-Z0-9\-_]*$ /xblock/v2/xblocks/{usage_key}/: get: operationId: xblock_v2_xblocks_read summary: Get metadata about the specified block. description: |- Accepts the following query parameters: * "include": a comma-separated list of keys to include. Valid keys are "index_dictionary" and "student_view_data". parameters: [] responses: '200': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string /xblock/v2/xblocks/{usage_key}/fields/: get: operationId: xblock_v2_xblocks_fields_list description: retrieves the xblock, returning display_name, data, and metadata parameters: [] responses: '200': description: '' tags: - xblock post: operationId: xblock_v2_xblocks_fields_create description: edits the xblock, saving changes to data and metadata only (display_name included in metadata) parameters: [] responses: '201': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string /xblock/v2/xblocks/{usage_key}/handler_url/{handler_name}/: get: operationId: xblock_v2_xblocks_handler_url_read summary: |- Get an absolute URL which can be used (without any authentication) to call the given XBlock handler. description: The URL will expire but is guaranteed to be valid for a minimum of 2 days. parameters: [] responses: '200': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string - name: handler_name in: path required: true type: string /xblock/v2/xblocks/{usage_key}/olx/: get: operationId: xblock_v2_xblocks_olx_list description: Get the OLX (XML serialization) of the specified XBlock parameters: [] responses: '200': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string /xblock/v2/xblocks/{usage_key}/view/{view_name}/: get: operationId: xblock_v2_xblocks_view_read description: Get the HTML, JS, and CSS needed to render the given XBlock. parameters: [] responses: '200': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string - name: view_name in: path required: true type: string /xblock/v2/xblocks/{usage_key}@{version}/: get: operationId: xblock_v2_xblocks_read summary: Get metadata about the specified block. description: |- Accepts the following query parameters: * "include": a comma-separated list of keys to include. Valid keys are "index_dictionary" and "student_view_data". parameters: [] responses: '200': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string - name: version in: path required: true type: string /xblock/v2/xblocks/{usage_key}@{version}/fields/: get: operationId: xblock_v2_xblocks_fields_list description: retrieves the xblock, returning display_name, data, and metadata parameters: [] responses: '200': description: '' tags: - xblock post: operationId: xblock_v2_xblocks_fields_create description: edits the xblock, saving changes to data and metadata only (display_name included in metadata) parameters: [] responses: '201': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string - name: version in: path required: true type: string /xblock/v2/xblocks/{usage_key}@{version}/handler_url/{handler_name}/: get: operationId: xblock_v2_xblocks_handler_url_read summary: |- Get an absolute URL which can be used (without any authentication) to call the given XBlock handler. description: The URL will expire but is guaranteed to be valid for a minimum of 2 days. parameters: [] responses: '200': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string - name: version in: path required: true type: string - name: handler_name in: path required: true type: string /xblock/v2/xblocks/{usage_key}@{version}/olx/: get: operationId: xblock_v2_xblocks_olx_list description: Get the OLX (XML serialization) of the specified XBlock parameters: [] responses: '200': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string - name: version in: path required: true type: string /xblock/v2/xblocks/{usage_key}@{version}/view/{view_name}/: get: operationId: xblock_v2_xblocks_view_read description: Get the HTML, JS, and CSS needed to render the given XBlock. parameters: [] responses: '200': description: '' tags: - xblock parameters: - name: usage_key in: path required: true type: string - name: version in: path required: true type: string - name: view_name in: path required: true type: string definitions: Cohort: description: A cohort representation type: object properties: id: title: ID description: The integer identifier for a cohort. type: integer name: title: Name description: The string identifier for a cohort. type: string user_count: title: User Count description: The number of students in the cohort. type: integer assignment_type: title: Assignment Type description: The assignment type ("manual" or "random"). type: string enum: - manual - random user_partition_id: title: User Partition ID description: The integer identifier of the UserPartition (content group configuration). type: integer x-nullable: true group_id: title: Group ID description: The integer identifier of the specific group in the partition. type: integer x-nullable: true CohortCreate: description: Request body for creating a new cohort required: - name - assignment_type type: object properties: name: title: Name description: The string identifier for a cohort. type: string minLength: 1 assignment_type: title: Assignment Type description: The assignment type ("manual" or "random"). type: string enum: - manual - random user_partition_id: title: User Partition ID description: The integer identifier of the UserPartition (content group configuration). Required if group_id is specified. type: integer group_id: title: Group ID description: The integer identifier of the specific group in the partition. type: integer CohortUpdate: description: Request body for updating a cohort. At least one of name, assignment_type, or group_id must be provided. type: object properties: name: title: Name description: The string identifier for a cohort. type: string minLength: 1 assignment_type: title: Assignment Type description: The assignment type ("manual" or "random"). type: string enum: - manual - random user_partition_id: title: User Partition ID description: The integer identifier of the UserPartition (content group configuration). Required if group_id is specified (non-null). type: integer group_id: title: Group ID description: The integer identifier of the specific group in the partition. Set to null to remove the content group association. type: integer x-nullable: true PermissionValidation: description: The permissions to validate required: - action - scope type: object properties: action: title: Action type: string maxLength: 255 minLength: 1 scope: title: Scope type: string maxLength: 255 minLength: 1 PermissionValidationResponse: required: - action - scope - allowed type: object properties: action: title: Action type: string maxLength: 255 minLength: 1 scope: title: Scope type: string maxLength: 255 minLength: 1 allowed: title: Allowed type: boolean ListRolesWithScopeResponse: required: - role - permissions - user_count type: object properties: role: title: Role type: string maxLength: 255 minLength: 1 permissions: type: array items: type: string maxLength: 255 minLength: 1 user_count: title: User count type: integer AddUsersToRoleWithScope: required: - role - scope - users type: object properties: role: title: Role type: string maxLength: 255 minLength: 1 scope: title: Scope type: string maxLength: 255 minLength: 1 users: type: array items: type: string maxLength: 255 minLength: 1 CCXCourse: required: - master_course_id - display_name - coach_email - start - due - max_students_allowed type: object properties: ccx_course_id: title: Ccx course id type: string readOnly: true master_course_id: title: Master course id type: string minLength: 1 display_name: title: Display name type: string minLength: 1 coach_email: title: Coach email type: string format: email minLength: 1 start: title: Start type: string due: title: Due type: string max_students_allowed: title: Max students allowed type: integer course_modules: title: Course modules type: string readOnly: true CohortUsersAPI: required: - username type: object properties: username: title: Username description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. type: string pattern: ^[\w.@+-]+$ maxLength: 150 minLength: 1 email: title: Email address type: string format: email maxLength: 254 name: title: Name type: string readOnly: true commerce.CourseMode: required: - name - price type: object properties: name: title: Name type: string minLength: 1 currency: title: Currency type: string maxLength: 8 minLength: 1 price: title: Price type: integer sku: title: SKU description: '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.' type: string maxLength: 255 x-nullable: true bulk_sku: title: Bulk SKU description: This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service. type: string maxLength: 255 x-nullable: true expires: title: Expires type: string format: date-time x-nullable: true android_sku: title: Android SKU description: 'OPTIONAL: This is the Android SKU registered on play store for this mode of the course. Leave this blank if the course has not yet been migrated to the ecommerce service.' type: string maxLength: 255 x-nullable: true ios_sku: title: IOS SKU description: 'OPTIONAL: This is the iOS SKU registered on app store for this mode of the course. Leave this blank if the course has not yet been migrated to the ecommerce service.' type: string maxLength: 255 x-nullable: true commerce.Course: required: - id - modes type: object properties: id: title: Id type: string minLength: 1 name: title: Name type: string readOnly: true minLength: 1 verification_deadline: title: Verification deadline type: string format: date-time x-nullable: true modes: type: array items: $ref: '#/definitions/commerce.CourseMode' CourseDeadlinesMobile: type: object properties: dates_banner_info: title: Dates banner info type: string readOnly: true has_ended: title: Has ended type: string readOnly: true CourseTab: required: - tab_id type: object properties: tab_id: title: Tab id type: string minLength: 1 title: title: Title type: string readOnly: true url: title: Url type: string readOnly: true CourseModeSerrializer: required: - slug - name type: object properties: slug: title: Slug type: string minLength: 1 name: title: Name type: string minLength: 1 CourseHomeMetadata: required: - celebrations - course_access - studio_access - course_id - is_enrolled - is_self_paced - is_staff - number - org - original_user_is_staff - start - tabs - title - username - user_timezone - can_view_certificate - course_modes - is_new_discussion_sidebar_view_enabled - has_course_author_access type: object properties: verified_mode: title: Verified mode type: string readOnly: true celebrations: title: Celebrations type: object additionalProperties: type: string x-nullable: true course_access: title: Course access type: object additionalProperties: type: string x-nullable: true studio_access: title: Studio access type: boolean course_id: title: Course id type: string minLength: 1 is_enrolled: title: Is enrolled type: boolean is_self_paced: title: Is self paced type: boolean is_staff: title: Is staff type: boolean number: title: Number type: string minLength: 1 org: title: Org type: string minLength: 1 original_user_is_staff: title: Original user is staff type: boolean start: title: Start type: string format: date-time tabs: type: array items: $ref: '#/definitions/CourseTab' title: title: Title type: string minLength: 1 username: title: Username type: string minLength: 1 user_timezone: title: User timezone type: string minLength: 1 can_view_certificate: title: Can view certificate type: boolean course_modes: type: array items: $ref: '#/definitions/CourseModeSerrializer' is_new_discussion_sidebar_view_enabled: title: Is new discussion sidebar view enabled type: boolean has_course_author_access: title: Has course author access type: boolean DateSummary: required: - complete - date - date_type - description - link_text - title - extra_info type: object properties: assignment_type: title: Assignment type type: string minLength: 1 complete: title: Complete type: boolean x-nullable: true date: title: Date type: string format: date-time date_type: title: Date type type: string minLength: 1 description: title: Description type: string minLength: 1 learner_has_access: title: Learner has access type: string readOnly: true link: title: Link type: string readOnly: true link_text: title: Link text type: string minLength: 1 title: title: Title type: string minLength: 1 extra_info: title: Extra info type: string minLength: 1 first_component_block_id: title: First component block id type: string readOnly: true DatesTab: required: - course_date_blocks - has_ended - learner_is_full_access - user_timezone type: object properties: dates_banner_info: title: Dates banner info type: string readOnly: true course_date_blocks: type: array items: $ref: '#/definitions/DateSummary' has_ended: title: Has ended type: boolean learner_is_full_access: title: Learner is full access type: boolean user_timezone: title: User timezone type: string minLength: 1 CourseBlock: type: object properties: blocks: title: Blocks type: string readOnly: true CertificateData: required: - cert_status - cert_web_view_url - download_url - certificate_available_date type: object properties: cert_status: title: Cert status type: string minLength: 1 cert_web_view_url: title: Cert web view url type: string minLength: 1 download_url: title: Download url type: string minLength: 1 certificate_available_date: title: Certificate available date type: string format: date-time CourseGoals: required: - selected_goal type: object properties: selected_goal: title: Selected goal type: object additionalProperties: type: string x-nullable: true weekly_learning_goal_enabled: title: Weekly learning goal enabled type: boolean default: false CourseTool: required: - analytics_id - title type: object properties: analytics_id: title: Analytics id type: string minLength: 1 title: title: Title type: string minLength: 1 url: title: Url type: string readOnly: true DatesWidget: required: - course_date_blocks - dates_tab_link - user_timezone type: object properties: course_date_blocks: type: array items: $ref: '#/definitions/DateSummary' dates_tab_link: title: Dates tab link type: string minLength: 1 user_timezone: title: User timezone type: string minLength: 1 EnrollAlert: required: - can_enroll - extra_text type: object properties: can_enroll: title: Can enroll type: boolean extra_text: title: Extra text type: string minLength: 1 ResumeCourse: required: - has_visited_course - url type: object properties: has_visited_course: title: Has visited course type: boolean url: title: Url type: string format: uri minLength: 1 OutlineTab: required: - access_expiration - cert_data - course_blocks - course_goals - course_tools - dates_widget - enroll_alert - enrollment_mode - enable_proctored_exams - handouts_html - has_ended - offer - resume_course - welcome_message_html - user_has_passing_grade type: object properties: dates_banner_info: title: Dates banner info type: string readOnly: true verified_mode: title: Verified mode type: string readOnly: true access_expiration: title: Access expiration type: object additionalProperties: type: string x-nullable: true cert_data: $ref: '#/definitions/CertificateData' course_blocks: $ref: '#/definitions/CourseBlock' course_goals: $ref: '#/definitions/CourseGoals' course_tools: type: array items: $ref: '#/definitions/CourseTool' dates_widget: $ref: '#/definitions/DatesWidget' enroll_alert: $ref: '#/definitions/EnrollAlert' enrollment_mode: title: Enrollment mode type: string minLength: 1 enable_proctored_exams: title: Enable proctored exams type: boolean handouts_html: title: Handouts html type: string minLength: 1 has_ended: title: Has ended type: boolean offer: title: Offer type: object additionalProperties: type: string x-nullable: true resume_course: $ref: '#/definitions/ResumeCourse' welcome_message_html: title: Welcome message html type: string minLength: 1 user_has_passing_grade: title: User has passing grade type: boolean CourseGrade: required: - letter_grade - percent - is_passing type: object properties: letter_grade: title: Letter grade type: string minLength: 1 percent: title: Percent type: number is_passing: title: Is passing type: boolean GradingPolicy: required: - grade_range type: object properties: assignment_policies: title: Assignment policies type: string readOnly: true grade_range: title: Grade range type: object additionalProperties: type: string x-nullable: true assignment_colors: title: Assignment colors type: string readOnly: true SubsectionScores: required: - assignment_type - display_name - due - has_graded_assignment - num_points_earned - num_points_possible - percent_graded - show_correctness type: object properties: assignment_type: title: Assignment type type: string minLength: 1 block_key: title: Block key type: string readOnly: true display_name: title: Display name type: string minLength: 1 due: title: Due type: string format: date-time x-nullable: true has_graded_assignment: title: Has graded assignment type: boolean override: title: Override type: string readOnly: true learner_has_access: title: Learner has access type: string readOnly: true num_points_earned: title: Num points earned type: number num_points_possible: title: Num points possible type: number percent_graded: title: Percent graded type: number problem_scores: title: Problem scores type: string readOnly: true show_correctness: title: Show correctness type: string minLength: 1 show_grades: title: Show grades type: string readOnly: true url: title: Url type: string readOnly: true SectionScores: required: - display_name - subsections type: object properties: display_name: title: Display name type: string minLength: 1 subsections: type: array items: $ref: '#/definitions/SubsectionScores' VerificationData: required: - link - status - status_date type: object properties: link: title: Link type: string format: uri minLength: 1 status: title: Status type: string minLength: 1 status_date: title: Status date type: string format: date-time AssignmentTypeScores: required: - type - weight - average_grade - weighted_grade - last_grade_publish_date - has_hidden_contribution - short_label - num_droppable type: object properties: type: title: Type type: string minLength: 1 weight: title: Weight type: number average_grade: title: Average grade type: number weighted_grade: title: Weighted grade type: number last_grade_publish_date: title: Last grade publish date type: string format: date-time has_hidden_contribution: title: Has hidden contribution type: string minLength: 1 short_label: title: Short label type: string minLength: 1 num_droppable: title: Num droppable type: integer ProgressTab: required: - access_expiration - certificate_data - completion_summary - course_grade - credit_course_requirements - end - enrollment_mode - grading_policy - has_scheduled_content - section_scores - studio_url - username - user_has_passing_grade - verification_data - disable_progress_graph - assignment_type_grade_summary - final_grades type: object properties: verified_mode: title: Verified mode type: string readOnly: true access_expiration: title: Access expiration type: object additionalProperties: type: string x-nullable: true certificate_data: $ref: '#/definitions/CertificateData' completion_summary: title: Completion summary type: object additionalProperties: type: string x-nullable: true course_grade: $ref: '#/definitions/CourseGrade' credit_course_requirements: title: Credit course requirements type: object additionalProperties: type: string x-nullable: true end: title: End type: string format: date-time enrollment_mode: title: Enrollment mode type: string minLength: 1 grading_policy: $ref: '#/definitions/GradingPolicy' has_scheduled_content: title: Has scheduled content type: boolean section_scores: type: array items: $ref: '#/definitions/SectionScores' studio_url: title: Studio url type: string minLength: 1 username: title: Username type: string minLength: 1 user_has_passing_grade: title: User has passing grade type: boolean verification_data: $ref: '#/definitions/VerificationData' disable_progress_graph: title: Disable progress graph type: boolean assignment_type_grade_summary: type: array items: $ref: '#/definitions/AssignmentTypeScores' final_grades: title: Final grades type: number Lti: required: - lti_config type: object properties: lti_1p1_client_key: title: Lti 1p1 client key description: Client key provided by the LTI tool provider. type: string maxLength: 255 lti_1p1_client_secret: title: Lti 1p1 client secret description: Client secret provided by the LTI tool provider. type: string maxLength: 255 lti_1p1_launch_url: title: Lti 1p1 launch url description: The URL of the external tool that initiates the launch. type: string maxLength: 255 version: title: Version type: string enum: - lti_1p1 - lti_1p3 lti_config: title: Lti config type: object CourseLiveConfiguration: required: - provider_type type: object properties: course_key: title: Course key type: string readOnly: true minLength: 1 provider_type: title: LTI provider description: The LTI provider's id type: string maxLength: 50 minLength: 1 enabled: title: Enabled description: If disabled, the LTI in the associated course will be disabled. type: boolean lti_configuration: $ref: '#/definitions/Lti' pii_sharing_allowed: title: Pii sharing allowed type: string readOnly: true free_tier: title: Free tier description: True, if LTI credential are provided by Org globally type: boolean course_modes.CourseMode: required: - course_id - mode_slug - mode_display_name - currency type: object properties: course_id: title: Course id type: string minLength: 1 mode_slug: title: Mode slug type: string minLength: 1 mode_display_name: title: Mode display name type: string minLength: 1 min_price: title: Min price type: integer currency: title: Currency type: string minLength: 1 expiration_datetime: title: Expiration datetime type: string format: date-time expiration_datetime_is_explicit: title: Expiration datetime is explicit type: boolean description: title: Description type: string minLength: 1 sku: title: Sku type: string minLength: 1 bulk_sku: title: Bulk sku type: string minLength: 1 _AbsolutMedia: type: object properties: uri: title: Uri type: string readOnly: true uri_absolute: title: Uri absolute type: string readOnly: true _Media: type: object properties: uri: title: Uri type: string readOnly: true Image: required: - raw - small - large type: object properties: raw: title: Raw type: string format: uri minLength: 1 small: title: Small type: string format: uri minLength: 1 large: title: Large type: string format: uri minLength: 1 _CourseApiMediaCollection: required: - banner_image - course_image - course_video - image type: object properties: banner_image: $ref: '#/definitions/_AbsolutMedia' course_image: $ref: '#/definitions/_Media' course_video: $ref: '#/definitions/_Media' image: $ref: '#/definitions/Image' Course: required: - effort - end - enrollment_start - enrollment_end - id - media - name - number - org - short_description - start - start_display - start_type - pacing - mobile_available - invitation_only type: object properties: blocks_url: title: Blocks url type: string readOnly: true effort: title: Effort type: string minLength: 1 end: title: End type: string format: date-time enrollment_start: title: Enrollment start type: string format: date-time enrollment_end: title: Enrollment end type: string format: date-time id: title: Id type: string minLength: 1 media: $ref: '#/definitions/_CourseApiMediaCollection' name: title: Name type: string minLength: 1 number: title: Number type: string minLength: 1 org: title: Org type: string minLength: 1 short_description: title: Short description type: string minLength: 1 start: title: Start type: string format: date-time start_display: title: Start display type: string minLength: 1 start_type: title: Start type type: string minLength: 1 pacing: title: Pacing type: string minLength: 1 mobile_available: title: Mobile available type: boolean hidden: title: Hidden type: string readOnly: true invitation_only: title: Invitation only type: boolean course_id: title: Course id type: string readOnly: true minLength: 1 CourseDetail: required: - effort - end - enrollment_start - enrollment_end - id - media - name - number - org - short_description - start - start_display - start_type - pacing - mobile_available - invitation_only type: object properties: blocks_url: title: Blocks url type: string readOnly: true effort: title: Effort type: string minLength: 1 end: title: End type: string format: date-time enrollment_start: title: Enrollment start type: string format: date-time enrollment_end: title: Enrollment end type: string format: date-time id: title: Id type: string minLength: 1 media: $ref: '#/definitions/_CourseApiMediaCollection' name: title: Name type: string minLength: 1 number: title: Number type: string minLength: 1 org: title: Org type: string minLength: 1 short_description: title: Short description type: string minLength: 1 start: title: Start type: string format: date-time start_display: title: Start display type: string minLength: 1 start_type: title: Start type type: string minLength: 1 pacing: title: Pacing type: string minLength: 1 mobile_available: title: Mobile available type: boolean hidden: title: Hidden type: string readOnly: true invitation_only: title: Invitation only type: boolean course_id: title: Course id type: string readOnly: true minLength: 1 overview: title: Overview type: string readOnly: true CreditCourse: required: - course_key type: object properties: course_key: title: Course key type: string enabled: title: Enabled type: boolean CreditEligibility: required: - username type: object properties: username: title: Username type: string maxLength: 255 minLength: 1 course_key: title: Course key type: string readOnly: true deadline: title: Deadline description: Deadline for purchasing and requesting credit. type: string format: date-time CreditProvider: required: - id - display_name - url - status_url - description type: object properties: id: title: Id type: string minLength: 1 display_name: title: Display name description: Name of the credit provider displayed to users type: string maxLength: 255 minLength: 1 url: title: Url type: string format: uri minLength: 1 status_url: title: Status url type: string format: uri minLength: 1 description: title: Description type: string minLength: 1 enable_integration: title: Enable integration description: 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. type: boolean fulfillment_instructions: title: Fulfillment instructions description: 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. type: string x-nullable: true thumbnail_url: title: Thumbnail url description: Thumbnail image url of the credit provider. type: string format: uri maxLength: 255 minLength: 1 BlackoutDate: required: - start - end type: object properties: start: title: Start description: The ISO 8601 timestamp for the start of the blackout period type: string format: date-time end: title: End description: The ISO 8601 timestamp for the end of the blackout period type: string format: date-time ReasonCodeSeralizer: required: - code - label type: object properties: code: title: Code description: A code for the an edit or close reason type: string minLength: 1 label: title: Label description: A user-friendly name text for the close or edit reason type: string minLength: 1 CourseMetadataSerailizer: required: - id - blackouts - thread_list_url - following_thread_list_url - topics_url - allow_anonymous - allow_anonymous_to_peers - user_roles - user_is_privileged - provider - enable_in_context - group_at_subsection - post_close_reasons - edit_reasons type: object properties: id: title: Id description: The identifier of the course type: string blackouts: description: A list of objects representing blackout periods (during which discussions are read-only except for privileged users). type: array items: $ref: '#/definitions/BlackoutDate' thread_list_url: title: Thread list url description: The URL of the list of all threads in the course. type: string format: uri minLength: 1 following_thread_list_url: title: Following thread list url description: thread_list_url with parameter following=True type: string format: uri minLength: 1 topics_url: title: Topics url description: The URL of the topic listing for the course. type: string format: uri minLength: 1 allow_anonymous: title: Allow anonymous description: A boolean indicating whether anonymous posts are allowed or not. type: boolean allow_anonymous_to_peers: title: Allow anonymous to peers description: A boolean indicating whether posts anonymous to peers are allowed or not. type: boolean user_roles: description: A list of all the roles the requesting user has for this course. type: array items: type: string minLength: 1 user_is_privileged: title: User is privileged description: A boolean indicating if the current user has a privileged role type: boolean provider: title: Provider description: The discussion provider used by this course type: string minLength: 1 enable_in_context: title: Enable in context description: A boolean indicating whether in-context discussion is enabled for the course type: boolean group_at_subsection: title: Group at subsection description: A boolean indicating whether discussions should be grouped at subsection type: boolean post_close_reasons: description: A list of reasons that can be specified by moderators for closing a post type: array items: $ref: '#/definitions/ReasonCodeSeralizer' edit_reasons: description: A list of reasons that can be specified by moderators for editing a post, response, or comment type: array items: $ref: '#/definitions/ReasonCodeSeralizer' DiscussionTopicSerializerV2: type: object properties: id: title: Id description: Provider-specific unique id for the topic type: string readOnly: true minLength: 1 usage_key: title: Usage key description: Usage context for the topic type: string readOnly: true minLength: 1 name: title: Name description: Topic name type: string readOnly: true minLength: 1 thread_counts: title: Thread counts description: Mapping of thread counts by type of thread type: object readOnly: true enabled_in_context: title: Enabled in context description: Whether this topic is enabled in its context type: boolean readOnly: true CourseEnrollmentsApiList: required: - course_id type: object properties: created: title: Created type: string format: date-time readOnly: true x-nullable: true mode: title: Mode type: string maxLength: 100 minLength: 1 is_active: title: Is active type: boolean user: title: User type: string readOnly: true course_id: title: Course id type: string minLength: 1 CourseEntitlement: required: - user - course_uuid - mode type: object properties: user: title: User type: string pattern: ^[\w.@+-]+$ uuid: title: Uuid type: string format: uuid readOnly: true course_uuid: title: Course uuid description: UUID for the Course, not the Course Run type: string format: uuid enrollment_course_run: title: Enrollment course run type: string readOnly: true minLength: 1 expired_at: title: Expired at description: The date that an entitlement expired, if NULL the entitlement has not expired. type: string format: date-time x-nullable: true created: title: Created type: string format: date-time readOnly: true modified: title: Modified type: string format: date-time readOnly: true mode: title: Mode description: The mode of the Course that will be applied on enroll. type: string maxLength: 100 minLength: 1 refund_locked: title: Refund locked type: boolean order_number: title: Order number type: string maxLength: 128 minLength: 1 x-nullable: true support_details: title: Support details type: string readOnly: true ExperimentData: required: - experiment_id - key - value type: object properties: id: title: ID type: integer readOnly: true experiment_id: title: Experiment ID type: integer maximum: 65535 minimum: 0 user: title: User type: string pattern: ^[\w.@+-]+$ readOnly: true key: title: Key type: string maxLength: 255 minLength: 1 value: title: Value type: string minLength: 1 created: title: Created type: string format: date-time readOnly: true modified: title: Modified type: string format: date-time readOnly: true ExperimentDataCreate: required: - experiment_id - key - value type: object properties: id: title: ID type: integer readOnly: true experiment_id: title: Experiment ID type: integer maximum: 65535 minimum: 0 user: title: User type: string pattern: ^[\w.@+-]+$ key: title: Key type: string maxLength: 255 minLength: 1 value: title: Value type: string minLength: 1 created: title: Created type: string format: date-time readOnly: true modified: title: Modified type: string format: date-time readOnly: true ExperimentKeyValue: required: - experiment_id - key - value type: object properties: id: title: ID type: integer readOnly: true experiment_id: title: Experiment ID type: integer maximum: 65535 minimum: 0 key: title: Key type: string maxLength: 255 minLength: 1 value: title: Value type: string minLength: 1 created: title: Created type: string format: date-time readOnly: true modified: title: Modified type: string format: date-time readOnly: true ReportDownload: description: Report Download required: - url - name - link type: object properties: url: title: Url description: URL from which report can be downloaded. type: string format: uri minLength: 1 name: title: Name description: Name of report. type: string minLength: 1 link: title: Link description: HTML anchor tag that contains the name and link. type: string minLength: 1 ReportDownloadsList: required: - downloads type: object properties: downloads: description: List of report downloads type: array items: $ref: '#/definitions/ReportDownload' ProblemResponseReportPostParams: required: - problem_locations type: object properties: problem_locations: description: 'A list of usage keys for the blocks to include in the report. ' type: array items: description: 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. type: string minLength: 1 problem_types_filter: description: 'A list of problem/block types to generate the report for. This field can be omitted if the report should include details of allblock types. ' type: array items: type: string minLength: 1 ProblemResponsesReportStatus: required: - status - task_id type: object properties: status: title: Status description: User-friendly text describing current status of report generation. type: string minLength: 1 task_id: title: Task id description: A unique id for the report generation task. It can be used to query the latest report generation status. type: string format: uuid InstructorTaskSerializerV2: required: - status - task_type - task_id - created - task_input - requester - task_state - duration_sec - task_message type: object properties: status: title: Status description: Current status of task. type: string minLength: 1 task_type: title: Task type description: Identifies the kind of task being performed, e.g. rescoring. type: string minLength: 1 task_id: title: Task id description: The celery ID for the task. type: string minLength: 1 created: title: Created description: The date and time when the task was created. type: string format: date-time task_input: title: Task input description: 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. type: object additionalProperties: type: string x-nullable: true requester: title: Requester description: The username of the user who initiated this task. type: string minLength: 1 task_state: title: Task state description: The last knows state of the celery task. type: string minLength: 1 duration_sec: title: Duration sec description: Task duration information, if known type: string minLength: 1 task_message: title: Task message description: User-friendly task status information, if available. type: string minLength: 1 InstructorTasksList: required: - tasks type: object properties: tasks: description: List of instructor tasks. type: array items: $ref: '#/definitions/InstructorTaskSerializerV2' CourseInformationSerializerV2: type: object properties: course_id: title: Course id description: Course run key type: string readOnly: true display_name: title: Display name description: Course display name type: string readOnly: true org: title: Org description: Organization identifier type: string readOnly: true course_number: title: Course number description: Course number type: string readOnly: true course_run: title: Course run description: Course run identifier type: string readOnly: true enrollment_start: title: Enrollment start description: Enrollment start date (ISO 8601 with timezone) type: string readOnly: true enrollment_end: title: Enrollment end description: Enrollment end date (ISO 8601 with timezone) type: string readOnly: true start: title: Start description: Course start date (ISO 8601 with timezone) type: string readOnly: true end: title: End description: Course end date (ISO 8601 with timezone) type: string readOnly: true pacing: title: Pacing description: Course pacing type (self or instructor) type: string readOnly: true has_started: title: Has started description: Whether the course has started based on current time type: string readOnly: true has_ended: title: Has ended description: Whether the course has ended based on current time type: string readOnly: true total_enrollment: title: Total enrollment description: Total number of enrollments across all modes type: string readOnly: true enrollment_counts: title: Enrollment counts description: Enrollment count breakdown by mode type: string readOnly: true num_sections: title: Num sections description: Number of sections/chapters in the course type: string readOnly: true grade_cutoffs: title: Grade cutoffs description: Formatted string of grade cutoffs type: string readOnly: true course_errors: title: Course errors description: List of course validation errors from modulestore type: string readOnly: true studio_url: title: Studio url description: URL to view/edit course in Studio type: string readOnly: true permissions: title: Permissions description: User permissions for instructor dashboard features type: string readOnly: true tabs: title: Tabs description: List of course tabs with configuration and display information type: string readOnly: true disable_buttons: title: Disable buttons description: Whether to disable certain bulk action buttons due to large course size type: string readOnly: true analytics_dashboard_message: title: Analytics dashboard message description: Message about analytics dashboard availability type: string readOnly: true InstructorTask: required: - task_id - task_type - task_state - status - created - duration_sec - task_message - requester - task_input - task_output type: object properties: task_id: title: Task id type: string format: uuid task_type: title: Task type type: string minLength: 1 task_state: title: Task state type: string enum: - PENDING - PROGRESS - SUCCESS - FAILURE - REVOKED status: title: Status type: string minLength: 1 created: title: Created type: string format: date-time duration_sec: title: Duration sec type: string minLength: 1 task_message: title: Task message type: string minLength: 1 requester: title: Requester type: string minLength: 1 task_input: title: Task input type: string minLength: 1 task_output: title: Task output type: string minLength: 1 x-nullable: true InstructorTaskList: required: - tasks type: object properties: tasks: type: array items: $ref: '#/definitions/InstructorTask' ScheduledBulkEmail: required: - task - task_due type: object properties: id: title: ID type: integer readOnly: true course_email: title: Course email type: string readOnly: true task: title: Task type: integer task_due: title: Task due type: string format: date-time LtiAgsLineItem: required: - resourceId - scoreMaximum - label type: object properties: id: title: Id type: string readOnly: true resourceId: title: Resourceid type: string minLength: 1 scoreMaximum: title: Scoremaximum type: integer label: title: Label type: string maxLength: 100 minLength: 1 tag: title: Tag type: string maxLength: 50 resourceLinkId: title: Resourcelinkid type: string startDateTime: title: Startdatetime type: string format: date-time endDateTime: title: Enddatetime type: string format: date-time GCMDevice: required: - registration_id type: object properties: id: title: ID type: integer name: title: Name type: string maxLength: 255 x-nullable: true registration_id: title: Registration ID type: string minLength: 1 device_id: title: Device id description: 'ANDROID_ID / TelephonyManager.getDeviceId() (e.g: 0x01)' type: integer x-nullable: true active: title: Is active description: Inactive devices will not be sent notifications type: boolean date_created: title: Creation date type: string format: date-time readOnly: true x-nullable: true cloud_message_type: title: Cloud Message Type description: You should choose FCM, GCM is deprecated type: string enum: - FCM - GCM application_id: title: Application ID description: Opaque application identity, should be filled in for multiple key/certificate access type: string maxLength: 64 x-nullable: true mobile_api.User: required: - username type: object properties: id: title: ID type: integer readOnly: true username: title: Username description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. type: string pattern: ^[\w.@+-]+$ maxLength: 150 minLength: 1 email: title: Email address type: string format: email maxLength: 254 name: title: Name type: string readOnly: true course_enrollments: title: Course enrollments type: string readOnly: true Notification: required: - app_name - notification_type type: object properties: id: title: ID type: integer readOnly: true app_name: title: App name type: string maxLength: 64 minLength: 1 notification_type: title: Notification type type: string maxLength: 64 minLength: 1 content_context: title: Content context type: object content: title: Content type: string readOnly: true content_url: title: Content url type: string format: uri maxLength: 200 x-nullable: true course_id: title: Course id type: string maxLength: 255 x-nullable: true last_read: title: Last read type: string format: date-time x-nullable: true last_seen: title: Last seen type: string format: date-time x-nullable: true created: title: Created type: string format: date-time readOnly: true Organization: required: - name - short_name type: object properties: id: title: ID type: integer readOnly: true created: title: Created type: string format: date-time readOnly: true modified: title: Modified type: string format: date-time readOnly: true name: title: Name type: string maxLength: 255 minLength: 1 short_name: title: Short Name description: Unique, short string identifier for organization. Please do not use spaces or special characters. Only allowed special characters are period (.), hyphen (-) and underscore (_). type: string maxLength: 255 minLength: 1 description: title: Description type: string x-nullable: true logo: title: Logo description: Please add only .PNG files for logo images. This logo will be used on certificates. type: string readOnly: true x-nullable: true format: uri active: title: Active type: boolean logo_url: title: Logo url type: string minLength: 1 DueDate: required: - name - url - date type: object properties: name: title: Name type: string minLength: 1 url: title: Url type: string minLength: 1 date: title: Date type: string format: date-time CourseRunOverview: required: - course_run_id - display_name - course_run_url - start_date - end_date - course_run_status - due_dates type: object properties: course_run_id: title: Course run id description: ID for the course run. type: string minLength: 1 display_name: title: Display name description: Display name of the course run. type: string minLength: 1 resume_course_run_url: title: Resume course run url description: 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. type: string minLength: 1 course_run_url: title: Course run url description: The absolute url for the course run. type: string minLength: 1 start_date: title: Start date description: Start date for the course run; null if no start date. type: string format: date-time end_date: title: End date description: End date for the course run; null if no end date. type: string format: date-time course_run_status: title: Course run status description: The user's status of the course run. type: string enum: - in_progress - upcoming - completed emails_enabled: title: Emails enabled description: 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. type: boolean due_dates: description: List of subsection due dates for the course run. Due dates are only returned if the course run is in progress. type: array items: $ref: '#/definitions/DueDate' micromasters_title: title: Micromasters title description: 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. type: string minLength: 1 certificate_download_url: title: Certificate download url description: URL to download a certificate, if available; if absent, certificate is not downloadable. type: string minLength: 1 CourseRunOverviewList: required: - course_runs type: object properties: course_runs: type: array items: $ref: '#/definitions/CourseRunOverview' PageOfCourseRunOverview: required: - results type: object properties: previous: title: Previous description: Link to the previous page or results, or null if this is the first. type: string format: uri minLength: 1 next: title: Next description: Link to the next page of results, or null if this is the last. type: string format: uri minLength: 1 results: description: The list of result objects on this page. type: array items: $ref: '#/definitions/CourseRunOverview' CourseTeamManage: required: - id type: object properties: id: title: Id type: string maxLength: 255 minLength: 1 display_name: title: Display name type: string minLength: 1 x-nullable: true role: title: Role type: string readOnly: true status: title: Status type: string readOnly: true course_url: title: Course url type: string readOnly: true IDVerificationDetails: required: - status - expiration_datetime - updated_at type: object properties: type: title: Type type: string readOnly: true status: title: Status type: string minLength: 1 expiration_datetime: title: Expiration datetime type: string format: date-time message: title: Message type: string readOnly: true updated_at: title: Updated at type: string format: date-time receipt_id: title: Receipt id type: string readOnly: true user_api.User: type: object properties: id: title: ID type: integer readOnly: true url: title: Url type: string format: uri readOnly: true email: title: Email address type: string format: email readOnly: true minLength: 1 name: title: Name type: string readOnly: true username: title: Username description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. type: string readOnly: true minLength: 1 preferences: title: Preferences type: string readOnly: true CountryTimeZone: required: - time_zone - description type: object properties: time_zone: title: Time zone type: string minLength: 1 description: title: Description type: string minLength: 1 UserPreference: required: - user - key - value type: object properties: user: $ref: '#/definitions/user_api.User' key: title: Key type: string pattern: '[-_a-zA-Z0-9]+' maxLength: 255 minLength: 1 value: title: Value type: string minLength: 1 url: title: Url type: string format: uri readOnly: true UserTour: type: object properties: course_home_tour_status: title: Course home tour status type: string enum: - show-existing-user-tour - show-new-user-tour - no-tour show_courseware_tour: title: Show courseware tour type: boolean EncodedVideo: required: - url - file_size - bitrate - profile type: object properties: created: title: Created type: string format: date-time modified: title: Modified type: string format: date-time url: title: Url type: string maxLength: 200 minLength: 1 file_size: title: File size type: integer minimum: 0 bitrate: title: Bitrate type: integer minimum: 0 profile: title: Profile type: string pattern: ^[a-zA-Z0-9\-_]*$ Video: required: - encoded_videos - edx_video_id - duration - status type: object properties: encoded_videos: type: array items: $ref: '#/definitions/EncodedVideo' courses: type: array items: type: string uniqueItems: true url: title: Url type: string readOnly: true created: title: Created type: string format: date-time edx_video_id: title: Edx video id type: string pattern: ^[a-zA-Z0-9\-_]*$ maxLength: 100 minLength: 1 client_video_id: title: Client video id type: string maxLength: 255 duration: title: Duration type: number minimum: 0 status: title: Status type: string maxLength: 255 minLength: 1 error_description: title: Error Description type: string x-nullable: true