The API's documented here relate to managing eLearning files in SAP Litmos Training
Important Note: Only SCORM and Tin Can (xAPI) eLearning files can be uploaded/updated/retrieved at this time. SCORM and Tin Can files sent to this endpoint must be valid SCORM/TinCan courses packaged as .zip files. The moduleType that will be returned in any response will always be ModuleType>9</ModuleType> for SCORM and Tin Can.
The <ContentURL>string[optional, max length 1000]</ContentURL> field contain a URL that would initiate a file download in the client browser.
The <Status></Status> field represents the file's status and can possess the following values to represent the status
- Queued
- Uploading
- ReadyToProcess
- Processing
- Ready/Failed
Upload SCORM/Tin Can files as Modules
Request Uri
POST /modules?
Request Body (XML)
<Module>
<Name>string [max length 100]</Name>
<Description>string [optional, max length 2000]</Description>
<ModuleType>9</ModuleType>
<Active>true/false</Active>
<Code>string [max length 50]</Code>
<HideDescription>true/false</HideDescription>
<NewWindow>true/false</NewWindow>
<ReviewMode>true/false</ReviewMode>
<ContentURL>string[optional, max length 1000]</ContentURL>
</Module>
Response Body (XML)
<Module xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Id>F6oAfh3hxl81</Id>
<ModuleType>9</ModuleType>
<Name>Example SCORM/TC File</Name>
<Description>Example SCORM/TC File Course Description</Description>
<Active>true</Active>
<ModuleRefCode/>
<HideDescription>false</HideDescription>
<NewWindow>true</NewWindow>
<ReviewMode>true</ReviewMode>
<Status>Queued</Status>
</Module>
Request Body (JSON)
{
"Name": "string [max length 100]",
"Description": "string [optional, max length 2000]",
"ModuleType": "9",
"Active": "true/false",
"Code": "string [max length 50]",
"HideDescription": "true/false",
"NewWindow": "true/false",
"ReviewMode": "true/false",
"ContentURL": "string[optional, max length 1000]"
}
Response Body (JSON)
{
"Id": "F6oAfh3hxl81",
"ModuleType": 9,
"Name": "Example SCORM/TC File",
"Description": "Example SCORM/TC File Course Description",
"Active": true,
"ModuleRefCode": "",
"HideDescription": false,
"NewWindow": true,
"ReviewMode": true,
"Status": "Queued"
}
Update SCORM/Tin Can Modules
Request Uri
PUT /modules/{moduleid}?
Request Body (XML)
<Module>
<Id>string [max length 50]</Id>
<ModuleType>9</ModuleType>
<Name>string [max length 100]</Name>
<Description>string [optional, max length 2000]</Description>
<Active>true/false</Active>
<ModuleRefCode>string [max length 50]</ModuleRefCode>
<HideDescription>true/false</HideDescription>
<NewWindow>true/false</NewWindow>
<ReviewMode>true/false</ReviewMode>
<ContentURL>string[optional, max length 1000]</ContentURL>
</Module>
Response Body (XML)
<Module xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Id>F6oAfh3hxl81</Id>
<ModuleType>9</ModuleType>
<Name>Example SCORM/TC File Updated</Name>
<Description>Example SCORM/TC File Course Description Updated</Description>
<Active>true</Active>
<ModuleRefCode></ModuleRefCode>
<HideDescription>false</HideDescription>
<NewWindow>true</NewWindow>
<ReviewMode>true</ReviewMode>
<Status>Queued</Status>
Request Body (JSON)
{
"Id": "string [max length 50]",
"ModuleType": "9",
"Name": "string [max length 100]",
"Description": "string [optional, max length 2000]",
"Active": "true/false",
"ModuleRefCode": "",
"HideDescription": "false",
"NewWindow": "true",
"ReviewMode": "true",
"ContentURL": "string[optional, max length 1000]",
}
Response Body (JSON)
{
"Id": "Y5z6QDLHG3A1",
"ModuleType": 9,
"Name": "Example SCORM/TC File Updated",
"Description": "Example SCORM/TC File Course Description Updated",
"Active": true,
"ModuleRefCode": "",
"HideDescription": false,
"NewWindow": true,
"ReviewMode": true,
"Status": "Ready"
}
Retrieve SCORM/Tin Can Modules
Request Uri
GET /modules/{moduleid}?
Response Body (XML)
<Module xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Id>Y5z6QDLHG3A1</Id>
<ModuleType>9</ModuleType>
<Name>New API TEST FOR SCORM UPDATE</Name>
<Description>New API TEST FOR SCORM UPDATE</Description>
<Active>true</Active>
<ModuleRefCode/>
<HideDescription>false</HideDescription>
<NewWindow>false</NewWindow>
<ReviewMode>true</ReviewMode>
<Status>Ready</Status>
</Module>
Response Body (JSON)
{
"Id": "Y5z6QDLHG3A1",
"ModuleType": 9,
"Name": "New API TEST FOR SCORM UPDATE",
"Description": "New API TEST FOR SCORM UPDATE",
"Active": true,
"ModuleRefCode": "",
"HideDescription": false,
"NewWindow": false,
"ReviewMode": true,
"Status": "Ready"
}
Add a AICC/SCORM/Tin Can Module to a Course
Important Note: A module can be copied, linked or mirrored into a course. It is important to understand the difference of each before adding the module into the course as it will have implications for module content management and reporting.
Request Uri's:
POST /courses/{courseid}/modules/copy?
POST /courses/{courseid}/modules/link?
POST /courses/{courseid}/modules/mirror?
Request Body: (XML)
<Modules>
<Module>
<Id>string [max length 50]</Id>
</Module>
</Modules>
Request Body: (JSON)
{
"Modules": {
"Module": {
"Id": ""
}
}
}
Response Header
200 OK
Remove a AICC/SCORM/Tin Can Module From a Course
Request Uri's:
DELETE /courses/{courseid}/module/{moduleid}
Response Header:
200 OK
Comments
0 comments
Article is closed for comments.