Skip to main content

shareableContentObject (SCORM) Example

This example demonstrates creating SCORM-compliant e-learning content using the shareableContentObject kind.

What is SCORM?

SCORM (Sharable Content Object Reference Model) is a collection of standards for web-based e-learning. The Thought Industries API supports both SCORM 1.2 and SCORM 2004 packages.

Basic SCORM Example

Create a standalone SCORM course:

curl -X POST "https://{your-instance-url}/incoming/v2/content/course/create" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"courseAttributes": [
{
"title": "Compliance Training 2024",
"kind": "shareableContentObject",
"scormUrl": "https://cdn.example.com/scorm/compliance-2024.zip",
"width": 800,
"height": 600,
"availableToPublic": false
}
]
}'

Response Example

["scorm_jkl012"]

SCORM with Additional Settings

Configure display and behavior options:

{
"courseAttributes": [
{
"title": "Interactive Safety Training",
"kind": "shareableContentObject",
"sku": "SAFETY-001",
"scormUrl": "https://cdn.example.com/scorm/safety-training.zip",
"width": 1024,
"height": 768,
"embeddedEnabled": true,
"resetSessionAfterComplete": false,
"availableToPublic": false,
"enrollmentStartDate": "2024-01-01T00:00:00Z",
"enrollmentEndDate": "2024-12-31T23:59:59Z"
}
]
}

SCORM with Enrollment Limits

Limit access to SCORM content:

{
"courseAttributes": [
{
"title": "Advanced Sales Simulation",
"kind": "shareableContentObject",
"scormUrl": "https://cdn.example.com/scorm/sales-sim.zip",
"width": 800,
"height": 600,
"embeddedEnabled": true,
"enrollmentLimit": 100,
"courseStartDate": "2024-02-01T00:00:00Z",
"courseEndDate": "2024-05-31T23:59:59Z"
}
]
}

SCORM within a courseGroup

Include SCORM content as a topic within a structured course:

{
"courseAttributes": [
{
"title": "Complete Compliance Course",
"kind": "courseGroup",
"sections": [
{
"title": "Introduction",
"lessons": [
{
"title": "Welcome",
"openType": "studentsOnly",
"topics": [
{
"title": "Course Overview",
"type": "text",
"body": "<p>Welcome to the compliance training course.</p>"
}
]
}
]
},
{
"title": "Interactive Module",
"lessons": [
{
"title": "Compliance Simulation",
"openType": "studentsOnly",
"topics": [
{
"title": "Interactive Scenarios",
"type": "shareableContentObject",
"scormUrl": "https://cdn.example.com/scorm/scenarios.zip",
"width": 800,
"height": 600,
"embeddedEnabled": true,
"resetSessionAfterComplete": false
}
]
}
]
}
]
}
]
}

SCORM Package Requirements

Package Structure

Your SCORM package (.zip file) must include:

scorm-package.zip
├── imsmanifest.xml (required)
├── index.html (launch file)
├── css/
│ └── styles.css
├── js/
│ ├── scorm-api.js
│ └── app.js
└── assets/
├── images/
└── videos/

Manifest File Example

<?xml version="1.0" encoding="UTF-8"?>
<manifest identifier="course_001" version="1.0"
xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2">

<metadata>
<schema>ADL SCORM</schema>
<schemaversion>2004 3rd Edition</schemaversion>
</metadata>

<organizations default="course_org">
<organization identifier="course_org">
<title>Course Title</title>
<item identifier="item_1" identifierref="resource_1">
<title>Lesson 1</title>
</item>
</organization>
</organizations>

<resources>
<resource identifier="resource_1" type="webcontent"
adlcp:scormtype="sco" href="index.html">
<file href="index.html"/>
</resource>
</resources>
</manifest>

Field Reference

Required Fields

FieldTypeDescription
titlestringCourse title
kindstringMust be "shareableContentObject"
scormUrlURLURL to SCORM package (.zip)
widthintegerPlayer width in pixels
heightintegerPlayer height in pixels

Optional Fields

