Files
edx-platform/docs/swagger.yaml
2022-06-20 18:20:06 +05:00

9097 lines
274 KiB
YAML

swagger: '2.0'
info:
title: Open edX API
description: APIs for access to Open edX information
contact:
email: oscm@edx.org
version: v1
basePath: /api
consumes:
- application/json
produces:
- application/json
securityDefinitions:
Basic:
type: basic
security:
- Basic: []
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
/badges/v1/assertions/user/{username}/:
get:
operationId: badges_v1_assertions_user_read
summary: '**Use Cases**'
description: |-
Request a list of assertions for a user, optionally constrained to a course.
**Example Requests**
GET /api/badges/v1/assertions/user/{username}/
**Response Values**
Body comprised of a list of objects with the following fields:
* badge_class: The badge class the assertion was awarded for. Represented as an object
with the following fields:
* slug: The identifier for the badge class
* issuing_component: The software component responsible for issuing this badge.
* display_name: The display name of the badge.
* course_id: The course key of the course this badge is scoped to, or null if it isn't scoped to a course.
* description: A description of the award and its significance.
* criteria: A description of what is needed to obtain this award.
* image_url: A URL to the icon image used to represent this award.
* image_url: The baked assertion image derived from the badge_class icon-- contains metadata about the award
in its headers.
* assertion_url: The URL to the OpenBadges BadgeAssertion object, for verification by compatible tools
and software.
**Params**
* slug (optional): The identifier for a particular badge class to filter by.
* issuing_component (optional): The issuing component for a particular badge class to filter by
(requires slug to have been specified, or this will be ignored.) If slug is provided and this is not,
assumes the issuing_component should be empty.
* course_id (optional): Returns assertions that were awarded as part of a particular course. If slug is
provided, and this field is not specified, assumes that the target badge has an empty course_id field.
'*' may be used to get all badges with the specified slug, issuing_component combination across all courses.
**Returns**
* 200 on success, with a list of Badge Assertion objects.
* 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
{
"count": 7,
"previous": null,
"num_pages": 1,
"results": [
{
"badge_class": {
"slug": "special_award",
"issuing_component": "openedx__course",
"display_name": "Very Special Award",
"course_id": "course-v1:edX+DemoX+Demo_Course",
"description": "Awarded for people who did something incredibly special",
"criteria": "Do something incredibly special.",
"image": "http://example.com/media/badge_classes/badges/special_xdpqpBv_9FYOZwN.png"
},
"image_url": "http://badges.example.com/media/issued/cd75b69fc1c979fcc1697c8403da2bdf.png",
"assertion_url": "http://badges.example.com/public/assertions/07020647-e772-44dd-98b7-d13d34335ca6"
},
...
]
}
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/BadgeAssertion'
tags:
- badges
parameters:
- name: username
in: path
required: true
type: string
/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=<course_id>"
to only include bookmarks from a particular course.
The bookmarks are always sorted in descending order by creation date.
Each page in the list contains 10 bookmarks by default. The page
size can be altered by passing parameter "page_size=<page_size>".
To include the optional fields pass the values in "fields" parameter
as a comma separated list. Possible values are:
* "display_name"
* "path"
**Example Requests**
GET /api/bookmarks/v1/bookmarks/?course_id={course_id1}&fields=display_name,path
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": <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: usage_id
in: path
required: true
type: string
- name: username
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 bookmarks 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: Gets a certificate information.
parameters: []
responses:
'200':
description: ''
tags:
- certificates
parameters:
- name: course_id
in: path
required: true
type: string
- name: username
in: path
required: true
type: string
/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: ''
schema:
type: object
properties: {}
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:
type: object
properties: {}
responses:
'201':
description: ''
schema:
type: object
properties: {}
tags:
- cohorts
patch:
operationId: cohorts_v1_courses_cohorts_partial_update
description: Endpoint to update a cohort name and/or assignment type.
parameters:
- name: data
in: body
required: true
schema:
type: object
properties: {}
responses:
'200':
description: ''
schema:
type: object
properties: {}
tags:
- cohorts
parameters:
- name: cohort_id
in: path
required: true
type: string
- name: course_key_string
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: cohort_id
in: path
required: true
type: string
- name: course_key_string
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}/(P{subsection_id}[/]*):
get:
operationId: completion_v1_subsection-completion_]*)_list
description: Returns completion for a (user, subsection, course).
parameters: []
responses:
'200':
description: ''
tags:
- completion
parameters:
- name: course_key
in: path
required: true
type: string
- name: subsection_id
in: path
required: true
type: string
- name: username
in: path
required: true
type: string
? /course_experience/v1/course_deadlines_info/(P{course_key_string}[/+]+{var}[/+]+api/course_experience/v1/course_deadlines_info/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: course_experience_v1_course_deadlines_info_+]+api_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
- name: var
in: path
required: true
type: string
/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_goals/v0/course_goals/:
get:
operationId: course_goals_v0_course_goals_list
summary: API calls to create and update a course goal.
description: |-
Validates incoming data to ensure that course_key maps to an actual
course and that the goal_key is a valid option.
**Use Case**
* Create a new goal for a user.
* Update an existing goal for a user
**Example Requests**
POST /api/course_goals/v0/course_goals/
Request data: {"course_key": <course-key>, "goal_key": "<goal-key>", "user": "<username>"}
Returns Http400 response if the course_key does not map to a known
course or if the goal_key does not map to a valid goal key.
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/CourseGoal'
tags:
- course_goals
post:
operationId: course_goals_v0_course_goals_create
description: Create a new goal if one does not exist, otherwise update the existing
goal.
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/CourseGoal'
responses:
'201':
description: ''
schema:
$ref: '#/definitions/CourseGoal'
tags:
- course_goals
parameters: []
/course_goals/v0/course_goals/{id}/:
get:
operationId: course_goals_v0_course_goals_read
summary: API calls to create and update a course goal.
description: |-
Validates incoming data to ensure that course_key maps to an actual
course and that the goal_key is a valid option.
**Use Case**
* Create a new goal for a user.
* Update an existing goal for a user
**Example Requests**
POST /api/course_goals/v0/course_goals/
Request data: {"course_key": <course-key>, "goal_key": "<goal-key>", "user": "<username>"}
Returns Http400 response if the course_key does not map to a known
course or if the goal_key does not map to a valid goal key.
parameters: []
responses:
'200':
description: ''
schema:
$ref: '#/definitions/CourseGoal'
tags:
- course_goals
put:
operationId: course_goals_v0_course_goals_update
summary: API calls to create and update a course goal.
description: |-
Validates incoming data to ensure that course_key maps to an actual
course and that the goal_key is a valid option.
**Use Case**
* Create a new goal for a user.
* Update an existing goal for a user
**Example Requests**
POST /api/course_goals/v0/course_goals/
Request data: {"course_key": <course-key>, "goal_key": "<goal-key>", "user": "<username>"}
Returns Http400 response if the course_key does not map to a known
course or if the goal_key does not map to a valid goal key.
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/CourseGoal'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/CourseGoal'
tags:
- course_goals
patch:
operationId: course_goals_v0_course_goals_partial_update
summary: API calls to create and update a course goal.
description: |-
Validates incoming data to ensure that course_key maps to an actual
course and that the goal_key is a valid option.
**Use Case**
* Create a new goal for a user.
* Update an existing goal for a user
**Example Requests**
POST /api/course_goals/v0/course_goals/
Request data: {"course_key": <course-key>, "goal_key": "<goal-key>", "user": "<username>"}
Returns Http400 response if the course_key does not map to a known
course or if the goal_key does not map to a valid goal key.
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/CourseGoal'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/CourseGoal'
tags:
- course_goals
delete:
operationId: course_goals_v0_course_goals_delete
summary: API calls to create and update a course goal.
description: |-
Validates incoming data to ensure that course_key maps to an actual
course and that the goal_key is a valid option.
**Use Case**
* Create a new goal for a user.
* Update an existing goal for a user
**Example Requests**
POST /api/course_goals/v0/course_goals/
Request data: {"course_key": <course-key>, "goal_key": "<goal-key>", "user": "<username>"}
Returns Http400 response if the course_key does not map to a known
course or if the goal_key does not map to a valid goal key.
parameters: []
responses:
'204':
description: ''
tags:
- course_goals
parameters:
- name: id
in: path
description: A unique integer value identifying this course goal.
required: true
type: integer
? /course_home/v1/course_metadata/(P{course_key_string}[/+]+{var}[/+]+api/course_home/v1/course_metadata/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: course_home_v1_course_metadata_+]+api_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
**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
- name: var
in: path
required: true
type: string
? /course_home/v1/dates/(P{course_key_string}[/+]+{var}[/+]+api/course_home/v1/dates/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: course_home_v1_dates_+]+api_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.
* 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
- name: var
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/outline/(P{course_key_string}[/+]+{var}[/+]+api/course_home/v1/outline/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: course_home_v1_outline_+]+api_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 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)
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
course_goals:
goal_options: (list) A list of goals where each goal is represented as a tuple (goal_key, goal_string)
selected_goal:
key: (str) The unique id given to the user's selected goal.
text: (str) The display text for the user's selected goal.
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)
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
**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/OutlineTab'
tags:
- course_home
parameters:
- name: course_key_string
in: path
required: true
type: string
- name: var
in: path
required: true
type: string
? /course_home/v1/progress/(P{course_key_string}[/+]+{var}[/+]+api/course_home/v1/progress/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: course_home_v1_progress_+]+api_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}
**Response Values**
Body consists of the following fields:
end: (date) end date of the course
user_has_passing_grade: (bool) boolean on if the user has a passing grade in the course
has_scheduled_content: (bool) boolean on if the course has content scheduled with a release date in the future
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
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)
display_name: (str) a str of what the name of the Subsection is for displaying on the site
has_graded_assignment: (bool) whether or not the Subsection is a graded assignment
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
percent_graded: (float) the percentage of total points the user has received a grade for in a given subsection
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) the absolute path url to the Subsection
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.
studio_url: (str) a str of the link to the grading in studio for the course
verification_data: an object containing
link: (str) the link to either start or retry ID verification
status: (str) the status of the ID verification
status_date: (str) the date time string of when the ID verification status was set
**Returns**
* 200 on success with above fields.
* 401 if the user is not authenticated or not enrolled.
* 404 if the course is not available or cannot be seen.
parameters: []
responses:
'200':
description: ''
schema:
$ref: '#/definitions/ProgressTab'
tags:
- course_home
parameters:
- name: course_key_string
in: path
required: true
type: string
- name: var
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_modes/v1/courses/{course_id}/:
get:
operationId: course_modes_v1_courses_read
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/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=<course_id>
GET /api/courses/v1/blocks/?course_id=<course_id>
&username=anjali
&depth=all
&requested_fields=graded,format,student_view_multi_device,lti_url
&block_counts=video
&student_view_data=video
&block_types_filter=problem,html
**Parameters**:
This view redirects to /api/courses/v1/blocks/<root_usage_key>/ for the
root usage key of the course specified by course_id. The view accepts
all parameters accepted by :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/(P{usage_key_string}{var}|api/courses/v1/blocks/(P{usage_key_string}(:i4x://[/]+/[/]+/[/]+/[@]+(:@[/]+))|{var})
: get:
operationId: courses_v1_blocks_courses_v1_blocks__[_]+_[_]+_[_]+_[@]+(:@[_read
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/<root_block_usage_id>/?depth=all
GET /api/courses/v1/blocks/<usage_id>/?
username=anjali
&depth=all
&requested_fields=graded,format,student_view_multi_device,lti_url,due
&block_counts=video
&student_view_data=video
&block_types_filter=problem,html
**Parameters**:
* all_blocks: (boolean) Provide a value of "true" to return all
blocks. Returns all blocks only if the requesting user has course
staff permissions. Blocks that are visible only to specific learners
(for example, based on group membership or randomized content) are
all included. If all_blocks is not specified, you must specify the
username for the user whose course blocks are requested.
* username: (string) Required, unless ``all_blocks`` is specified.
Specify the username for the user whose course blocks are requested.
A blank/empty username can be used to request the blocks accessible
to anonymous users (for public courses). Only users with course staff
permissions can specify other users' usernames. If a username is
specified, results include blocks that are visible to that user,
including those based on group or cohort membership or randomized
content assigned to that user.
Example: username=anjali
username=''
username
* student_view_data: (list) Indicates for which block types to return
student_view_data.
Example: student_view_data=video
* block_counts: (list) Indicates for which block types to return the
aggregate count of the blocks.
Example: block_counts=video,problem
* requested_fields: (list) Indicates which additional fields to return
for each block. For a list of available fields see under `Response
Values -> blocks`, below.
The following fields are always returned: id, type, display_name
Example: requested_fields=graded,format,student_view_multi_device
* depth: (integer or all) Indicates how deep to traverse into the blocks
hierarchy. A value of all means the entire hierarchy.
Default is 0
Example: depth=all
* nav_depth: (integer)
WARNING: nav_depth is not supported, and may be removed at any time.
Indicates how far deep to traverse into the
course hierarchy before bundling all the descendants.
Default is 3 since typical navigational views of the course show a
maximum of chapter->sequential->vertical.
Example: nav_depth=3
* return_type (string) Indicates in what data type to return the
blocks.
Default is dict. Supported values are: dict, list
Example: return_type=dict
* block_types_filter: (list) Requested types of blocks used to filter the final result
of returned blocks. Possible values include sequential, vertical, html, problem,
video, and discussion.
Example: block_types_filter=vertical,html
**Response Values**
The following fields are returned with a successful response.
* root: The ID of the root node of the requested course block
structure.
* blocks: A dictionary or list, based on the value of the
"return_type" parameter. Maps block usage IDs to a collection of
information about each block. Each block contains the following
fields.
* id: (string) The usage ID of the block.
* type: (string) The type of block. Possible values the names of any
XBlock type in the system, including custom blocks. Examples are
course, chapter, sequential, vertical, html, problem, video, and
discussion.
* display_name: (string) The display name of the block.
* children: (list) If the block has child blocks, a list of IDs of
the child blocks. Returned only if "children" is included in the
"requested_fields" parameter.
* completion: (float or None) The level of completion of the block.
Its value can vary between 0.0 and 1.0 or be equal to None
if block is not completable. Returned only if "completion"
is included in the "requested_fields" parameter.
* block_counts: (dict) For each block type specified in the
block_counts parameter to the endpoint, the aggregate number of
blocks of that type for this block and all of its descendants.
* graded (boolean) Whether or not the block or any of its descendants
is graded. Returned only if "graded" is included in the
"requested_fields" parameter.
* format: (string) The assignment type of the block. Possible values
can be "Homework", "Lab", "Midterm Exam", and "Final Exam".
Returned only if "format" is included in the "requested_fields"
parameter.
* student_view_data: (dict) The JSON data for this block.
Returned only if the "student_view_data" input parameter contains
this block's type.
* student_view_url: (string) The URL to retrieve the HTML rendering
of this block's student view. The HTML could include CSS and
Javascript code. This field can be used in combination with the
student_view_multi_device field to decide whether to display this
content to the user.
This URL can be used as a fallback if the student_view_data for
this block type is not supported by the client or the block.
* student_view_multi_device: (boolean) Whether or not the HTML of
the student view that is rendered at "student_view_url" supports
responsive web layouts, touch-based inputs, and interactive state
management for a variety of device sizes and types, including
mobile and touch devices. Returned only if
"student_view_multi_device" is included in the "requested_fields"
parameter.
* lms_web_url: (string) The URL to the navigational container of the
xBlock on the web. This URL can be used as a further fallback
if the student_view_url and the student_view_data fields are not
supported. Will direct to either the "New" (micro-frontend) or
"Legacy" (Django-template-rendered) frontend experience depending
on which experience is active.
* legacy_web_url: (string) Like `lms_web_url`, but always directs to
the "Legacy" frontend experience. Should only be used for
transitional purposes; will be removed as part of DEPR-109.
* lti_url: The block URL for an LTI consumer. Returned only if the
"ENABLE_LTI_PROVIDER" Django settign is set to "True".
* due: The due date of the block. Returned only if "due" is included
in the "requested_fields" parameter.
* show_correctness: Whether to show scores/correctness to learners for the current sequence or problem.
Returned only if "show_correctness" is included in the "requested_fields" parameter.
* Additional XBlock fields can be included in the response if they are
configured via the COURSE_BLOCKS_API_EXTRA_FIELDS Django setting and
requested via the "requested_fields" parameter.
parameters:
- 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
- name: var
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/
**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.
**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"
}
]
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
parameters: []
? /courses/v1/courses/(P{course_key_string}[/+]+{var}[/+]+api/courses/v1/courses/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: courses_v1_courses_+]+api_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
Deprecated fields:
* blocks_url: Used to fetch the course blocks
* course_id: Course key (use 'id' instead)
**Parameters:**
username (optional):
The username of the specified user for whom the course data
is being accessed. The username is not only required if the API is
requested by an Anonymous user.
**Returns**
* 200 on success with above fields.
* 400 if an invalid parameter was sent or the username was not provided
for an authenticated request.
* 403 if a user who does not have permission to masquerade as
another user specifies a username other than their own.
* 404 if the course is not available or cannot be seen.
Example response:
{
"blocks_url": "/api/courses/v1/blocks/?course_id=edX%2Fexample%2F2012_Fall",
"media": {
"course_image": {
"uri": "/c4x/edX/example/asset/just_a_test.jpg",
"name": "Course Image"
}
},
"description": "An example course.",
"end": "2015-09-19T18:00:00Z",
"enrollment_end": "2015-07-15T00:00:00Z",
"enrollment_start": "2015-06-15T00:00:00Z",
"course_id": "edX/example/2012_Fall",
"name": "Example Course",
"number": "example",
"org": "edX",
"overview: "<p>A verbose description of the course.</p>"
"start": "2015-07-17T12:00:00Z",
"start_display": "July 17, 2015",
"start_type": "timestamp",
"pacing": "instructor"
}
parameters: []
responses:
'200':
description: ''
schema:
$ref: '#/definitions/CourseDetail'
tags:
- courses
parameters:
- name: course_key_string
in: path
required: true
type: string
- name: var
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=<course_id>
GET /api/courses/v1/blocks/?course_id=<course_id>
&username=anjali
&depth=all
&requested_fields=graded,format,student_view_multi_device,lti_url
&block_counts=video
&student_view_data=video
&block_types_filter=problem,html
**Parameters**:
This view redirects to /api/courses/v1/blocks/<root_usage_key>/ for the
root usage key of the course specified by course_id. The view accepts
all parameters accepted by :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/(P{usage_key_string}{var}|api/courses/v2/blocks/(P{usage_key_string}(:i4x://[/]+/[/]+/[/]+/[@]+(:@[/]+))|{var})
: get:
operationId: courses_v2_blocks_courses_v2_blocks__[_]+_[_]+_[_]+_[@]+(:@[_read
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/<root_block_usage_id>/?depth=all
GET /api/courses/v1/blocks/<usage_id>/?
username=anjali
&depth=all
&requested_fields=graded,format,student_view_multi_device,lti_url,due
&block_counts=video
&student_view_data=video
&block_types_filter=problem,html
**Parameters**:
* all_blocks: (boolean) Provide a value of "true" to return all
blocks. Returns all blocks only if the requesting user has course
staff permissions. Blocks that are visible only to specific learners
(for example, based on group membership or randomized content) are
all included. If all_blocks is not specified, you must specify the
username for the user whose course blocks are requested.
* username: (string) Required, unless ``all_blocks`` is specified.
Specify the username for the user whose course blocks are requested.
A blank/empty username can be used to request the blocks accessible
to anonymous users (for public courses). Only users with course staff
permissions can specify other users' usernames. If a username is
specified, results include blocks that are visible to that user,
including those based on group or cohort membership or randomized
content assigned to that user.
Example: username=anjali
username=''
username
* student_view_data: (list) Indicates for which block types to return
student_view_data.
Example: student_view_data=video
* block_counts: (list) Indicates for which block types to return the
aggregate count of the blocks.
Example: block_counts=video,problem
* requested_fields: (list) Indicates which additional fields to return
for each block. For a list of available fields see under `Response
Values -> blocks`, below.
The following fields are always returned: id, type, display_name
Example: requested_fields=graded,format,student_view_multi_device
* depth: (integer or all) Indicates how deep to traverse into the blocks
hierarchy. A value of all means the entire hierarchy.
Default is 0
Example: depth=all
* nav_depth: (integer)
WARNING: nav_depth is not supported, and may be removed at any time.
Indicates how far deep to traverse into the
course hierarchy before bundling all the descendants.
Default is 3 since typical navigational views of the course show a
maximum of chapter->sequential->vertical.
Example: nav_depth=3
* return_type (string) Indicates in what data type to return the
blocks.
Default is dict. Supported values are: dict, list
Example: return_type=dict
* block_types_filter: (list) Requested types of blocks used to filter the final result
of returned blocks. Possible values include sequential, vertical, html, problem,
video, and discussion.
Example: block_types_filter=vertical,html
**Response Values**
The following fields are returned with a successful response.
* root: The ID of the root node of the requested course block
structure.
* blocks: A dictionary or list, based on the value of the
"return_type" parameter. Maps block usage IDs to a collection of
information about each block. Each block contains the following
fields.
* id: (string) The usage ID of the block.
* type: (string) The type of block. Possible values the names of any
XBlock type in the system, including custom blocks. Examples are
course, chapter, sequential, vertical, html, problem, video, and
discussion.
* display_name: (string) The display name of the block.
* children: (list) If the block has child blocks, a list of IDs of
the child blocks. Returned only if "children" is included in the
"requested_fields" parameter.
* completion: (float or None) The level of completion of the block.
Its value can vary between 0.0 and 1.0 or be equal to None
if block is not completable. Returned only if "completion"
is included in the "requested_fields" parameter.
* block_counts: (dict) For each block type specified in the
block_counts parameter to the endpoint, the aggregate number of
blocks of that type for this block and all of its descendants.
* graded (boolean) Whether or not the block or any of its descendants
is graded. Returned only if "graded" is included in the
"requested_fields" parameter.
* format: (string) The assignment type of the block. Possible values
can be "Homework", "Lab", "Midterm Exam", and "Final Exam".
Returned only if "format" is included in the "requested_fields"
parameter.
* student_view_data: (dict) The JSON data for this block.
Returned only if the "student_view_data" input parameter contains
this block's type.
* student_view_url: (string) The URL to retrieve the HTML rendering
of this block's student view. The HTML could include CSS and
Javascript code. This field can be used in combination with the
student_view_multi_device field to decide whether to display this
content to the user.
This URL can be used as a fallback if the student_view_data for
this block type is not supported by the client or the block.
* student_view_multi_device: (boolean) Whether or not the HTML of
the student view that is rendered at "student_view_url" supports
responsive web layouts, touch-based inputs, and interactive state
management for a variety of device sizes and types, including
mobile and touch devices. Returned only if
"student_view_multi_device" is included in the "requested_fields"
parameter.
* lms_web_url: (string) The URL to the navigational container of the
xBlock on the web. This URL can be used as a further fallback
if the student_view_url and the student_view_data fields are not
supported. Will direct to either the "New" (micro-frontend) or
"Legacy" (Django-template-rendered) frontend experience depending
on which experience is active.
* legacy_web_url: (string) Like `lms_web_url`, but always directs to
the "Legacy" frontend experience. Should only be used for
transitional purposes; will be removed as part of DEPR-109.
* lti_url: The block URL for an LTI consumer. Returned only if the
"ENABLE_LTI_PROVIDER" Django settign is set to "True".
* due: The due date of the block. Returned only if "due" is included
in the "requested_fields" parameter.
* show_correctness: Whether to show scores/correctness to learners for the current sequence or problem.
Returned only if "show_correctness" is included in the "requested_fields" parameter.
* Additional XBlock fields can be included in the response if they are
configured via the COURSE_BLOCKS_API_EXTRA_FIELDS Django setting and
requested via the "requested_fields" parameter.
parameters:
- 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
- name: var
in: path
required: true
type: string
? /courseware/celebration/(P{course_key_string}[/+]+{var}[/+]+api/courseware/celebration/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: post:
operationId: courseware_celebration_+]+api_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
- name: var
in: path
required: true
type: string
? /courseware/course/(P{course_key_string}[/+]+{var}[/+]+api/courseware/course/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: courseware_course_+]+api_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)
* 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
* id: A unique identifier of the course; a serialized representation
of the opaque key identifying the course.
* media: An object that contains named media items. Included here:
* course_image: An image to show for the course. Represented
as an object with the following fields:
* uri: The location of the image
* name: Name of the course
* offer: An object detailing upgrade discount information
* code: (str) Checkout code
* expiration_date: (str) Expiration of offer, in ISO 8601 notation
* original_price: (str) Full upgrade price without checkout code; includes currency symbol
* discounted_price: (str) Upgrade price with checkout code; includes currency symbol
* percentage: (int) Amount of discount
* upgrade_url: (str) Checkout URL
* related_programs: A list of objects that contains program data related to the given course including:
* progress: An object containing program progress:
* complete: (int) Number of complete courses in the program (a course is completed if the user has
earned a certificate for any of the nested course runs)
* in_progress: (int) Number of courses in the program that are in progress (a course is in progress if
the user has enrolled in any of the nested course runs)
* not_started: (int) Number of courses in the program that have not been started
* slug: (str) The program type
* title: (str) The title of the program
* url: (str) The link to the program's landing page
* uuid: (str) A unique identifier of the program
* short_description: A textual description of the course
* start: Date the course begins, in ISO 8601 notation
* start_display: Readably formatted start of the course
* start_type: Hint describing how `start_display` is set. One of:
* `"string"`: manually set by the course author
* `"timestamp"`: generated from the `start` timestamp
* `"empty"`: no start date is specified
* pacing: Course pacing. Possible values: instructor, self
* user_timezone: User's chosen timezone setting (or null for browser default)
* user_has_passing_grade: Whether or not the effective user's grade is equal to or above the courses minimum
passing grade
* course_exit_page_is_active: Flag for the learning mfe on whether or not the course exit page should display
* certificate_data: data regarding the effective user's certificate for the given course
* verify_identity_url: URL for a learner to verify their identity. Only returned for learners enrolled in a
verified mode. Will update to reverify URL if necessary.
* linkedin_add_to_profile_url: URL to add the effective user's certificate to a LinkedIn Profile.
**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
- name: var
in: path
required: true
type: string
? /courseware/resume/(P{course_key_string}[/+]+{var}[/+]+api/courseware/resume/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: courseware_resume_+]+api_courseware_resume_+]+(_|+)[_]+)_list
description: Return response to a GET request.
parameters: []
responses:
'200':
description: ''
tags:
- courseware
parameters:
- name: course_key_string
in: path
required: true
type: string
- name: var
in: path
required: true
type: string
? /courseware/sequence/(P{usage_key_string}{var}|api/courseware/sequence/(P{usage_key_string}(:i4x://[/]+/[/]+/[/]+/[@]+(:@[/]+))|{var})
: get:
operationId: courseware_sequence_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
- name: var
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
/demographics/v1/demographics/status/:
get:
operationId: demographics_v1_demographics_status_list
summary: GET /api/user/v1/accounts/demographics/status
description: This is a Web API to determine the status of demographics related
features
parameters: []
responses:
'200':
description: ''
tags:
- demographics
patch:
operationId: demographics_v1_demographics_status_partial_update
summary: PATCH /api/user/v1/accounts/demographics/status
description: This is a Web API to update fields that are dependent on user interaction.
parameters: []
responses:
'200':
description: ''
tags:
- demographics
parameters: []
/discounts/course/(P{course_key_string}[/+]+{var}[/+]+api/discounts/course/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+):
get:
operationId: discounts_course_+]+api_discounts_course_+]+(_|+)[_]+)_list
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
- name: var
in: path
required: true
type: string
? /discounts/user/{user_id}/course/(P{course_key_string}[/+]+{var}[/+]+api/discounts/user/{user_id}/course/(P{course_key_string}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: discounts_user_course_+]+api_discounts_user_course_+]+(_|+)[_]+)_list
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
- name: user_id
in: path
required: true
type: string
- name: var
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/comments/:
get:
operationId: discussion_v1_comments_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_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/(P{course_id}[/+]+{var}[/+]+api/discussion/v1/course_topics/(P{course_id}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: discussion_v1_course_topics_+]+api_discussion_v1_course_topics_+]+(_|+)[_]+)_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
- name: var
in: path
required: true
type: string
/discussion/v1/courses/(P{course_id}[/+]+{var}[/+]+api/discussion/v1/courses/(P{course_id}[/+]+(/|+)[/+]+{var}[/]+):
get:
operationId: discussion_v1_courses_+]+api_discussion_v1_courses_+]+(_|+)[_]+)_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
- name: var
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/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
/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_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/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/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: content_id
in: path
required: true
type: string
- name: course_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/{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/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: course_id
in: path
required: true
type: string
- name: username
in: path
required: true
type: string
/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?username={username},{username},{username}
GET /api/enrollment/v1/enrollments?course_id={course_id}&username={username}
**Query Parameters for GET**
* course_id: Filters the result to course enrollments for the course corresponding to the
given course ID. The value must be URL encoded. Optional.
* username: List of comma-separated usernames. Filters the result to the course enrollments
of the given users. Optional.
* page_size: Number of results to return per page. Optional.
* page: Page number to retrieve. Optional.
**Response Values**
If the request for information about the course enrollments is successful, an HTTP 200 "OK" response
is returned.
The HTTP 200 response has the following values.
* results: A list of the course enrollments matching the request.
* created: Date and time when the course enrollment was created.
* mode: Mode for the course enrollment.
* is_active: Whether the course enrollment is active or not.
* user: Username of the user in the course enrollment.
* course_id: Course ID of the course in the course enrollment.
* next: The URL to the next page of results, or null if this is the
last page.
* previous: The URL to the next page of results, or null if this
is the first page.
If the user is not logged in, a 401 error is returned.
If the user is not global staff, a 403 error is returned.
If the specified course_id is not valid or any of the specified usernames
are not valid, a 400 error is returned.
If the specified course_id does not correspond to a valid course or if all the specified
usernames do not correspond to valid users, an HTTP 200 "OK" response is returned with an
empty 'results' field.
parameters:
- name: cursor
in: query
description: The pagination cursor value.
required: false
type: string
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: 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: course_id
in: path
required: true
type: string
- name: username
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: number
- 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: number
- 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_read
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/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": "<a href="https://1.mock.url">mock_file_name_1</a>",
"name": "mock_file_name_1"
}
]
}
```
The report name will depend on the type of report generated. For example a
problem responses report for an entire course might be called:
edX_DemoX_Demo_Course_student_state_from_block-v1_edX+DemoX+Demo_Course+type@course+block@course_2021-04-30-0918.csv
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
/learning_sequences/v1/course_outline/{course_key_str}:
get:
operationId: learning_sequences_v1_course_outline_read
summary: The CourseOutline, customized for a given user.
description: Currently restricted to global staff.
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: id
in: path
required: true
type: string
- name: lti_config_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: id
in: path
required: true
type: string
- name: lti_config_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: id
in: path
required: true
type: string
- name: lti_config_id
in: path
required: true
type: string
/mfe_context:
get:
operationId: mfe_context_list
description: |-
Returns the context for third party auth providers, user country code
and the currently running pipeline.
parameters: []
responses:
'200':
description: ''
tags:
- mfe_context
parameters: []
/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}/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.
**Example Request**
GET /api/mobile/v1/users/{username}/course_enrollments/
**Response Values**
If the request for information about the user is successful, the
request returns an HTTP 200 "OK" response.
The HTTP 200 response has the following values.
* expiration: The course expiration date for given user course pair
or null if the course does not expire.
* certificate: Information about the user's earned certificate in the
course.
* course: A collection of the following data about the course.
* courseware_access: A JSON representation with access information for the course,
including any access errors.
* course_about: The URL to the course about page.
* course_sharing_utm_parameters: Encoded UTM parameters to be included in course sharing url
* course_handouts: The URI to get data for course handouts.
* course_image: The path to the course image.
* course_updates: The URI to get data for course updates.
* discussion_url: The URI to access data for course discussions if
it is enabled, otherwise null.
* end: The end date of the course.
* id: The unique ID of the course.
* name: The name of the course.
* number: The course number.
* org: The organization that created the course.
* start: The date and time when the course starts.
* start_display:
If start_type is a string, then the advertised_start date for the course.
If start_type is a timestamp, then a formatted date for the start of the course.
If start_type is empty, then the value is None and it indicates that the course has not yet started.
* start_type: One of either "string", "timestamp", or "empty"
* subscription_id: A unique "clean" (alphanumeric with '_') ID of
the course.
* video_outline: The URI to get the list of all videos that the user
can access in the course.
* created: The date the course was created.
* is_active: Whether the course is currently active. Possible values
are true or false.
* mode: The type of certificate registration for this course (honor or
certified).
* url: URL to the downloadable version of the certificate, if exists.
parameters: []
responses:
'200':
description: ''
schema:
type: array
items:
$ref: '#/definitions/CourseEnrollment'
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/(P{course_id}[/+]+{var}[/+]+api/mobile/{api_version}/users/{username}/course_status_info/(P{course_id}[/+]+(/|+)[/+]+{var}[/]+)
: get:
operationId: mobile_users_course_status_info_+]+api_mobile_users_course_status_info_+]+(_|+)[_]+)_list
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_+]+api_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: course_id
in: path
required: true
type: string
- name: username
in: path
required: true
type: string
- name: var
in: path
required: true
type: string
/organizations/v0/organizations/:
get:
operationId: organizations_v0_organizations_list
description: |-
Organization view to:
- list organization data (GET .../)
- retrieve single organization (GET .../<short_name>)
- create or update an organization via the PUT endpoint (PUT .../<short_name>)
parameters:
- 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 .../<short_name>)
- create or update an organization via the PUT endpoint (PUT .../<short_name>)
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
/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: course_id
in: path
required: true
type: string
- name: program_uuid
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: course_id
in: path
required: true
type: string
- name: program_uuid
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/edx/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: program_uuid
in: path
required: true
type: string
- name: username
in: path
required: true
type: string
/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: course_id
in: path
required: true
type: string
- name: topic_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}{var}/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}&usernames={username2}
GET /api/third_party_auth/v0/providers/{provider_id}/users?remote_id={remote_id1},{remote_id2}
GET /api/third_party_auth/v0/providers/{provider_id}/users?remote_id={remote_id1}&remote_id={remote_id2}
GET /api/third_party_auth/v0/providers/{provider_id}/users?username={username1}&remote_id={remote_id1}
**URL Parameters**
* provider_id: The unique identifier of third_party_auth provider (e.g. "saml-ubc", "oa2-google", etc.
This is not the same thing as the backend_name.). (Optional/future: We may also want to allow
this to be an 'external domain' like 'ssl:MIT' so that this API can also search the legacy
ExternalAuthMap table used by Standford/MIT)
**Query Parameters**
* remote_ids: Optional. List of comma separated remote (third party) user IDs to filter the result set.
e.g. ?remote_ids=8721384623
* usernames: Optional. List of comma separated edX usernames to filter the result set.
e.g. ?usernames=bob123,jane456
* page, page_size: Optional. Used for paging the result set, especially when getting
an unfiltered list.
**Response Values**
If the request for information about the user is successful, an HTTP 200 "OK" response
is returned.
The HTTP 200 response has the following values:
* count: The number of mappings for the backend.
* next: The URI to the next page of the mappings.
* previous: The URI to the previous page of the mappings.
* num_pages: The number of pages listing the mappings.
* results: A list of mappings returned. Each collection in the list
contains these fields.
* username: The edx username
* remote_id: The Id from third party auth provider
parameters:
- 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/UserMapping'
tags:
- third_party_auth
parameters:
- name: provider_id
in: path
required: true
type: string
- name: var
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
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 the context for third party auth providers, user country code
and 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
description: |-
GET /api/user/v1/accounts?username={username1},{username2}
GET /api/user/v1/accounts?email={user_email1},{user_email2}
parameters: []
responses:
'200':
description: ''
consumes:
- application/json
- application/merge-patch+json
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/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']}
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
description: |-
POST /api/user/v1/accounts/search_emails
Content Type: "application/json"
{
"emails": ["edx@example.com", "staff@example.com"]
}
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. Slumber, the project
we use to power edx-rest-api-client, does not currently support
it. 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
description: GET /api/user/v1/accounts/{username}/
parameters: []
responses:
'200':
description: ''
consumes:
- application/json
- application/merge-patch+json
tags:
- user
patch:
operationId: user_v1_accounts_partial_update
summary: PATCH /api/user/v1/accounts/{username}/
description: Note that this implementation is the "merge patch" implementation
proposed in
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
description: GET /api/user/v1/me
parameters: []
responses:
'200':
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: preference_key
in: path
required: true
type: string
- name: username
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: Log in a user.
description: |-
See `login_user` for details.
Example Usage:
POST /api/user/v1/login_session
with POST params `email`, `password`.
200 {'success': true}
parameters: []
responses:
'201':
description: ''
tags:
- user
parameters:
- name: api_version
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/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/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
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_str}/:
get:
operationId: xblock_v2_xblocks_read
summary: Get metadata about the specified block.
description: |-
Accepts an "include" query parameter which must be 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_str
in: path
required: true
type: string
/xblock/v2/xblocks/{usage_key_str}/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: handler_name
in: path
required: true
type: string
- name: usage_key_str
in: path
required: true
type: string
/xblock/v2/xblocks/{usage_key_str}/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_str
in: path
required: true
type: string
- name: view_name
in: path
required: true
type: string
definitions:
BadgeClass:
required:
- slug
- display_name
- description
- criteria
type: object
properties:
slug:
title: Slug
type: string
format: slug
pattern: ^[-a-zA-Z0-9_]+$
maxLength: 255
minLength: 1
issuing_component:
title: Issuing component
type: string
format: slug
pattern: ^[-a-zA-Z0-9_]+$
default: ''
maxLength: 50
display_name:
title: Display name
type: string
maxLength: 255
minLength: 1
course_id:
title: Course id
type: string
maxLength: 255
description:
title: Description
type: string
minLength: 1
criteria:
title: Criteria
type: string
minLength: 1
image_url:
title: Image url
type: string
readOnly: true
format: uri
BadgeAssertion:
required:
- image_url
- assertion_url
type: object
properties:
badge_class:
$ref: '#/definitions/BadgeClass'
image_url:
title: Image url
type: string
format: uri
maxLength: 200
minLength: 1
assertion_url:
title: Assertion url
type: string
format: uri
maxLength: 200
minLength: 1
created:
title: Created
type: string
format: date-time
readOnly: true
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
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
CourseGoal:
required:
- user
- course_key
type: object
properties:
user:
title: User
type: string
pattern: ^[\w.@+-]+$
course_key:
title: Course key
type: string
maxLength: 255
minLength: 1
goal_key:
title: Goal key
type: string
enum:
- certify
- complete
- explore
- unsure
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
CourseHomeMetadata:
required:
- course_id
- username
- is_enrolled
- is_self_paced
- is_staff
- number
- org
- original_user_is_staff
- tabs
- title
- celebrations
type: object
properties:
can_show_upgrade_sock:
title: Can show upgrade sock
type: string
readOnly: true
verified_mode:
title: Verified mode
type: string
readOnly: true
course_id:
title: Course id
type: string
minLength: 1
username:
title: Username
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
tabs:
type: array
items:
$ref: '#/definitions/CourseTab'
title:
title: Title
type: string
minLength: 1
celebrations:
title: Celebrations
type: object
additionalProperties:
type: string
x-nullable: true
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
CourseGoals:
required:
- goal_options
- selected_goal
type: object
properties:
goal_options:
type: array
items:
type: string
x-nullable: true
selected_goal:
title: Selected goal
type: object
additionalProperties:
type: string
x-nullable: true
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
- course_blocks
- course_goals
- course_tools
- dates_widget
- enroll_alert
- handouts_html
- has_ended
- offer
- resume_course
- welcome_message_html
type: object
properties:
dates_banner_info:
title: Dates banner info
type: string
readOnly: true
can_show_upgrade_sock:
title: Can show upgrade sock
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
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'
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
CertificateData:
required:
- cert_status
- cert_web_view_url
- download_url
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
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
SubsectionScores:
required:
- assignment_type
- display_name
- 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
display_name:
title: Display name
type: string
minLength: 1
has_graded_assignment:
title: Has graded assignment
type: boolean
num_points_earned:
title: Num points earned
type: integer
num_points_possible:
title: Num points possible
type: integer
percent_graded:
title: Percent graded
type: number
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'
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
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
ProgressTab:
required:
- certificate_data
- completion_summary
- course_grade
- end
- user_has_passing_grade
- has_scheduled_content
- section_scores
- enrollment_mode
- grading_policy
- studio_url
- verification_data
type: object
properties:
can_show_upgrade_sock:
title: Can show upgrade sock
type: string
readOnly: true
verified_mode:
title: Verified mode
type: string
readOnly: true
certificate_data:
$ref: '#/definitions/CertificateData'
completion_summary:
title: Completion summary
type: object
additionalProperties:
type: string
x-nullable: true
course_grade:
$ref: '#/definitions/CourseGrade'
end:
title: End
type: string
format: date-time
user_has_passing_grade:
title: User has passing grade
type: boolean
has_scheduled_content:
title: Has scheduled content
type: boolean
section_scores:
type: array
items:
$ref: '#/definitions/SectionScores'
enrollment_mode:
title: Enrollment mode
type: string
minLength: 1
grading_policy:
$ref: '#/definitions/GradingPolicy'
studio_url:
title: Studio url
type: string
minLength: 1
verification_data:
$ref: '#/definitions/VerificationData'
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
CourseEnrollmentsApiList:
required:
- course_id
type: object
properties:
created:
title: Created
type: string
format: date-time
readOnly: 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
InstructorTask:
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/InstructorTask'
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
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
CourseEnrollment:
type: object
properties:
audit_access_expires:
title: Audit access expires
type: string
readOnly: true
created:
title: Created
type: string
format: date-time
readOnly: true
mode:
title: Mode
type: string
maxLength: 100
minLength: 1
is_active:
title: Is active
type: boolean
course:
title: Course
type: string
readOnly: true
certificate:
title: Certificate
type: string
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'
UserMapping:
type: object
properties:
username:
title: Username
type: string
readOnly: true
remote_id:
title: Remote id
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
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