Getting user data by orgDefinedID

50 views
Skip to first unread message

Sean M

unread,
Jun 4, 2014, 9:13:38 AM6/4/14
to valenc...@googlegroups.com
Hi Valence group,

I went looking for how to get user info by orgDefinedID and it appears there is one way to do it: the /d2l/api/lp/(version)/users/ route (a GET route).

The documentation for that route specifies three optional parameters. Given that other more clearly defined GET routes in Valence (e.g. /d2l/api/lp/(version)/users/(userId) ) append the parameter on the end, I first tried /d2l/api/lp/1.3/users/(username)  This returned a status of "Unknown error occured (HTTP status 404)"

I then guessed at /d2l/api/lp/1.3/users/userName/(username), but that returned the same 404 error.

I tried  /d2l/api/lp/1.3/users/(org defined id), and  /d2l/api/lp/1.3/users/userName/orgDefinedID/(org defined id), and both of them also gave a 404.

So... how do you use that /d2l/api/lp/(version)/users/ route?  More generally, how do we use GET routes with optional parameters?

dave.l...@desire2learn.com

unread,
Jun 4, 2014, 9:34:55 AM6/4/14
to valenc...@googlegroups.com
Hi Sean,

Those optional parameters go on the query-string of the URL. So your route would become:

/d2l/api/lp/(version)/users/?orgDefinedId=value

Hope that helps!

Dave.

Sean M

unread,
Jun 4, 2014, 9:39:52 AM6/4/14
to valenc...@googlegroups.com
Ahha, it works! Thanks Dave.

Reply all
Reply to author
Forward
0 new messages