Search code examples
apidesire2learn

Desire2Learn: start with SIS Org Code, retrieve Org ID


My team is using D2L Valence to supplement our SIS integration. Our use case is to enroll (i.e., create a NEW enrollment for) a known User into a known Course Offering, both of which originally came from the SIS.

We're bumping into the common problem of "how to retrieve a D2L Org ID when all you have is the SIS Org Code". The best previous solution I've seen is:

Desire 2 Learn Org Unit ID: Retrieve all Course Offering descendants of the university. Then pattern-match inside the JSON result to find the Offering you're looking for.

But there's a caveat: "This process will almost certainly require fetching a large amount of data, and then parsing through it." It also recommends to (1) start the search further down in the org structure, if you know THAT Org ID; and (2) "then persist and use [this data] directly later."

These are problematic because our D2L org structure is big (~3500 offerings per semester) and constantly shifting and growing. We don't want to persist any D2L data; we'd rather retrieve on the fly.

So is this the most efficient current method of retrieving a single Org ID for an object that came from our SIS? If so, are there any plans for a method that retrieves a unit by Org Code?


Solution

  • The information in the link you quoted is still current. The functionality you are identifying is in the list of requests. It is expected to take a form similar to search-for-users-by-orgedfinedid. Prior to a given release you will see docs appear on valence that identify new calls, so you will be able to follow if a given release includes a change like this one.