Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Open edX Grades API
description: APIs for access to Open edX information
contact:
email: contact@academy.dhis2.org
version: v1
servers:
- url: https://academy.dhis2.org/api
security:
- Basic: []
tags:
- name: Grades
paths:
/grades/v1/courses/:
parameters: []
get:
operationId: grades_v1_courses_list
description: Gets a course progress status.
parameters:
- name: cursor
in: query
description: The pagination cursor value.
required: false
schema:
type: string
- name: page_size
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
responses:
'200':
description: ''
tags:
- Grades
summary: Grades v1 courses list
x-summary-source: derived
/grades/v1/courses/{course_id}/:
parameters:
- name: course_id
in: path
required: true
schema:
type: string
get:
operationId: grades_v1_courses_read
description: Gets a course progress status.
responses:
'200':
description: ''
tags:
- Grades
summary: Grades v1 courses read
x-summary-source: derived
/grades/v1/gradebook/{course_id}/:
parameters:
- name: course_id
in: path
required: true
schema:
type: string
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.'
responses:
'200':
description: ''
tags:
- Grades
summary: Grades v1 gradebook read
x-summary-source: derived
/grades/v1/gradebook/{course_id}/bulk-update:
parameters:
- name: course_id
in: path
required: true
schema:
type: string
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.'
responses:
'201':
description: ''
tags:
- Grades
summary: Grades v1 gradebook bulk update create
x-summary-source: derived
/grades/v1/gradebook/{course_id}/grading-info:
parameters:
- name: course_id
in: path
required: true
schema:
type: string
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
schema:
type: integer
- name: page_size
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
responses:
'200':
description: ''
tags:
- Grades
summary: Grades v1 gradebook grading info list
x-summary-source: derived
/grades/v1/policy/courses/{course_id}/:
parameters:
- name: course_id
in: path
required: true
schema:
type: string
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
schema:
type: integer
- name: page_size
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
responses:
'200':
description: ''
tags:
- Grades
/grades/v1/section_grades_breakdown/:
parameters: []
get:
operationId: grades_v1_section_grades_breakdown_list
summary: '**Use Cases**'
description: 'Get a list of all grades for all sections, optionally filtered by a course ID or list of usernames.
**Example Requests**
GET /api/grades/v1/section_grades_breakdown
GET /api/grades/v1/section_grades_breakdown?course_id={course_id}
GET /api/grades/v1/section_grades_breakdown?username={username},{username},{username}
GET /api/grades/v1/section_grades_breakdown?course_id={course_id}&username={username}
**Query Parameters for GET**
* course_id: Filters the result to course grade status for the course corresponding to the
given course ID. The value must be URL encoded. Optional.
* username: List of comma-separated usernames. Filters the result to the course grade status
of the given users. Optional.
* page_size: Number of results to return per page. Optional.
**Response Values**
If the request for information about the course grade status is successful, an HTTP 200 "OK" response
is returned.
The HTTP 200 response has the following values.
* results: A list of the course grading status matching the request.
* course_id: Course ID of the course in the course grading status.
* user: Username of the user in the course enrollment.
* passed: Boolean flag for user passing the course.
* current_grade: An integer representing the current grade of the course.
* section_breakdown: A summary of each course section''s grade.
A dictionary in the section_breakdown list has the following keys:
* percent: A float percentage for the section.
* label: A short string identifying the section. Preferably fixed-length. E.g. "HW 3".
* detail: A string explanation of the score. E.g. "Homework 1 - Ohms Law - 83% (5/6)"
* category: A string identifying the category.
* prominent: A boolean value indicating that this section should be displayed as more prominent
than other items.
* next: The URL to the next page of results, or null if this is the
last page.
* previous: The URL to the next page of results, or null if this
is the first page.
If the user is not logged in, a 401 error is returned.
If the user is not global staff, a 403 error is returned.
If the specified course_id is not valid or any of the specified usernames
are not valid, a 400 error is returned.
If the specified course_id does not correspond to a valid course or if all the specified
usernames do not correspond to valid users, an HTTP 200 "OK" response is returned with an
empty ''results'' field.'
parameters:
- name: cursor
in: query
description: The pagination cursor value.
required: false
schema:
type: string
- name: page_size
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
responses:
'200':
description: ''
tags:
- Grades
/grades/v1/submission_history/{course_id}/:
parameters:
- name: course_id
in: path
required: true
schema:
type: string
get:
operationId: grades_v1_submission_history_read
description: 'Get submission history details. This submission history is related to only
ProblemBlock and it doesn''t support LegacyLibraryContentBlock or ContentLibraries
as of now.
**Usecases**:
Users with GlobalStaff status can retrieve everyone''s submission history.
**Example Requests**:
GET /api/grades/v1/submission_history/{course_id}
GET /api/grades/v1/submission_history/{course_id}/?username={username}
**Query Parameters for GET**
* course_id: Course id to retrieve submission history.
* username: Single username for which this view will retrieve the submission history details.
**Response Values**:
If there''s an error while getting the submission history an empty response will
be returned.
The submission history response has the following attributes:
* Results: A list of submission history:
* course_id: Course id
* course_name: Course name
* user: Username
* problems: List of problems
* location: problem location
* name: problem''s display name
* submission_history: List of submission history
* state: State of submission.
* grade: Grade.
* max_grade: Maximum possible grade.
* data: problem''s data.'
responses:
'200':
description: ''
tags:
- Grades
summary: Grades v1 submission history read
x-summary-source: derived
/grades/v1/subsection/{subsection_id}/:
parameters:
- name: subsection_id
in: path
required: true
schema:
type: string
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.'
responses:
'200':
description: ''
tags:
- Grades
summary: Grades v1 subsection read
x-summary-source: derived
components:
securitySchemes:
Basic:
type: http
scheme: basic