Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Using REST

API for
Loading Rich
Media Content
Oracle Learning Cloud

WHITE PAPER / MARCH 12, 2020


PURPOSE STATEMENT
This white paper explains how to load rich media content into Oracle Learning Cloud using the
Learning Content REST service. It discusses the capabilities provided by the Oracle Learning Cloud
REST service and data flows between Oracle Learning Cloud and Akamai services. The details in this
document will be of interest to anyone who wants to understand the specific requirements for the
programmatic management and bulk loading of rich media content into Oracle Learning Cloud.

DISCLAIMER
This document in any form, software or printed matter, contains proprietary information that is the
exclusive property of Oracle. Your access to and use of this confidential material is subject to the
terms and conditions of your Oracle software license and service agreement, which has been
executed and with which you agree to comply. This document and information contained herein may
not be disclosed, copied, reproduced or distributed to anyone outside Oracle without prior written
consent of Oracle. This document is not part of your license agreement nor can it be incorporated into
any contractual agreement with Oracle or its subsidiaries or affiliates.

This document is for informational purposes only and is intended solely to assist you in planning for the
implementation and upgrade of the product features described. It is not a commitment to deliver any
material, code, or functionality, and should not be relied upon in making purchasing decisions. The
development, release, and timing of any features or functionality described in this document remains at
the sole discretion of Oracle.

Due to the nature of the product architecture, it may not be possible to safely include all features
described in this document without risking significant destabilization of the code.

2 W HITE PAPER / Using REST API for Loading Rich Media Content
TABLE OF CONTENTS

Purpose Statement ...................................................................................... 2

Oracle Learning Cloud ................................................................................. 6

Oracle Learning Cloud Rich Media Platform................................................ 6

Introduction to Oracle HCM Data Loader..................................................... 7

Learning Cloud HCM Data Loading ............................................................. 7

Introduction to Oracle Cloud REST Services ............................................... 7

Oracle Learning Cloud Learning Content REST API ................................... 7

User Security Dependencies ....................................................................... 8

Obtaining Hostname Information ................................................................. 8

Update Payload Attributes Summary ........................................................... 9

Effective Dating Considerations ................................................................... 9

Akamai NetStorage HTTP API .................................................................. 10

Obtaining Hostname Information ............................................................... 10

Process Overview for Loading Rich Media Content ...................................................................11

Usage Limits on REST Services ................................................................ 12

Process Overview for Correcting Rich Media Content................................................................12

SCORM and AICC Files .............................................................................................................12

Videos ........................................................................................................................................12

PDF Files ....................................................................................................................................12

3 W HITE PAPER / Using REST API for Loading Rich Media Content
Understanding Akamai Token Expiration ...................................................................................13

Process Overview.......................................................................................................................13

Strategies for Managing Learning Rich Media Content Items


Programmatically ....................................................................................... 13

Learning Information Architecture Dependencies ...................................... 14

How HDL Managed Objects are Dependent on the REST Content Managed Objects...............14

Bulk Loading of Learning Rich media content Items .................................. 14

Bulk Loading Advantages ...........................................................................................................14

Process Overview ...................................................................................... 15

Implementation Project Plan Example ....................................................... 17

Ad Hoc Management of Learning Rich media content Items ..................... 17

How-To Example: Programmatically Loading SCORM Content .................................................17

How-To Example: Programmatically Loading Video Content .....................................................20

How-To Example: Programmatically Loading PDF Content .......................................................23

REST Toolkit ............................................................................................. 26

Troubleshooting ......................................................................................... 27

Learning Content Service Error Code 400 Bad Request ............................................................27

Learning Content Service Error Code 401 Unauthorized Response ..........................................27

Learning Content Service Error Code 500 Internal Server Error Response ...............................27

Connection Issues During Upload to Akamai .............................................................................27

4 W HITE PAPER / Using REST API for Loading Rich Media Content
5 W HITE PAPER / Using REST API for Loading Rich Media Content
ORACLE LEARNING CLOUD

Oracle Learning Cloud enables people in your organization to create,


assemble and publish high quality rich media content. Authors can publish
to everyone in the organization or to a smaller audience. You can
designate which users have the ability to publish rich media, and you can
configure user-generated content to be routed for approval. With “just in
time” learning available on demand, people are enabled to share ideas and
knowledge in a peer-to-peer environment that can make them feel like their
colleagues are sitting right next to them.

Oracle Learning Cloud also enables organizations to manage other types


of learning like formal eLearning via rich content types like SCORM, AICC,
PDF or video.

ORACLE LEARNING CLOUD RICH MEDIA PLATFORM

Learners today expect a consumer-grade rich media viewing experience


that dynamically adapts to their devices and current connection speed, and
provides instant access to high definition video content on a variety of
devices. Oracle Learning Cloud helps you to engage learners globally by
providing responsive rich media viewing experiences across geographies
and time zones. You do not have to build out costly infrastructure to keep
up with the growth and complexity of different connected device types and
device connection speeds.

Note: For additional details, refer to the My Oracle Support (MOS)


document called “Oracle Learning Cloud – Rich Media Platform Sub-
Processor Usage” (DOC ID 2645363.1).

6 W HITE PAPER / Using REST API for Loading Rich Media Content
DATA MOVEMENT BETWEEN ENVIRONMENTS

Rich media bits are not cloned/copied/preserved on the target when performing P2T, T2T, T2P, etc.
The metadata about OLC Rich media content items will always be transferred from the source to the
target, but the rich media bits on the OLC Akamai POD will not be transferred from the source to the
target. However, loading the rich media bits of an OLC Content Item to the OLC Akamai POD can be
(re)executed on the target after the P2T operation so the rich media items are playable on the target.

INTRODUCTION TO ORACLE HCM DATA LOADER


