Course completion API not returning results?

I'm trying to retrieve course completion information via Postman.
- GET {{BrightspaceDomain}}/d2l/api/le/{{leversion}}/1234/grades/courseCompletion/
- GET {{BrightspaceDomain}}/d2l/api/le/1.75/grades/courseCompletion/12345/
Each time I run the GETs above, I get a 200 status, but it doesn't return any details:
{"PagingInfo": {"Bookmark": null,"HasMoreItems": false},"Items": []}
I double-checked a Manager Completion report, and user 12345 definitely appears in a completion report for course 1234. Can anyone point out what I'm missing? I'm a novice when it comes to APIs.
Some notes:
- Course 1234 didn't get "enable completion tracking" turned until yesterday.
- The completion tracking criteria is based on the release condition "User has earned award X"
- I also tried this on multiple other courses and users who should be marked as complete, but still aren't appearing in the response
Answers
-
I haven't used this route before, but I suspect that it is specific to the Grades tool, which is separate from the "completion tracking" setting.
This route may perform the action that you're looking for. I was able to collect the completion status of a user. Some notes about the route:
- The authorizing user will require Completion Tracking permissions. I enabled them all, but I suspect it is "Track Completion Progress in Widget," but others may also impact it.
- Completion Tracking is required to be enabled in the target org unit.
Hope this helps!
-
Interesting idea - but it's still not working!
- I ran GET {{BrightspaceDomain}}/d2l/api/lp/{{lpversion}}/enrollments/orgUnits/7105/users/19503/completion and it gives me a 404 error. (I tried multiple orgunitids and userids)
- But if I look up the same user via GET {{BrightspaceDomain}}/d2l/api/lp/{{lpversion}}/enrollments/users/19503/orgUnits/ it shows me that they ARE enrolled in OrgUnitId 7105. 🤔
7105 isn't formally assigned by a manager. The user self-enrolled via the Discover tool, but has met the completion criteria for the course.
Some notes/thoughts:
- I'm a Super Admin - I should be able to pull user data, right? This API isn't limited to the manager's of the employees?
- Our courses don't use the grade tools - just the Completion Criteria. (E.g. Our release conditions are based on "User 1 has earned X% on Exam A" and, "User 1 has earned Award B. Award B is our definition of complete."