openapi: 3.0.3 info: title: D2L Brightspace Valence Learning Framework Assignments Grades 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: Grades description: Course gradebook - grade objects, values, categories, and schemes. paths: /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' components: parameters: OrgUnitId: name: orgUnitId in: path required: true schema: type: integer format: int64 GradeObjectId: name: gradeObjectId in: path required: true schema: type: integer format: int64 UserId: name: userId in: path required: true schema: type: integer format: int64 schemas: GradeObject: type: object properties: Id: type: integer format: int64 Name: type: string ShortName: type: string GradeType: type: string MaxPoints: type: number IncomingGradeValue: type: object properties: GradeObjectType: type: integer PointsNumerator: type: number Comments: type: object properties: Content: type: string Type: type: string GradeValue: type: object properties: UserId: type: integer format: int64 GradeObjectIdentifier: type: string PointsNumerator: type: number PointsDenominator: type: number DisplayedGrade: type: string securitySchemes: oauth2: type: oauth2 description: OAuth 2 authorization code grant. Tokens are issued by the D2L auth service. Scopes take the form group:resource:action (for example users:userdata:read). flows: authorizationCode: authorizationUrl: https://auth.brightspace.com/oauth2/auth tokenUrl: https://auth.brightspace.com/core/connect/token scopes: core:*:*: Full access consistent with the registered application users:userdata:read: Read user data enrollment:orgunit:read: Read enrollments datahub:dataexports:read: Read Data Hub exports