HCM Data Loader is a powerful tool for bulk-loading and maintaining data. The data can be from any
source. You can use HCM Data Loader for data migration, ongoing maintenance of HCM data, and
coexistence scenarios, where Oracle Learning Cloud data is uploaded regularly.

Note: For a complete list of supported media formats, compatibility and limitations visit the System
Requirements for Oracle Applications Cloud web page, and view the Learning Cloud Service
section under Oracle Human Capital Management Cloud.

LEARNING CLOUD HCM DATA LOADING


HCM Data Loader is optimized for loading and updating large sets of data. You can use it to insert and
update many records by submitting Oracle Learning Cloud Object .dat files via the HCM Data Loader
User Interface. HCM Data Loader can’t be used to load in rich media content (i.e. SCORM, Video,
and PDF). For that, you need to utilize REST. HCM Data Loader is primarily used to load in metadata
around learning objects within Oracle Learning Cloud, like the courses, offerings, and activities. Refer
to the implementation project plan example in the appendix for the list of all of the HDL objects.

Recommended Reading: Refer to the document called “Understanding Data Loading and
Migration” (DOC ID 2518764.1) on My Oracle Support.

INTRODUCTION TO ORACLE CLOUD REST SERVICES


Oracle HCM Cloud provides REST APIs that enable you to access data and integrate with external
applications. You can use REST APIs to access and integrate data into new and existing business
process flows. See the document on docs.oracle.com called “REST API for Oracle HCM Cloud” for
more details.

ORACLE LEARNING CLOUD LEARNING CONTENT REST API


The Learning Content REST service supports the ingestion of SCORM and AICC online content
formats, video, and PDF files, as well as web link references.

Oracle Learning Cloud REST services provides a powerful, convenient, and simple web services
interface for interacting with Oracle Learning Cloud. REST is used to load in rich media content (for
example SCORM, Video, PDF) and then this rich media content is associated to a self-paced learning
item activity. This is an example of the course hierarchy of learning objects, how they are associated
to one another, and how they are loaded into the system.

• Course (Loaded in via HDL)

– Offering (Loaded in via HDL)

– Self-Paced Activity (Loaded in via HDL)

7 W HITE PAPER / Using REST API for Loading Rich Media Content
– Rich Media Content Item (Loaded in via REST)

USER SECURITY DEPENDENCIES


To use Learning Content REST services, requires these dedicated function security:

• To get, create, and update content items, use REST Service - eLearning Content

• To get content items, use REST Service – eLearning Content Read Only

OBTAINING HOSTNAME INFORMATION


The hostname is pod-specific. You may have multiple pods, such as a development/test pod,
production pod, etc. To obtain the correct hostname, sign in as a learning administrator, and navigate
to My Workforce > Learning. Note the hostname of your instance, including everything up to
“/hcmCore”.

For example, if the URL is:

https://XXXX-test.hcm.us2.oracle.com/hcmCore/faces/FndOverview,

then the hostname to use is:

XXXX-test.hcm.us2.oracle.com.

Once you have this hostname, the URL for the Learning Content item REST endpoint will be as
follows:

http://HOSTNAME_ABOVE/hcmRestApi/resources/latest/learningContentItems

Create Payload Attribute Summary

The following table outlines the mandatory and optional input payload attributes for the learning
content service when creating a new content item. Unless otherwise indicated, the attributes apply to
all content types: Online Content (SCORM, HACP), Video, PDF, and Web Link.

Table 1. Create Payload Attributes

NAME TYPE MANDATORY ADDITIONAL DETAILS

Item Number String Yes Must be alphanumeric and not


starting with OLC.

Title String Yes 250 characters maximum.

Tracking Type String Yes Valid Values:


• ORA_SCORM_12
• ORA_SCORM_2004
• ORA_HACP
• ORA_CONTENT_VIDEO
• ORA_PDF
• ORA_AUTO (Web link)

File Name String Only if tracking type value is: • 30 characters maximum
• ORA_SCORM_12 including extension.
• ORA_SCORM_2004 Valid Extensions:
• ORA_HACP • Online Content: .zip
• ORA_CONTENT_VIDEO • Video: .mov
• ORA_PDF • PDF: .pdf

8 W HITE PAPER / Using REST API for Loading Rich Media Content
URL String Only if tracking type value is
ORA_AUTO (Web link)

Status String Only if tracking type value is: Valid Values:


• ORA_PDF • ORA_CONT_ACTIVE
• ORA_AUTO (Web link) • ORA_CONT_INACTIVE

Description String No 4000 characters maximum.

Start Date Date No YYYY-MM-DD format.

End Date Date No YYYY-MM-DD format.

UPDATE PAYLOAD ATTRIBUTES SUMMARY


The following table outlines the mandatory and optional input payload attributes for the learning
content service when updating an existing content item. Unless otherwise indicated, the attributes
apply to all content types.

Table 2. OPTIONAL INPUT PAYLOAD ATTRIBUTES

NAME TYPE MANDATORY ADDITIONAL DETAILS

Title String No 250 characters maximum.

Status String No Valid Values:


• ORA_CONT_ACTIVE
• ORA_CONT_INACTIVE

URL String No. Only if tracking type value is 2000 character maximum, fully
ORA_AUTO (Web link) qualified URL.

Description String No 4000 characters maximum.

Start Date Date No YYYY-MM-DD format.

End Date Date No YYYY-MM-DD format.

IngestionStatus String No. Only if tracking type value Valid Value:


is: ORA_MED_TRANSCODING
• ORA_SCORM_12
• ORA_SCORM_2004
• ORA_HACP
• ORA_CONTENT_VIDEO

EFFECTIVE DATING CONSIDERATIONS


It is important to think through what effective dates to use when making a POST call. Effective Start
and Effective End dates can have large effects on the way the product features work in Oracle
Learning Cloud.

