Easy Media Upload (EMU)

The Easy Media Upload is a Microservice which simplifies uploading media to the LMS imc Learning Suite. It encapsulates the complex LMS endpoints (upload, metadata population, media templates, SCORM/WBT generation) behind a streamlined REST API.

Configuration

To use the Easy Media Upload, you must configure the types used to create the various media as follows:

  • Call the Clients function.

  • Select the client to be used for media upload.

  • Click the Settings gear icon in the toolbar.

  • Select the Easy media upload option from the drop-down menu.

  • On the configuration screen, define the types of media to be used for each service to create media from uploaded files.

Authentication and Authorization

Every request must provide a valid JSON Web Token (JWT) – either as Authorization: Bearer <token> header or as Cookie (default name imcAuthToken). The cookie value may optionally begin with "Bearer". The token must be a Bearer token with the password grant type. For more information on how to request such a token, please visit Requesting an access token to use the REST API.

In addition to successful authentication, the user for whom the token was created must also have access to the relevant channel menu items in the LMS (or be a superuser). Menu and navigation permissions are controlled in the LMS via the standard role and permission management system. If access is denied, the service returns the 403 Forbidden error message.

Language

Almost all endpoints expect the Accept-Language HTTP header. It determines the language in which the LMS loads the media template and meta tags. If the header is missing for endpoints that require it as a mandatory parameter, the service responds with the 400 Bad Request error message.

service Parameter

Many endpoints have an optional service query parameter. It controls which Easy Media Upload settings (template/type IDs) are loaded for each client. Valid values are listed in the table below:

Value

Default for

channels

/file, /link

ecc

/event, /activity, /ms-teams

imcExpress

Internal for all SCORM/WBT calls (cannot be overwritten)

Error Messages

All LMS errors are passed through and translated. The following table shows all mappings:

LMS Status

Service Response

400

400 Bad Request

401

401 Unauthorized

403

403 Forbidden

404

404 Not Found

406

406 Not Acceptable (e.g., virus detected)

other

500 Internal Server Error

Media Creation Using EMU

All API endpoints are located under the /easy-media-upload/api/mediaupload base path.

You can find a Postman collection containing all API calls here: Easy Media Upload.json

Before media can be created, call one of the following four API endpoints (see Step 1) to obtain a template for creating media (see Step 2). Only the upload and creation of an SCORM WBT work independently based on the ZIP file (see Standalone).

Step 1: Receiving a Template

The /event endpoint and /activity endpoint return an empty template for the respective media object type. The /file endpoint loads a selected file into the LMS temp directory and then returns a pre-filled template. The /link endpoint also returns a template pre-filled with metadata (via OpenGraph).

1.1 POST /file – Upload File

Uploads any file to the LMS temp directory and returns a pre-filled template.

Method/Path

POST /file

Consumes

multipart/form-data

Success

201 Created

Parameters

  • file (multipart part, mandatory) – the file to be uploaded

  • Accept-Language (header, mandatory) – platform language

  • service (query, optional, default channels)

1.2 POST /link – Upload Link

Creates a link media template from a URL. OpenGraph metadata (title, description, thumbnail) are determined automatically.

Method/Path

POST /link

Consumes

application/json

Success

201 Created

Body example:

{ "link": "https://example.com/page" }

Parameters

  • Accept-Language (header, mandatory) - Platform language

  • service (query, optional, default channels)

1.3 GET /event – Retrieve the Event Media Template

Provides an empty template for the Event media type.

Method/Path

GET /event

Success

200 OK

Parameters

  • Accept-Language (header, mandatory) – platform language

  • service (query, optional, default ecc)

1.4 GET /activity – Retrieve the Activity Media Template

Designed similarly to /event, but for the Activity media type.

Method/Path

GET /activity

Success

200 OK

Parameters

  • Accept-Language (header, mandatory) – platform language

  • service (query, optional, default ecc)

Step 2: Endpoints for Creating Media

To create media from the templates obtained in Step 1, add information to the template and use POST or PUT /media to finally create it in the system. During this process, files are moved from the LMS temp directory to their respective destination folders, metadata tags are processed, and required metadata tags are checked. If everything is in order, the media object is created in the LMS and the new ID is returned.

2.1 POST /media - Create Final Media

Saves a previously (via /file, /link, etc.) prepared and completed RestMedia finally in the LMS.

Method/Path

POST /media

Success

201 Created

Returns

Object with the new media ID

Body

RestMedia (fully completed template)

Parameters

isCourseSpecific (query, optional, default false)

2.2 PUT /media – Update Media

Updates existing media. The id must be included in the body.

Method/Path

PUT /media

Success

200 OK

Returns

Object with the Media ID

Similar processing to that used for POST /media, including moving temporary files and mandatory meta tag validation.

Standalone: SCORM WBT Upload via EMU

POST /scorm/create/{scormVersion} – Upload & Publish SCORM Package

Uploads a SCORM ZIP file, generates a SCORM WBT learning object, and publishes it.

Method/Path

POST /scorm/create/{scormVersion}

Consumes

multipart/form-data

Success

201 Created

Returns

Object with the Media ID

Parameters

  • scormVersion (path, mandatory) – e.g., 1.3 (imc Express supports only SCORM 1.3.)

  • file (multipart, mandatory) – the SCORM ZIP