LEARN API

LEARN has a full-out REST API that can be used for accomplishing most things that can be done through the interface. The documentation, however, is a bit messy and for some reason designed to be annoyingly high-level. This walkthrough will attempt to do a minimal library-less connection in a neutral language (JS) so you can implement it in whatever platform you’re using.

LEARN provides Python, Java, Node, and .NET SDKs, but they aren’t always super up-to-date. The Python SDK is working as of October 2023

Prerequisites

In order to use the API you’ll need to get an api “app” created. This isn’t something mere mortals have access to, so you’ll need to reach out to the LEARN team to get access.

As of February 2024 you should reach out to Scott Anderson and Sean Warren to begin the access request process

Access will need to be cleared by appropriate entities (Assoc. Dean UG for your faculty, Director Instructional Technologies). You will also likely need to have a service WATIAM account created for this purpose to be authorized with the necessary access levels.

Authenticating

Here’s the fun bit. You’ll likely be using the API in one of 2 ways:

  • To create tools for users to access their own data via OAUTH2

  • To create administrative tools to do spooky automated stuff

The API is designed for the former, and their documentation covers it pretty good. If you want to do the latter you’ll need to harvest a set of user credentials. We’ve set up a service with instructions and harvesting functionality here (100% in-browser, no dependencies. You can inspect all the code to make sure it’s secure): https://d2l-api-cred.fast.uwaterloo.ca/

API Endpoints

A full routing table can be found here: https://docs.valence.desire2learn.com/http-routingtable.html