9 W HITE PAPER / Using REST API for Loading Rich Media Content
For example, if during an implementation a self-paced activity is loaded with HDL with an Effective
Start Date of Start of Time and an End Date of January 1st 2019, and then the rich media content is
loaded with an Effective Start Date and Effective End Date that falls outside of the effective dating of
the self-paced activity. Let’s say the rich media content Effective Start Date is July 1st, 2019, and has
an Effective End date of End of Time. There is a gap of 6 months between the self-paced activity
Effective Dates and the rich media content item Effective Dates. If users view this in Oracle Learning
Cloud prior to July 1st, 2019, the offering will display to them, but the rich media content will not show
to them due to the rich media content and offering dates not overlapping.

Note: Setting the Effective Start Date and Effective End Date is optional. If no value is assigned,
during the REST services rich media content load, the Effective Start Date will default the Effective
Start Date to the date of the rich media content load, and the Effective End Date will default to the
end of time.

Adding Effective Start and Effective End Dates can only be done in the initial POST of rich media
content. Effective Start and Effective End Dates can’t be updated via a PUT. Updating Effective Start
and Effective End Dates via REST or HDL is not allowed due to the data corruption that this could
cause in the system if you do not handle these updates correctly.

When loading in rich media content items, the best practice to use is to set the Effective Start Date to
the “start of time” and the Effective End Date to the “end of time”. The Effective Start of time is =
01/01/1900 and the Effective End of time is 12/31/4712.

For more information on managing date effective objects, refer to the document on docs.oracle.com
called “REST API for Oracle HCM Cloud” for more details.

AKAMAI NETSTORAGE HTTP API


As explained in the white paper “Oracle Learning Cloud - Rich Media Platform Sub-Processor Usage”,
the eLearning content in Oracle Learning Cloud that backs self-paced online offering activities
(SCORM, AICC, Video and PDF content types) is managed by Akamai services enabled for Oracle
Learning Cloud. Programmatically loading these rich media content items involves interacting with
both Oracle Learning Cloud and Akamai.

OBTAINING HOSTNAME INFORMATION


Additionally, uploading the files to Akamai requires the Akamai service’s hostname, which differs from
the Oracle Learning Cloud hostname. You can obtain this information through Topology Manager,
which is accessible via Setup and Maintenance.

10 W HITE PAPER / Using REST API for Loading Rich Media Content
Figure. Setup and Maintenance

In the Topology Manager, download the domain connections XML file.

Figure 2. Review Topology

The XML file contains several connection details. The one of interest is the following:

<StringRefAddr addrType="ORA_VIDSTORAGESERVICEAPPExternalHost">

<Contents>XXXX.akamaihd.net/YYYY/src</Contents>

Where XXXX and YYYY are unique per provisioned Learning Cloud pod. This hostname is referred to
as AKAMAI_HOST herein. In this example, AKAMAI_HOST=”XXXX.akamaihd.net/YYYY”

Process Overview for Loading Rich Media Content


The following are the steps required to load the learning rich media content used in self-paced online
offering activities.

11 W HITE PAPER / Using REST API for Loading Rich Media Content
1. Create a new Oracle Learning Cloud Content ID for the rich media content item you are creating.
Use a POST request to the Learning Rich media content Items REST endpoint, the system will
generate a new placeholder learning content item and return header information that you will use in
Step 2 through Step 4. Step 1 can be done independently from steps 2 thru 4 below.

2. Get the Akamai token required to upload the files to Akamai. You can obtain the Akamai token and
UUID from the successful output of Step 1.

3. Upload the files to Akamai. Using a PUT request to the Akamai upload URL with the Oracle
Learning Cloud headers from Step 1, and the Akamai token from Step 2. Step 2 and 3 must be
done together. There is a 30-second Akamai timeout on the token that must be used in step 3, so it
is important to do these two steps together.

4. Update Oracle Learning Cloud to finalize the transaction. When Step 3 completes successfully, use
a PUT request to the Learning Content Items REST service to update Oracle Learning Cloud, and
close out the rich media content upload sequence. Step 4 can be done independently from steps 1
thru 3 above, but is uses information out of Step 1 above. Once this is complete, validate the post
processing by previewing the content in Oracle Learning Cloud.

USAGE LIMITS ON REST SERVICES


There are no usage limits on REST services. However, there is a known limitation when loading in
rich media content to Oracle Learning Cloud. The ESS job that runs the ingestion process has trouble
initializing with high frequency loads. To avoid this issue, the best practice is to add a 30 second time
delay before running the ingestion process.

Process Overview for Correcting Rich Media Content


Rich media content uploaded to Oracle Learning Cloud, either via REST services or via the
administration interface can be replaced by updating the binary rich media content using the upload to
Akamai steps described in the above steps. However, there are restrictions based on the rich media
type.

SCORM and AICC Files


You can correct SCORM and AICC content by uploading new zip files to Akamai using an existing
unique identifier (UUID). However, only replacement of the rich media content within the zip file is
supported. Changes to the SCORM manifest file Items metadata, and/or changes to the bookmarking
logic of the rich media content is strictly not allowed, and if changed, could lead to an unknown user
experience when learners resume the rich media content.

Videos
You can’t update video files by uploading a new video source file for an existing unique identifier.
Using this technique to upload revised source video files will result in the rich media content no longer
being usable. This affects any course offerings referencing the rich media content item, and
consequently all assignments associated with the offering.

PDF Files
You can update PDF files by uploading a new PDF file using the existing unique identifier. However,
using this technique to upload non-PDF file types will result in the rich media content no longer being
usable. This affects any offerings using it, and consequently all assignments associated with the
offering.

12 W HITE PAPER / Using REST API for Loading Rich Media Content
Understanding Akamai Token Expiration

