Search code examples
javascriptdesire2learn

Server Status Maintenance Mode Flag w/ D2L?


Just getting started with the Desire2Learn and would like to implement a server status widget that lets users know when the server is up,down, or in maintenance mode. I have been poking around but have not found a definitive solution as of yet.

I am under the impression that there are times when the server goes into maintenance mode and becomes essentially view only, as uploads and downloads fail.

Is there a maintenance mode flag I can check to remotely determine the server status using javascript?


Solution

  • There are no Valence Learning Framework APIs that you can use to inquire of the service about it's current running status. You can effectively generate an API ping by making a call to get the available API versions to determine if the service is responding to API requests, and you can make this call anonymously, so you don't need an active user context to do so (build an anonymous user context, and use that to make the API call).

    However, as with all Valence Learning Framework API calls, you at least will need a valid App ID and Signature token going with that call (which means you need to be a registered app, and the back-end service needs to have enabled your app for API access). And, because you'll have to generate App signature tokens to make the call, we don't advise that you do this solely on the client side, because that would require pushing the App ID/Key pair down to the client, and that's not a secure practice.