FieldTypeDefaultDescription
embeddedEnabledbooleanfalseAllow embedding in page
resetSessionAfterCompletebooleanfalseReset SCORM data on completion
skustringnullStock keeping unit
availableToPublicbooleanfalsePublic accessibility
enrollmentLimitintegernullMax enrollments

Display Options

Content TypeWidthHeight
Standard800600
Widescreen1024768
Full HD19201080
CustomAnyAny

Embedding Options

embeddedEnabled: true

  • SCORM player embedded in page
  • Better user experience
  • No popup windows

embeddedEnabled: false

  • Opens in new window
  • More screen real estate
  • Traditional SCORM behavior

Use Cases

Compliance Training

Perfect for:

  • Regulatory compliance
  • Safety training
  • HR policies
  • Code of conduct

Certification Programs

Ideal for:

  • Professional certifications
  • Skills assessments
  • Knowledge verification
  • License requirements

Interactive Simulations

Great for:

  • Software training
  • Sales scenarios
  • Customer service
  • Emergency procedures

Legacy Content Migration

Excellent for:

  • Existing SCORM content
  • Multi-vendor content
  • Standard-compliant courses
  • Cross-platform delivery

Best Practices

1. Package Size Optimization

  • Compress images and videos
  • Minimize JavaScript and CSS
  • Remove unused assets
  • Target: Keep packages under 100MB

2. Test Before Upload

Test your SCORM package using:

  • SCORM Cloud test environment
  • Local SCORM player
  • Test LMS environment

3. Use Appropriate Dimensions

Match dimensions to content:

{
"width": 1024,
"height": 768
}

Consider the content's native resolution.

4. Set Reset Behavior

Use resetSessionAfterComplete: true when:

  • Content should be retaken fresh
  • Previous attempts should not affect new attempts
  • Training content that changes

Use resetSessionAfterComplete: false when:

  • Want to preserve learner progress
  • Resume capability needed
  • Tracking historical attempts

5. Hosting SCORM Packages

Host packages on:

  • CDN (recommended for performance)
  • Cloud storage (S3, Azure, etc.)
  • Your own servers

Ensure:

  • HTTPS protocol
  • CORS headers configured properly
  • Public accessibility

SCORM Versions

SCORM 1.2

  • Widely supported
  • Simple tracking
  • Basic completion/score tracking
  • Best for compatibility

SCORM 2004

  • Advanced features
  • Better sequencing
  • More detailed tracking
  • Use for complex interactions

Uploading SCORM Packages

Step 1: Host Your Package

Upload your .zip file to a publicly accessible URL:

https://cdn.example.com/scorm/your-course.zip

Step 2: Create the Course

Use the hosted URL in your API call:

{
"scormUrl": "https://cdn.example.com/scorm/your-course.zip"
}

Common Errors

Invalid SCORM Package

{
"error": "SCORM package validation failed",
"details": "imsmanifest.xml not found"
}

Solution: Ensure imsmanifest.xml is at the root of the .zip file.

Package Not Accessible

{
"error": "Unable to access SCORM package",
"field": "scormUrl"
}

Solution: Verify the URL is publicly accessible via HTTPS.

Missing Required Fields

{
"error": "shareableContentObject requires scormUrl, width, and height"
}

Solution: Include all required fields.

Invalid Dimensions

{
"error": "Width and height must be positive integers"
}

Solution: Use valid pixel dimensions (e.g., 800, 600).

SCORM Authoring Tools

Popular tools for creating SCORM packages:

  • Articulate Storyline - Interactive courses
  • Adobe Captivate - Software simulations
  • iSpring Suite - PowerPoint-based
  • Lectora - Complex branching
  • Adapt Learning - Open-source HTML5

xAPI Alternative

For modern e-learning packages, consider using xApiObject kind instead:

{
"kind": "xApiObject",
"scormUrl": "https://cdn.example.com/xapi/package.zip",
"width": 800,
"height": 600
}

xAPI offers more flexible tracking and works better with mobile devices.

Next Steps