Working with Google Workspace

Our school uses Google Workspace for email. I am working on a program to automate the linking of D2L user accounts with their corresponding Google Workspace accounts. Currently, I have to daily generate a csv file of all users who have not been linked (using the database created from datahub BDS sets). I then use this file in the admin tool in D2L to bulk load them. This is a bit of a kludge already since I have to have an auxiliary table to keep track of the ones I have already done because I have not been able to actually find any way to determine from either the datasets or API if a user has already been linked. This is a task that needs to be automated.
Tech support has suggested I use this route: POST /d2l/api/gae/(version)/linkuser
The idea is that I will run a program that will be a client to both my database server and to our D2L site. I'll use my existing query that generates the CSV to fetch the rows and then use those rows to POST the GoogleAppsLinkingItem with the route I indicated above. I can then log any errors and manually take care of any anomalous cases. If you know of another way to do this, I am open to suggestions.
I am about to start testing, but I am unsure what value goes into (version). When I queried the versions it didn't list anything with a ProductCode of "gae" and when I tried to query the version directly (GET /d2l/api/gae/versions/) it returns null (not to surprising since it wasn't listed).
I did read up on what it means to be 'unstable', however, it seems there really isn't any other choice. So, the question is, how do you determine the version to use or is that part of 'unstable' — that you just start making numbers up. I understand using an unstable route isn't recommended for production use, but there are only 2 of us and so automating anything possible has been the watchword.
I really am trying to do this using the front door and not resort to screen scraping. In the ideal world, this should be able to be done during account creation from our SIS. However, baby steps.
Respuestas
-
Hi @Randall.S.394 ,
Thank you for reaching out to the Brightspace community. I'm Tejas, a member of the Product Support team. I have been assigned to this question.
Regarding your query, I found out below article for the API call. Kindly refer to these articles.
D2LVersion: A string value that you should treat as a version specifier to indicate the version of the API you want to use. These version strings get built from a major and minor version number (for example: 1.0). Note that each component in the back-end learning platform you’re connecting to will have its own set of versions it can support.
You can try using the 1.0 version and let me know if you find any issues/queries.
-
Thanks. I will try that.