Attaching a SCORM content package to a course or learning module via API

You can attach a SCORM content package to an LMS365 course or a learning item inside an LMS365 course either in the LMS365 Admin Center or directly via the LMS365 API endpoints.

This article describes how to attach a SCORM content package to a course in LMS365 (via Postman) or attach it to a learning module (via Swagger) with the help of LMS365 APIs.

 

In this article

 

Attaching a SCORM content package to a course

NOTE   

Attaching a SCORM content package to a course can't be performed from Swagger. Instead, you must invoke this request from Postman, a Power Automate flow, or code. Attached to this article you can find:

  • a Postman collection with a request that attaches a SCORM to a course.
  • a Power Automate flow that attaches a SCORM to a course.

Having created a SCORM in the LMS365 Admin Center or via LMS365 API, perform the following HTTP request in Postman:

/odata/v2/Courses(COURSE_ID)/Scorms/$ref
with the following body:
{ \"@odata.id\" :\"https://api.365.systems/odata/v2/Scorms(SCORM_ID)\"}
where SCORM_ID should be replaced with the ID of the SCORM you want to add to the course

 

NOTE   

In order for the SCORM content package to be added directly to the LMS365 course as a learning item, you need to provide the correct course ID, SCORM ID, and LMS365 API key of the full control type.

 

Attaching a SCORM content package to a learning module

Adding a SCORM content package to a learning module within a course is done in Swagger, following the steps below:

 

1) After authorizing, under the LMS365 Cloud API, find the LearningModules section.

Expand it and find the request POST /odata/v2/LearningModules with the Creates Learning Module description.

 

 

2) Select Try it out in the top right-hand corner. In the Edit Value field, fill in the required fields and the optional ones you want to add.

The request must have the body below. The CourseId, Title, LearningModuleId, SCORM_ID and Id parameters must be filled (marked red in the script below). The SCORM_TITLE parameter is optional but we recommend to fill it in to provide your SCORM with a title (the parameter is marked orange).

 

{
  "CourseId": "COURSE_ID",
  "Title": "LEARNING_MODULE_TITLE",
  "Description": null,
  "Publishing": {
"IsEnabled": true
},
"Order": 0, "HasPrerequisite": false, "Configuration": { "LearningModuleId": "00000000-0000-0000-0000-000000000000", "Items": "[{\"ScormId\":\"SCORM_ID\",\"ItemType\":2,\"PackageType\":0,\"Id\":\"00000000-0000-0000-0000-000000000000\",\"Title\":\"SCORM_TITLE\",\"IsAvailable\":null,\"IsDeleted\":null}]" } }

 

 

You can use API endpoints to get the relevant data:
  1. You can get the CourseId via the API endpoint GET ​/odata​/v2​/Courses (Returns the list of Courses) .
  2. You can get the data for the learning module's Title and LearningModuleId via the API endpoint GET /odata/v2/LearningModules (Returns the list of Learning Modules) .
  3. You can get the data for the SCORM_ID and Id via the API endpoint GET /odata/v2/Scorms  (Returns the list of Scorms).

 

TIP   

The parameter "Order" set as 0 will make the attached SCORM the first in the list of learning items of the course. You can reorder the learning items in the LMS365 Admin Center, or change the default (0) to the relevant whole number that will define the content package's position among the learning items of the learning module.

 

3) When you are ready, select the blue Execute button. Scroll down to the Responses block to check the results:

  • Number 2xx (for example, 200) under Code shows that the request worked correctly.
  • In the Response body field, you can see the details about the SCORM being successfully added to the learning module.

 

 

The SCORM will be displayed on the course Content panel.

 

 

NOTE   

Adding the SCORM package to a learning module enables a wider range of reporting on course content.

 

Was this article helpful?
1 out of 1 found this helpful

Comments

Article is closed for comments.