How to retrieve grades from a class using BlackBoard Learn API

1.8k Views Asked by At

I've been trying to use cURL commands to retrieve course grades from blackboard Learn API but have been unsuccessful.

#bin/bash
server=https://localhost
token=<token>
courseId=<courseID>

curl -k -X GET -H "Authorization: Bearer $token" $server/learn/api/public/v1/courses/courseId:$courseId/gradebook/columns/_72109_1/users

This only returns three fields out of the six fields it's supposed to return but i don't understand why. https://developer.blackboard.com/portal/displayApi

1

There are 1 best solutions below

0
On

For the gradebook API, the results depend upon the privileges assigned to the user associated with the REST application.

This copy from the Swagger docs show some of the limitations based upon the user:

Returns a list of grades associated with the specified grade column. This operation does not include 'ReadyToPost' grades when returning grade details for calculated grade columns.

Users with entitlement 'course.gradebook.MODIFY' can retrieve grades for any or all enrolled users. Requests for grades in a columns whose attempts are not visible to instructors will return with a status of "403 - Forbidden."

Enrolled users without the 'course.gradebook.MODIFY' entitlement may only view their own grade; such users cannot retrieve grades of other users. A request for the grade in a columns that has been hidden from students in the gradebook will return with a status "403 - Forbidden.". A subset of grade properties are available to a student when requesting his or her own grades:

userId columnId status text score exempt feedback