AKAMAI TOKEN EXPIRATION

The token obtained by the GET request to Oracle Learning Cloud in Step 2 expires within 30 seconds
of generation. Therefore, the POST request to Akamai in Step 3 must begin before the token expires,
or it will fail. If this happens, to reattempt the upload step, you must first obtain a new Akamai token
using the GET request to Oracle Learning Cloud.

UNDERSTANDING POST PROCESSING

Oracle Learning Cloud asynchronously parses SCORM and AICC zip files uploaded to Akamai to
determine the list of playable objects. Only when that process is complete is the rich media content
item set to Active status in Oracle Learning Cloud. They can then be previewed by the Administrator
and then be attempted by Learners.

Video files uploaded to Akamai are asynchronously transcoded by the Learning Cloud service before
they are available for playback delivery. When transcoding is completed, the video is set to Active
status in Oracle Learning Cloud. They can then be previewed by the Administrator and then be
attempted by Learners.

PDF files uploaded to Akamai require no asynchronous processing, and are immediately set to Active
in Oracle Learning Cloud.

VERIFYING INGESTED RICH MEDIA IN ORACLE LEARNING CLOUD

In addition to verifying the ingested rich media by relying on the REST service call return codes, you
can also verify the media is successfully ingested and functional in Oracle Learning Cloud in a number
of ways.

From the administration work area in Oracle Learning Cloud, you can preview the rich media once it
becomes active from the Catalog Resources work area. Additionally, once active, you can publish
course offerings using the rich media item, which can then be consumed in the employee Self-Service
work area.

PROGRAMMATICALLY MANAGING WEBLINK IN ORACLE LEARNING CLOUD

In addition to SCORM, AICC, video, and PDF learning rich media content, Oracle Learning Cloud
supports self-paced online activities backed by weblink references that do not require the enabling of
the Oracle Learning Cloud Rich Media service. Programmatically loading these content items into
Oracle Learning Cloud only involves REST calls to Oracle Learning Cloud services.

Process Overview
A single step is required to load weblink learning content items that can be used in offering self-paced
activities. Using a POST request to the Learning Content Items REST endpoint, the system generates
a new Weblink learning content item and return the content ID.

STRATEGIES FOR MANAGING LEARNING RICH MEDIA CONTENT ITEMS


PROGRAMMATICALLY
As part of planning out your implementation project, you should contemplate how you are going to
manage rich media content items in the system. Managing the rich media content in the system could
be a one-time conversion of the data from a legacy system, or the ongoing maintenance of rich media
content in the system. There are several ways to manage rich media content in the system. You can
manage rich media content in the system manually via the Learning Cloud user interface, or

13 W HITE PAPER / Using REST API for Loading Rich Media Content
programmatically by using REST services. These are two primary use cases in which you would
want to load items programmatically:

1. Bulk Loading of Learning Rich Media Content Items – Programmatically loading in rich media
content and learning item metadata in parallel to optimize the project schedule for a customer. In
this approach, the rich media content may be partially loaded while other learning item metadata
is being loaded in parallel.

2. Ad Hoc Loading of Learning Rich Media Content Items – Programmatically loading rich media
content items where all steps are followed back to back before the next rich media content item is
loaded. An example of this might be where administrators are creating and managing their content
in a content management system, and want to publish individual content items one at a time when
they are ready for publication.

LEARNING INFORMATION ARCHITECTURE DEPENDENCIES

How HDL Managed Objects are Dependent on the REST Content Managed Objects
There can be dependencies between learning objects when an object is being created. You need to
make sure that objects that have associations to other objects exist before the object is loaded. For
example, you would not be able to load in a Learning Record (assignment) without a Learner Person
already existing, a learning item, and the person that is performing the assignment. It is important to
understand the processing order to ensure that a child object does not fail because there is missing
parent data.

Rich media content that is loaded into the system has an Oracle Learning Cloud object that is
dependent on it. When looking at a course, there are offerings associated to courses, self-paced
activities associated to offerings and the rich media content (SCORM, video, PDF) is associated to the
self-paced activity. Therefore, when loading in a self-paced activity there should be a rich media
content item already loaded, so the self-Paced activity can be associated to this rich media content.
This rich media content item does not need to have all of the files loaded on the Akamai pod for this
association to occur.

BULK LOADING OF LEARNING RICH MEDIA CONTENT ITEMS


Bulk loading of rich media content items is done to programmatically load in rich media content and
learning item metadata in parallel to optimize the project schedule for a customer. In this approach,
the rich media content may be partially loaded while other learning item metadata is loaded in parallel.

Bulk Loading Advantages


Bulk loading rich media content programmatically has several advantages from a project planning
perspective:

1. Unblocks Self-Paced Activity Creation - Once step 1 of the REST rich media content loading is
completed via a POST, the Oracle Learning Cloud Content Item number is returned in the
response data. This number can then be used to associate the self-paced activity when loading
this self-paced activity in via HDL, or when creating this self-paced activity via the Oracle Learning
Cloud user interface.

14 W HITE PAPER / Using REST API for Loading Rich Media Content
2. Divide and Conquer Approach. Uploading big files to Akamai – Loading the rich media bits to
Akamai can take a large amount of the data loading timeline. Therefore, to optimize the schedule, it
is more efficient to break out this step from the creation of Oracle Learning Cloud rich media content
items. Loading rich media bits to Akamai can be run across several worker programs using a few
client machines with access to high bandwidth (for upload) internet connections to help shorten
overall the loading process.

3. Control when post processing occurs and impact post-processing has on other processes across
HCM Cloud

• For SCORM and AICC the post processing that occurs automatically after this PUT is done with
an ESS job called: “Upload SCORM Package”. It is important to understand that for every PUT
that is done there will be a corresponding thread for this job on the ESS server. This could put a
load on the ESS server, because the ESS job can be run in parallel thus taking multiple threads at
a single point in time. You want to plan accordingly, so that you don’t have a case where this job
consumes all of the ESS server threads and other important ESS jobs are impacted negatively.

