Brightspace Discussions API
Manage discussion forums, topics, and posts, including replies, ratings, flags, read status, approval, and post attachments within a course offering.
Manage discussion forums, topics, and posts, including replies, ratings, flags, read status, approval, and post attachments within a course offering.
openapi: 3.0.3
info:
title: D2L Brightspace Valence Learning Framework API
description: >-
The Valence Learning Framework API is the public REST API for the D2L
Brightspace learning management system (LMS). It is served from an
institution's own Brightspace host under https://{host}/d2l/api/ and is
divided into two product components: "lp" (Learning Platform - users, roles,
enrollments, org units, and Data Hub) and "le" (Learning Environment -
content, grades, assignments/dropbox, quizzes, discussions, calendar, news,
and learning outcomes). Each component is independently versioned; the
version segment in a route (for example lp/1.53 or le/1.92) varies by
installed Brightspace product version, and clients should confirm supported
versions via GET /d2l/api/versions/ before hard-coding a value. Requests are
authenticated with OAuth 2 bearer tokens issued by the D2L auth service
(https://auth.brightspace.com/core/connect/token) using the authorization
code grant; the older ID-Key (app-id/user-id signed URL) scheme is
deprecated. Scopes take the form group:resource:action, for example
users:userdata:read. The version values baked into the paths below are
illustrative of a recent release and must be adjusted to the target
instance. "Valence" is the historical name of the API framework; "D2L" is
the vendor and "Brightspace" the product.
version: '1.0'
contact:
name: D2L Developer Platform
url: https://docs.valence.desire2learn.com
license:
name: D2L Developer Terms
url: https://www.d2l.com/legal/
servers:
- url: https://{host}/d2l/api
description: An institution's Brightspace instance
variables:
host:
default: myschool.brightspace.com
description: Your Brightspace instance hostname.
security:
- oauth2: []
tags:
- name: Versions
description: Product component version discovery.
- name: Users
description: User accounts and roles on the Learning Platform.
- name: Enrollments
description: Membership of users in org units.
- name: Org Units
description: Organization structure, course offerings, departments, and semesters.
- name: Content
description: Course content - modules and topics.
- name: Grades
description: Course gradebook - grade objects, values, categories, and schemes.
- name: Assignments
description: Assignment (Dropbox) folders, submissions, and feedback.
- name: Quizzes
description: Quizzes, attempts, questions, and special access.
- name: Discussions
description: Discussion forums, topics, and posts.
- name: Calendar
description: Course calendar events.
- name: News
description: News (announcement) items.
- name: Learning Outcomes
description: Learning outcome sets, outcomes, and alignments.
- name: Data Hub
description: Data Export Framework and Brightspace Data Sets.
paths:
/versions/:
get:
operationId: getAllVersions
tags:
- Versions
summary: List supported product component versions
description: Retrieves the collection of supported API product component versions on this instance.
responses:
'200':
description: Supported versions.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProductVersions'
/versions/{productCode}:
get:
operationId: getProductVersions
tags:
- Versions
summary: List versions for a product component
description: Retrieves supported versions for a single product component (for example lp or le).
parameters:
- $ref: '#/components/parameters/ProductCode'
responses:
'200':
description: Supported versions for the product.
content:
application/json:
schema:
$ref: '#/components/schemas/ProductVersions'
/lp/1.53/users/whoami:
get:
operationId: getWhoAmI
tags:
- Users
summary: Get the current user context
description: Retrieves a WhoAmIUser JSON block describing the identity the current access token is acting as.
responses:
'200':
description: The current user context.
content:
application/json:
schema:
$ref: '#/components/schemas/WhoAmIUser'
'401':
$ref: '#/components/responses/Unauthorized'
/lp/1.53/users/:
get:
operationId: listUsers
tags:
- Users
summary: List or search users
description: Retrieves a paged list of users, optionally filtered by orgDefinedId, userName, externalEmail, or a bookmark for paging.
parameters:
- name: orgDefinedId
in: query
schema:
type: string
- name: userName
in: query
schema:
type: string
- name: bookmark
in: query
schema:
type: string
responses:
'200':
description: A paged result set of users.
content:
application/json:
schema:
$ref: '#/components/schemas/UserPagedResultSet'
post:
operationId: createUser
tags:
- Users
summary: Create a user
description: Creates a new user account from a CreateUserData block.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserData'
responses:
'200':
description: The created user.
content:
application/json:
schema:
$ref: '#/components/schemas/UserData'
/lp/1.53/users/{userId}:
parameters:
- $ref: '#/components/parameters/UserId'
get:
operationId: getUser
tags:
- Users
summary: Get a user
description: Retrieves a UserData block for the identified user.
responses:
'200':
description: The requested user.
content:
application/json:
schema:
$ref: '#/components/schemas/UserData'
'404':
$ref: '#/components/responses/NotFound'
put:
operationId: updateUser
tags:
- Users
summary: Update a user
description: Updates the identified user account.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUserData'
responses:
'200':
description: The updated user.
content:
application/json:
schema:
$ref: '#/components/schemas/UserData'
delete:
operationId: deleteUser
tags:
- Users
summary: Delete a user
description: Permanently deletes the identified user account.
responses:
'200':
description: The user was deleted.
/lp/1.53/roles/:
get:
operationId: listRoles
tags:
- Users
summary: List roles
description: Retrieves the list of all roles defined on the organization that the caller can see.
responses:
'200':
description: A list of roles.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Role'
/lp/1.53/enrollments/orgUnits/{orgUnitId}/users/:
get:
operationId: listOrgUnitUsers
tags:
- Enrollments
summary: List users enrolled in an org unit
description: Retrieves a paged list of the users enrolled in the identified org unit, optionally filtered by roleId.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- name: roleId
in: query
schema:
type: integer
- name: bookmark
in: query
schema:
type: string
responses:
'200':
description: A paged list of enrolled users.
content:
application/json:
schema:
$ref: '#/components/schemas/EnrollmentPagedResultSet'
/lp/1.53/enrollments/users/{userId}/orgUnits/:
get:
operationId: listUserOrgUnits
tags:
- Enrollments
summary: List org units a user is enrolled in
description: Retrieves a paged list of the org units the identified user is enrolled in.
parameters:
- $ref: '#/components/parameters/UserId'
- name: bookmark
in: query
schema:
type: string
responses:
'200':
description: A paged list of org unit enrollments.
content:
application/json:
schema:
$ref: '#/components/schemas/EnrollmentPagedResultSet'
/lp/1.53/enrollments/myenrollments/:
get:
operationId: listMyEnrollments
tags:
- Enrollments
summary: List the caller's enrollments
description: Retrieves a paged list of the current user's own enrollments.
parameters:
- name: bookmark
in: query
schema:
type: string
responses:
'200':
description: The caller's enrollments.
content:
application/json:
schema:
$ref: '#/components/schemas/EnrollmentPagedResultSet'
/lp/1.53/enrollments/:
post:
operationId: createEnrollment
tags:
- Enrollments
summary: Enroll a user
description: Enrolls a user in an org unit with a specified role.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEnrollmentData'
responses:
'200':
description: The created enrollment.
content:
application/json:
schema:
$ref: '#/components/schemas/EnrollmentData'
/lp/1.53/enrollments/orgUnits/{orgUnitId}/users/{userId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/UserId'
get:
operationId: getEnrollment
tags:
- Enrollments
summary: Get a user's enrollment in an org unit
description: Retrieves the enrollment record for a user in an org unit.
responses:
'200':
description: The enrollment record.
content:
application/json:
schema:
$ref: '#/components/schemas/EnrollmentData'
delete:
operationId: deleteEnrollment
tags:
- Enrollments
summary: Unenroll a user from an org unit
description: Removes the identified user's enrollment from the identified org unit.
responses:
'200':
description: The user was unenrolled.
/lp/1.53/orgstructure/:
get:
operationId: listOrgStructure
tags:
- Org Units
summary: List org units
description: Retrieves a paged list of org units in the organization structure, filterable by type and other query parameters.
parameters:
- name: orgUnitType
in: query
schema:
type: integer
- name: bookmark
in: query
schema:
type: string
responses:
'200':
description: A paged list of org units.
content:
application/json:
schema:
$ref: '#/components/schemas/OrgUnitPagedResultSet'
/lp/1.53/orgstructure/{orgUnitId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
get:
operationId: getOrgUnit
tags:
- Org Units
summary: Get an org unit
description: Retrieves the properties of the identified org unit.
responses:
'200':
description: The requested org unit.
content:
application/json:
schema:
$ref: '#/components/schemas/OrgUnit'
/lp/1.53/orgstructure/{orgUnitId}/children/:
get:
operationId: listOrgUnitChildren
tags:
- Org Units
summary: List an org unit's children
description: Retrieves the child org units of the identified org unit.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
responses:
'200':
description: A list of child org units.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OrgUnit'
/lp/1.53/courses/{orgUnitId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
get:
operationId: getCourseOffering
tags:
- Org Units
summary: Get a course offering
description: Retrieves the CourseOffering information for the identified course org unit.
responses:
'200':
description: The course offering.
content:
application/json:
schema:
$ref: '#/components/schemas/CourseOffering'
/lp/1.53/organization/info:
get:
operationId: getOrganizationInfo
tags:
- Org Units
summary: Get organization info
description: Retrieves top-level information about the organization.
responses:
'200':
description: Organization info.
content:
application/json:
schema:
$ref: '#/components/schemas/Organization'
/le/1.92/{orgUnitId}/content/root/:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
get:
operationId: getContentRoot
tags:
- Content
summary: Get root content modules
description: Retrieves the root-level modules (table of contents) for a course offering.
responses:
'200':
description: The root content modules.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ContentObject'
/le/1.92/{orgUnitId}/content/modules/{moduleId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/ModuleId'
get:
operationId: getContentModule
tags:
- Content
summary: Get a content module
description: Retrieves a content module by its identifier.
responses:
'200':
description: The content module.
content:
application/json:
schema:
$ref: '#/components/schemas/ContentObject'
/le/1.92/{orgUnitId}/content/topics/{topicId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/TopicId'
get:
operationId: getContentTopic
tags:
- Content
summary: Get a content topic
description: Retrieves a content topic by its identifier.
responses:
'200':
description: The content topic.
content:
application/json:
schema:
$ref: '#/components/schemas/ContentObject'
/le/1.92/{orgUnitId}/grades/:
get:
operationId: listGradeObjects
tags:
- Grades
summary: List grade objects
description: Retrieves all the grade objects in a course offering's gradebook.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
responses:
'200':
description: A list of grade objects.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GradeObject'
post:
operationId: createGradeObject
tags:
- Grades
summary: Create a grade object
description: Creates a new grade object in a course offering's gradebook.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GradeObject'
responses:
'200':
description: The created grade object.
content:
application/json:
schema:
$ref: '#/components/schemas/GradeObject'
/le/1.92/{orgUnitId}/grades/{gradeObjectId}/values/{userId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/GradeObjectId'
- $ref: '#/components/parameters/UserId'
get:
operationId: getGradeValueForUser
tags:
- Grades
summary: Get a user's grade value
description: Retrieves a single user's grade value for a grade object.
responses:
'200':
description: The grade value.
content:
application/json:
schema:
$ref: '#/components/schemas/GradeValue'
put:
operationId: setGradeValueForUser
tags:
- Grades
summary: Set a user's grade value
description: Sets or updates a single user's grade value for a grade object.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/IncomingGradeValue'
responses:
'200':
description: The grade value was set.
/le/1.92/{orgUnitId}/grades/final/values/{userId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/UserId'
get:
operationId: getFinalGradeForUser
tags:
- Grades
summary: Get a user's final grade
description: Retrieves the final calculated or adjusted grade value for a user in a course offering.
responses:
'200':
description: The final grade value.
content:
application/json:
schema:
$ref: '#/components/schemas/GradeValue'
/le/1.92/{orgUnitId}/dropbox/folders/:
get:
operationId: listDropboxFolders
tags:
- Assignments
summary: List assignment folders
description: Retrieves all the assignment (dropbox) folders in a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
responses:
'200':
description: A list of assignment folders.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DropboxFolder'
post:
operationId: createDropboxFolder
tags:
- Assignments
summary: Create an assignment folder
description: Creates a new assignment (dropbox) folder in a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DropboxFolder'
responses:
'200':
description: The created assignment folder.
content:
application/json:
schema:
$ref: '#/components/schemas/DropboxFolder'
/le/1.92/{orgUnitId}/dropbox/folders/{folderId}/submissions/:
get:
operationId: listDropboxSubmissions
tags:
- Assignments
summary: List submissions for an assignment folder
description: Retrieves the submissions made to an assignment (dropbox) folder.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/FolderId'
responses:
'200':
description: A list of submissions.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/EntityDropbox'
/le/1.92/{orgUnitId}/dropbox/folders/{folderId}/feedback/{entityType}/{entityId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/FolderId'
- name: entityType
in: path
required: true
schema:
type: integer
- name: entityId
in: path
required: true
schema:
type: integer
post:
operationId: setDropboxFeedback
tags:
- Assignments
summary: Post feedback on a submission
description: Sets instructor feedback (score, text, published state) for a submission entity.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DropboxFeedback'
responses:
'200':
description: The feedback was set.
/le/1.92/{orgUnitId}/quizzes/:
get:
operationId: listQuizzes
tags:
- Quizzes
summary: List quizzes
description: Retrieves a paged list of quizzes in a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- name: bookmark
in: query
schema:
type: string
responses:
'200':
description: A paged list of quizzes.
content:
application/json:
schema:
$ref: '#/components/schemas/QuizPagedResultSet'
post:
operationId: createQuiz
tags:
- Quizzes
summary: Create a quiz
description: Creates a new quiz in a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Quiz'
responses:
'200':
description: The created quiz.
content:
application/json:
schema:
$ref: '#/components/schemas/Quiz'
/le/1.92/{orgUnitId}/quizzes/{quizId}/attempts/:
get:
operationId: listQuizAttempts
tags:
- Quizzes
summary: List quiz attempts
description: Retrieves the attempts made against a quiz.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/QuizId'
responses:
'200':
description: A list of quiz attempts.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/QuizAttempt'
/le/1.92/{orgUnitId}/discussions/forums/:
get:
operationId: listDiscussionForums
tags:
- Discussions
summary: List discussion forums
description: Retrieves the discussion forums in a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
responses:
'200':
description: A list of forums.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Forum'
post:
operationId: createDiscussionForum
tags:
- Discussions
summary: Create a discussion forum
description: Creates a new discussion forum in a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Forum'
responses:
'200':
description: The created forum.
content:
application/json:
schema:
$ref: '#/components/schemas/Forum'
/le/1.92/{orgUnitId}/discussions/forums/{forumId}/topics/{topicId}/posts/:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/ForumId'
- $ref: '#/components/parameters/TopicId'
get:
operationId: listDiscussionPosts
tags:
- Discussions
summary: List posts in a discussion topic
description: Retrieves the posts in a discussion topic.
responses:
'200':
description: A list of posts.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Post'
post:
operationId: createDiscussionPost
tags:
- Discussions
summary: Create a post in a discussion topic
description: Creates a new post in a discussion topic.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Post'
responses:
'200':
description: The created post.
content:
application/json:
schema:
$ref: '#/components/schemas/Post'
/le/1.92/{orgUnitId}/calendar/events/:
get:
operationId: listCalendarEvents
tags:
- Calendar
summary: List calendar events
description: Retrieves the calendar events for a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
responses:
'200':
description: A list of calendar events.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CalendarEvent'
/le/1.92/{orgUnitId}/calendar/event/:
post:
operationId: createCalendarEvent
tags:
- Calendar
summary: Create a calendar event
description: Creates a new calendar event in a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CalendarEvent'
responses:
'200':
description: The created calendar event.
content:
application/json:
schema:
$ref: '#/components/schemas/CalendarEvent'
/le/1.92/{orgUnitId}/calendar/event/{eventId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- $ref: '#/components/parameters/EventId'
get:
operationId: getCalendarEvent
tags:
- Calendar
summary: Get a calendar event
description: Retrieves a single calendar event by its identifier.
responses:
'200':
description: The calendar event.
content:
application/json:
schema:
$ref: '#/components/schemas/CalendarEvent'
delete:
operationId: deleteCalendarEvent
tags:
- Calendar
summary: Delete a calendar event
description: Deletes a single calendar event.
responses:
'200':
description: The event was deleted.
/le/1.92/{orgUnitId}/news/:
get:
operationId: listNewsItems
tags:
- News
summary: List news items
description: Retrieves the news (announcement) items in a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
responses:
'200':
description: A list of news items.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/NewsItem'
post:
operationId: createNewsItem
tags:
- News
summary: Create a news item
description: Creates a new news (announcement) item in a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NewsItem'
responses:
'200':
description: The created news item.
content:
application/json:
schema:
$ref: '#/components/schemas/NewsItem'
/le/1.92/{orgUnitId}/news/{newsItemId}:
parameters:
- $ref: '#/components/parameters/OrgUnitId'
- name: newsItemId
in: path
required: true
schema:
type: integer
get:
operationId: getNewsItem
tags:
- News
summary: Get a news item
description: Retrieves a single news item by its identifier.
responses:
'200':
description: The news item.
content:
application/json:
schema:
$ref: '#/components/schemas/NewsItem'
delete:
operationId: deleteNewsItem
tags:
- News
summary: Delete a news item
description: Deletes a single news item.
responses:
'200':
description: The news item was deleted.
/le/1.92/lo/outcomeSets/:
get:
operationId: listOutcomeSets
tags:
- Learning Outcomes
summary: List organization outcome sets
description: Retrieves the learning outcome sets defined at the organization level.
responses:
'200':
description: A list of outcome sets.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OutcomeSet'
post:
operationId: createOutcomeSet
tags:
- Learning Outcomes
summary: Create an organization outcome set
description: Creates a new learning outcome set at the organization level.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OutcomeSet'
responses:
'200':
description: The created outcome set.
content:
application/json:
schema:
$ref: '#/components/schemas/OutcomeSet'
/le/1.92/{orgUnitId}/lo/alignments/:
get:
operationId: listOutcomeAlignments
tags:
- Learning Outcomes
summary: List outcome alignments for an org unit
description: Retrieves the learning outcome alignments within a course offering.
parameters:
- $ref: '#/components/parameters/OrgUnitId'
responses:
'200':
description: A list of alignments.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OutcomeAlignment'
/lp/1.53/dataExport/list:
get:
operationId: listDataSets
tags:
- Data Hub
summary: List available data sets
description: Retrieves a list of the data sets available to export through the Data Export Framework.
responses:
'200':
description: A list of data sets.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DataSetData'
/lp/1.53/dataExport/create:
post:
operationId: createDataExport
tags:
- Data Hub
summary: Create an export job
description: Creates an export job for a requested data set with optional filter parameters.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateExportJobData'
responses:
'200':
description: The created export job.
content:
application/json:
schema:
$ref: '#/components/schemas/ExportJobData'
/lp/1.53/dataExport/jobs:
get:
operationId: listDataExportJobs
tags:
- Data Hub
summary: List export jobs
description: Lists the export jobs previously submitted by the caller.
responses:
'200':
description: A list of export jobs.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ExportJobData'
/lp/1.53/dataExport/download/{exportJobId}:
get:
operationId: downloadDataExport
tags:
- Data Hub
summary: Download an export job result
description: Downloads the ZIP file (containing a CSV) prod
# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/brightspace/refs/heads/main/openapi/brightspace-openapi.yml