DHIS2 Course Modes API
The course_modes API from DHIS2 — 2 operation(s) for course_modes.
The course_modes API from DHIS2 — 2 operation(s) for course_modes.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/dhis2:dhis2-course-modes-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Open edX Course Modes 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: course_modes
paths:
/course_modes/v1/courses/{course_id}/:
parameters:
- name: course_id
in: path
required: true
schema:
type: string
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.'
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/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.'
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/course_modes.CourseMode'
tags:
- course_modes
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/course_modes.CourseMode'
required: true
/course_modes/v1/courses/{course_id}/{mode_slug}:
parameters:
- name: course_id
in: path
required: true
schema:
type: string
- name: mode_slug
in: path
required: true
schema:
type: string
get:
operationId: getCourseModesV1CoursesByCourseIdByModeSlug
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.'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/course_modes.CourseMode'
tags:
- course_modes
x-operation-id-source: normalized
x-operation-id-original: course_modes_v1_courses_read
patch:
operationId: course_modes_v1_courses_partial_update
description: Performs a partial update of a CourseMode instance.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/course_modes.CourseMode'
tags:
- course_modes
requestBody:
content:
application/merge-patch+json:
schema:
$ref: '#/components/schemas/course_modes.CourseMode'
required: true
summary: Course modes v1 courses partial update
x-summary-source: derived
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.'
responses:
'204':
description: ''
tags:
- course_modes
components:
schemas:
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
securitySchemes:
Basic:
type: http
scheme: basic