• For videos, the post processing that occurs automatically after this PUT transcoding is done by
Oracle Learning Cloud, not an ESS job, so Learning Cloud sends a request to Akamai to
transcode the video. Oracle Learning Cloud has a timer that is run internally, continuously
checking on the status from Akamai. The time to process the video depends on many things,
including how busy Akamai is and how big the file is, in bytes, and the resolution of the video. A
1:1 ratio between video playing time and video transcoding time is the estimated timeframe for
processing.

In Release 19C, this approach changed, and video is now processed using an ESS job called “Video
Transcoding and Processing”. The ESS job is required to run to Transcode Video content before it is
available to be viewed or used in Oracle Learning Cloud. Plan accordingly, so you don’t have a case
where this job consumes all of the ESS server threads and other important ESS jobs are affected.

PROCESS OVERVIEW
This is a “divide and conquer” proposal for loading Oracle Learning Cloud rich media content items
and Oracle Learning Cloud catalog items. Each of the steps below can be run independently of one
another. However, step 1 must be run before steps 2, 3, and 4 can be processed.

1. Create Oracle Learning Cloud content items for each rich media item (SCORM, AICC, pdf,
weblink, and video) you want to load into OLC.

This task involves executing a POST against the OLC REST resource.

• This inserts the appropriate metadata for each desired OLC Content Item into Oracle Learning
Cloud.

• This step is a prerequisite for step 2 through step 4, but can be done in bulk, independently from
step 2, step 3, and step 4.

• This returns the UUID, Location and OLC Content Item # so you can execute step 2 through step 4
below. It is important to note that the program that is used needs to store some of the response
data so that it can be used in the subsequent steps.

• -Each POST should complete in a second or so. This means that creating the metadata for 1,000 or
so new Oracle Learning Cloud rich media content items should complete in an hour or so.

15 W HITE PAPER / Using REST API for Loading Rich Media Content
2. Load desired OLC Course Catalog hierarchy of items (for each desired OLC Content Item) using the
OLC Course HDL hierarchy object.


• This step has step 1 as a prerequisite.

• HDL will be used to load in the Course, Offering, and Activity hierarchy in the system. The Self-
Paced activity object is where you will need to associate the OLC Content Item # with the specific
Self-Paced activity. Video will use the learning item ID, and the other OLC content items will use the
OLC Content Item #.

• This should complete in the order of hours for 1,000 or so new OLC Course/Offering/Activities with
complex dependency hierarchies, but may require experimenting with the HDL load and import
concurrent thread parameters to get the most efficient load times.

3. Load the rich media bits of an OLC Content Item to the OLC Akamai POD.

This task involves first executing a GET against the OLC REST for an item loaded in step 1. The
purpose of the GET is to obtain an Akamai access token that will enable you to upload the rich media
bits to Akamai. After the GET operation, immediately send the bits via PUT to the OLC Akamai POD
REST resource. There is a 30 second Akamai timeout on the token so it is important to do the GET
and PUT immediately after one another.

• This step has step 1 as a prerequisite.

• This load can be run across several worker programs using a few client machines with access to
high bandwidth (for upload) internet connections.

• Turnaround time of this step will be driven by the total number of bytes of all rich media items that
must be uploaded to Akamai versus the number of concurrent upload processes / machines.

4. Update Oracle Learning Cloud to finalize the transaction.

Once the rich media file successfully uploads to the Oracle Learning Cloud Akamai POD, execute a
PUT against the OLC REST in order to tell Learning Cloud that the rich media file was successfully
uploaded to the Oracle Learning Cloud Akamai POD for the given <content ID>.

• This step has step 1 and step 3 as prerequisites.

• -SCORM, AICC, and Video rich media items do require successful post-processing by OLC in order
to be playable. This post-processing is automatically initiated after this final PUT operation.

• This step is required before the Preview function can be used in Learning Administration —>
Catalog Resources > Manage Content Items >Content Item Details > Preview

16 W HITE PAPER / Using REST API for Loading Rich Media Content
IMPLEMENTATION PROJECT PLAN EXAMPLE

AD HOC MANAGEMENT OF LEARNING RICH MEDIA CONTENT ITEMS


As an alternative to bulk loading, you can sequentially and programmatically load rich media content
items in whole, where all steps are followed in its entirety before the next rich media content item is
loaded. In this approach, a rich media content item is fully loaded to completion, then the next rich
media content item is loaded to completion, before other learning item metadata is loaded.

How-To Example: Programmatically Loading SCORM Content


This example uses a Linux/Unix command line tool for demonstration purpose, and applies to
supported SCORM and AICC online content formats.

Step 1: Create a new OLC Content ID for the learning content item to be created. The sample input file
below includes some optional attributes in addition to the mandatory attributes for creating a new
content item. For the complete list of attributes and their supported values, refer to the Input Payload
Attributes table at the end of this document.

Input Payload File: OnlineContentInputPayload.txt

"Title" : "SCORM 1.2 Content Uploaded with REST Services",

"FileName" : "SCORM12Package.zip",

"Description" : "SCORM 1.2 Content Uploaded with REST Services",

"ItemNumber" : "REST-201801301350-SCORM",

"TrackingType" : "ORA_SCORM_12",

17 W HITE PAPER / Using REST API for Loading Rich Media Content
"StartDate" : "2018-01-30",

"EndDate" : "2018-06-30"

HTTP POST Command

curl -vs

-u '<username>:<password>'

-H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'

-d "@OnlineContentPayload.txt -H "Effective-Of: RangeStartDate=1900-01-01;RangeEndDate=4712-


