When connecting to the SCORM Cloud API, you are required to provide API credentials in the form of an Application ID (App ID) and a secret key. You can access this information from the Apps / API page.
Click the Details link to view the secret key for an application. The App ID for the application is also listed at the top of this page.
Retrieving registration results
Using your API credentials, construct an instance of the API client. You can do this from the Node REPL by running the node command without a filename.
The getRegistrationListResults method retrieves a list of registration results. Registration results include the completion status, success status, total time spent, and the overall score. Results can optionally be limited to a specific course or learner id.
Writing data to an Excel workbook
For writing the data to an Excel workbook, we’ll bring in the xlsx module and use the sheet_to_json helper function to create a worksheet. After creating the worksheet, it can be appended to the workbook and written to disk.