12-31"https://<OLC_HOSTNAME>/hcmCoreApi/resources/latest/learningContentItems &>
OnlineContentDetails.out

Successful POST Response (partial output): OnlineContentDetails.out

Items in red are used in subsequent steps

{{

"ContentId" : 300100101142985,

"Title" : "SCORM 1.2 Content Uploaded with REST Services",

"FileName" : "SCORM12Package.zip",

"ItemNumber" : "REST-201710081350-SCORM",

"TrackingType" : "ORA_SCORM_12",

"Description" : "SCORM 1.2 Content Uploaded with REST Services",

"StartDate" : "2018-01-30",

"EndDate" : "2018-06-30",

"UUID" : "92cfc80e-953b-449c-90a6-18afa401628f",

"Status" : "ORA_CONT_INACTIVE",

"URL" : null,

"AuthToken" : "X-Akamai-ACS-Action:action=upload&version=1&index-zip=1||X-Akamai-ACS-Auth-
Data:5, 0.0.0.0, 0.0.0.0, 1507582333, 457024713, Oraclemedia||X-Akamai-ACS-Auth-
Sign:7cQB5HotJLxYBh6X4o0mO3Dma47UGZ1TPG9xLMWUiz0=",

"Location" : "scorm/FA.HCM.PER.HcmEngmtVideoShare-92cfc80e-953b-449c-90a6-
18afa401628f_private/92cfc80e-953b-449c-90a6-18afa401628f.zip",

"IngestionStatus" : "ORA_MED_NEW",

"Operation" : null,

18 W HITE PAPER / Using REST API for Loading Rich Media Content
"links" : [ {

"rel" : "self",

“href" : "https://<OLC_HOSTNAME>/hcmCoreApi/resources/11.12.1.0/
learningContentItems/300100101142985",

"name" : "learningContentItems",

"kind" : "item"

}, {

"rel" : "canonical",

"href" : "https:// <OLC_HOSTNAME>/hcmCoreApi/resources/11.12.1.0/


learningContentItems/300100101142985",

"name" : "learningContentItems",

"kind" : "item"

}]

Step2: Get the Akamai token required to upload the files to Akamai

From the above output, the following attributes are required as input for the next step:

» X-Akamai-ACS-Auth-Data:5, 0.0.0.0, 0.0.0.0, 1507582333, 457024713, Oraclemedia

» X-Akamai-ACS-Auth-Sign: 7cQB5HotJLxYBh6X4o0mO3Dma47UGZ1TPG9xLMWUiz0=

» "UUID" : "92cfc80e-953b-449c-90a6-18afa401628f"

» "Location" : "scorm/FA.HCM.PER.HcmEngmtVideoShare-92cfc80e-953b-449c-90a6-
18afa401628f_private/92cfc80e-953b-449c-90a6-18afa401628f.zip"

Step 3: Upload the files to Akamai with required metadata

HTTP PUT Command

Replace the information in red below with appropriate values.

curl -vs 'https://<AKAMAI_HOST>/<STEP_2_LOCATION>'

-H 'X-Akamai-ACS-Action:action=upload&version=1&index-zip=1'

-H 'X-Akamai-ACS-Auth-Data:<STEP_2_Auth_Data>'

-H 'X-Akamai-ACS-Auth-Sign:<STEP_2_Auth_Sign>'

-X PUT --upload-file <SCORM_zip_File> &> UploadOnlineContentFile.out

19 W HITE PAPER / Using REST API for Loading Rich Media Content
Successful Response (partial output): UploadOnlineContentFile.out

A successful response is denoted by the HTTP 200 OK line returned as follows:

* We are completely uploaded and fine

< HTTP/1.1 200 OK

Step 4: Update OLC to finalize the transaction

Input Payload File: OnlineContentPayloadForUpdate.txt

"IngestionStatus" : "ORA_MED_TRANSCODING"

HTTP PUT Command

Replace the information in red below with appropriate values

curl -vs

-u '<username>:<password>'

-H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'

-d "@OnlineContentPayloadForUpdate.txt"

-X PUT
https://<HOSTNAME>/hcmCoreApi/resources/latest/learningContentItems/<CONTENT_ID_FROM_ST
EP_1> &> UpdateOnlineContentFile.out

Successful PUT Response (partial output): UploadOnlineContentFile.out

A successful response is denoted by the HTTP 200 OK line returned as follows:

* upload completely sent off: 45 out of 45 bytes

< HTTP/1.1 200 OK

How-To Example: Programmatically Loading Video Content


This example applies to all supported video file formats.

Step 1: Create a new OLC Content ID for the learning content item to be created

20 W HITE PAPER / Using REST API for Loading Rich Media Content
The sample input file below includes some optional attributes in addition to the mandatory ones for
creating a new content item. For the complete list of attributes and their supported values, refer to the
Input Payload Attributes table at the end of this document.

Input Payload File: VideoContentPayload.txt

"Title" : "Video Uploaded with REST Services",

"FileName" : "video.mov",

"Description" : "Video Content Uploaded with REST Services",

"ItemNumber" : "REST-201801301350-VIDEO",

"TrackingType" : "ORA_CONTENT_VIDEO",

"StartDate" : "2018-01-30",

"EndDate" : "2018-06-14"

HTTP POST

curl -vs

-u '<username>:<password>'

-H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'

-d "@VideoContentPayload.txt"-H "Effective-Of: RangeStartDate=1900-01-01;RangeEndDate=4712-


12-31"https://<OLC_HOSTNAME>/hcmCoreApi/resources/latest/learningContentItems &>
NewVideoContentDetails.out

Successful Response: OnlineContentDetails.out

"ContentId" : 300100101257750,

"Title" : "Video Uploaded with REST Services",

"FileName" : "video_4_secs.mov",

"ItemNumber" : "REST-201710091906",

"TrackingType" : "ORA_CONTENT_VIDEO",

"Description" : "Video Content Uploaded with REST Services",

"StartDate" : "2018-01-30",

"EndDate" : "2018-06-14",

21 W HITE PAPER / Using REST API for Loading Rich Media Content
"UUID" : "e778388a-15f8-4261-9338-d3b702aa8323",

"Status" : "ORA_CONT_INACTIVE",

"URL" : null,

"AuthToken" : "X-Akamai-ACS-Action:action=upload&version=1||X-Akamai-ACS-Auth-Data:5,
0.0.0.0, 0.0.0.0, 1507601292, 604982616, Oraclemedia||X-Akamai-ACS-Auth-
Sign:ktzX85LZYJvFYJbJ6pnSOoY8xBr9EynBw0B8hFg1+aE=",

"Location" : "src/FA.HCM.PER.HcmEngmtVideoShare-e778388a-15f8-4261-9338-
d3b702aa8323_private/e778388a-15f8-4261-9338-d3b702aa8323.mov",

"IngestionStatus" : "ORA_MED_NEW",

"Operation" : null,

"links" : [ {

"rel" : "self",

"href" : "https://fuscdrmovm179-hcm-
ext.us.oracle.com:443/hcmCoreApi/resources/11.12.1.0/learningContentItems/300100101257750",

"name" : "learningContentItems",

"kind" : "item"

}, {

"rel" : "canonical",

"href" : "https://fuscdrmovm179-hcm-
ext.us.oracle.com:443/hcmCoreApi/resources/11.12.1.0/learningContentItems/300100101257750",

"name" : "learningContentItems",

"kind" : "item"

}]

Step 2: Get the Akamai token required to upload the files to Akamai

From the above output, the attributes in red are required as input for the next step

• X-Akamai-ACS-Auth-Data: 5, 0.0.0.0, 0.0.0.0, 1507601292, 604982616, Oraclemedia

• X-Akamai-ACS-Auth-Sign: ktzX85LZYJvFYJbJ6pnSOoY8xBr9EynBw0B8hFg1+aE=

• "UUID" : "92cfc80e-953b-449c-90a6-18afa401628f"

• "Location" : "scorm/FA.HCM.PER.HcmEngmtVideoShare-92cfc80e-953b-449c-90a6-
18afa401628f_private/92cfc80e-953b-449c-90a6-18afa401628f.zip"

22 W HITE PAPER / Using REST API for Loading Rich Media Content
Step 3: Upload the files to Akamai with required metadata

HTTP PUT

curl -vs ' https://<AKAMAI_HOST>/<STEP_2_LOCATION>'

-H 'X-Akamai-ACS-Action:action=upload&version=1'

-H 'X-Akamai-ACS-Auth-Data:<STEP_2_Auth_Data>'

-H 'X-Akamai-ACS-Auth-Sign:<STEP_2_Auth_Sign>'

-X PUT --upload-file <Video_File> &> UploadVideoContentFile.out

Step 4: Update OLC to finalize the transaction

Input Payload File: VideoContentPayloadForUpdate.txt

"IngestionStatus" : "ORA_MED_TRANSCODING"

HTTP PUT

curl -vs

-u '<username>:<password>'

-H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'

-d "@VideoContentPayloadForUpdate.txt"

-X PUT
https://<HOSTNAME>/hcmCoreApi/resources/latest/learningContentItems/<CONTENT_ID_FROM_ST
EP_1> &> UpdateVideoContentFile.out

Successful Response (partial output): UpdateVideoContentFile.out

A successful response is denoted by the HTTP 200 OK line returned as follows:

* upload completely sent off: 45 out of 45 bytes

< HTTP/1.1 200 OK

How-To Example: Programmatically Loading PDF Content


Step 1: Create a new OLC Content ID for the learning content item you are creating.

23 W HITE PAPER / Using REST API for Loading Rich Media Content
The sample input file below includes some optional attributes in addition to the mandatory ones for
creating a new content item. For the complete list of attributes and their supported values, refer to the
Input Payload Attributes table at the end of this document.

Input Payload File: PDFContentPayload.txt

"Title" : "PDF Uploaded with REST Services",

"FileName" : "REST.pdf",

"Description" : " PDF Uploaded with REST Services ",

"ItemNumber" : "REST-201710091949-PDF",

"TrackingType" : "ORA_PDF",

"Status" : "ORA_CONT_ACTIVE",

"StartDate" : "2017-06-15",

"EndDate" : "2018-06-14"

HTTP POST

curl -vs

-u '<username>:<password>'

-H 'Content-Type: application/vnd.oracle.adf.resourceitem+json'

-d "@PDFContentPayload.txt"-H "Effective-Of: RangeStartDate=1900-01-01;RangeEndDate=4712-12-


31”https://<OLC_HOSTNAME>/hcmCoreApi/resources/latest/learningContentItems &>
NewPDFContentDetails.out

Successful Response: OnlineContentDetails.out

"ContentId" : 300100101257756,

"Title" : "PDF Uploaded with REST Services",

"FileName" : "TLearn.pdf",

"ItemNumber" : "REST-201710091949-PDF",

"TrackingType" : "ORA_PDF",

"Description" : "PDF Uploaded with REST Services",

"StartDate" : "2017-06-15",

24 W HITE PAPER / Using REST API for Loading Rich Media Content
"EndDate" : "2018-06-14",

"UUID" : "60c5e47d-bc50-44c0-b6ed-736508eb73e8",

"Status" : "ORA_CONT_ACTIVE",

"URL" : null,

"AuthToken" : "X-Akamai-ACS-Action:action=upload&version=1||X-Akamai-ACS-Auth-Data:5,
0.0.0.0, 0.0.0.0, 1507604022, 2097491649, Oraclemedia||X-Akamai-ACS-Auth-Sign:
6szYsIlcztab31lygNDWghM4pj/IVqBEG7JqTxaYQmg=",

"Location" : "scorm/FA.HCM.PER.HcmEngmtVideoShare-60c5e47d-bc50-44c0-b6ed-
736508eb73e8_private/60c5e47d-bc50-44c0-b6ed-736508eb73e8.pdf",

"IngestionStatus" : null,

"Operation" : null,

"links" : [ {

"rel" : "self",

"href" : "https://fuscdrmovm179-hcm-
ext.us.oracle.com:443/hcmCoreApi/resources/11.12.1.0/learningContentItems/300100101257756",

"name" : "learningContentItems",

"kind" : "item"

}, {

"rel" : "canonical",

"href" : "https://fuscdrmovm179-hcm-
ext.us.oracle.com:443/hcmCoreApi/resources/11.12.1.0/learningContentItems/300100101257756",

"name" : "learningContentItems",

"kind" : "item"

}]

Step 2: Get the Akamai token required to upload the files to Akamai

From the above output, the attributes in red are required as input for the next step

• X-Akamai-ACS-Auth-Data: 5, 0.0.0.0, 0.0.0.0, 1507604022, 2097491649, Oraclemedia

• X-Akamai-ACS-Auth-Sign: 6szYsIlcztab31lygNDWghM4pj/IVqBEG7JqTxaYQmg=

• "UUID" : "60c5e47d-bc50-44c0-b6ed-736508eb73e8

• "Location" : "scorm/FA.HCM.PER.HcmEngmtVideoShare-60c5e47d-bc50-44c0-b6ed-
736508eb73e8_private/60c5e47d-bc50-44c0-b6ed-736508eb73e8.pdf"

Step 3: Upload the files to Akamai with required metadata

25 W HITE PAPER / Using REST API for Loading Rich Media Content
HTTP PUT

curl -vs ' https://<AKAMAI_HOST>/<STEP_2_LOCATION>'

-H 'X-Akamai-ACS-Action:action=upload&version=1'

-H 'X-Akamai-ACS-Auth-Data:<STEP_2_Auth_Data>'

-H 'X-Akamai-ACS-Auth-Sign:<STEP_2_Auth_Sign>'

-X PUT --upload-file <PDF_File> &> UploadPDFContentFile.out

Step 4: Update OLC to finalize the transaction

For PDF content items, this step is not required.

How-To Example: Programmatically Loading Web link Content


Create a new OLC Content ID for the learning content item you want to add. The sample input file
below includes some optional attributes in addition to the mandatory ones for creating a new content
item. For the complete list of attributes and their supported values, refer to the Input Payload
Attributes table at the end of this document.

Input Payload File: WebLinkContentPayload.txt

"Title" : "Web Link Uploaded with REST Services",

"Description" : " Web Link Uploaded with REST Services",

"ItemNumber" : "REST-201710092052-WebLink",

"TrackingType" : "ORA_AUTO",

"URL" : "http://www.oracle.com",

"Status" : "ORA_CONT_ACTIVE",

"StartDate" : "2017-06-15",

"EndDate" : "2018-06-14"

REST TOOLKIT
There is an easy-to-use toolkit on My Oracle Support(MOS) to help you use the REST service. Use
the toolkit in conjunction with this white paper. Refer to the MOS document called “Oracle Fusion
Learning Cloud: Programmatic Loading of Rich Media Content Using Learning Content REST Service
(Doc ID 2374277.1) to access the toolkit.

You will see that the steps to load in rich media via the REST API service correlates to the three toolkit
files:

1. Create a new OLC Content ID for the learning item you are creating using a POST. Use the olc-
create.html toolkit page for this step.

26 W HITE PAPER / Using REST API for Loading Rich Media Content
2. Get the Akamai token required to upload the files to Akamai. Use the olc-get.html toolkit page for
this step.

3. Upload the files to Akamai with a PUT command and Update OLC to finalize the transaction. Use
the olc-update page for this step.

TROUBLESHOOTING
The following sections describe how to troubleshoot the steps described in this document.

Learning Content Service Error Code 400 Bad Request


This error code indicates an issue with the input payload due to incorrect syntax or incorrect format.

Learning Content Service Error Code 401 Unauthorized Response


This error code is returned by the Learning Content REST service when authentication is not
successful. Verify the username and password, or the JWT token provided. Note that username and
password is for a user account managed in Oracle Applications Cloud. You cannot authenticate using
credentials for a user account managed in your external identity provider.

Learning Content Service Error Code 500 Internal Server Error Response
This error code is returned when there is an issue contacting the REST service. This could be due to
an incorrect URL, or the service is down.

Connection Issues during Upload to Akamai


While performing the upload to the Akamai service, if there is a connection issue, the upload must be
restarted to complete the upload. There is no support for partial upload and resume.

27 W HITE PAPER / Using REST API for Loading Rich Media Content
ORACLE CORPORATION

Worldwide Headquarters
500 Oracle Parkway, Redwood Shores, CA 94065 USA

Worldwide Inquiries
TELE + 1.650.506.7000 + 1.800.ORACLE1
FAX + 1.650.506.7200
oracle.com

CONNECT W ITH US
Call +1.800.ORACLE1 or visit oracle.com. Outside North America, find your local office at oracle.com/contact.

blogs.oracle.com/oracle facebook.com/oracle twitter.com/oracle

Copyright © 2019, 2020, Oracle and/or its affiliates. This document is provided for information purposes only, and the contents hereof are subject to
change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or
implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with
respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced
or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or
registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks
of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0320
White Paper Using REST API for Loading Rich Media Content
March 2020March 2020
Author: Oracle Learning Cloud Product Management
Contributing Authors:

You might also like