Import YouTube Video
Many people develop content using videos. It is much simpler than creating a SCORM package, and the video format is tried and true. Once you have finished recording your content and wish to get it in front of learners, you can import it into SCORM Cloud using Reference Imports.
How Do I Make a Reference Import Request?
When making a reference import request, the only bit of information you’ll need prior to making the request is the link to the publicly accessible YouTube video.
The API method to use when making reference imports requests is CreateNoUploadAndImportCourseJob.
There are multiple kinds of requests that can be made using this method, but for the purposes of this guide we will be
using the mediaFileReferenceRequest
sub-schema.
Note: The
CreateNoUploadAndImportCourseJob
has several sub-schemas available for different types of imports. It can be overwhelming, but all you need to know is that this method is useful for when you don’t have access to the content directly (because it is hosted on a third party service like YouTube). Many types of content can be imported using this method either by downloading the content, pointing to the content, or linking to an external tool. For the purposes of importing a YouTube video, we will be pointing to the content, so all that is required is themediaFileReferenceRequest
schema. All the other schemas can be ignored and should be deleted when sending the request.
curl --location --request POST 'https://cloud.scorm.com/api/v2/courses/importJobs/noUpload?courseId=YoutubeImport' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic RTRDWE5SQkZFMDpTZWNyZXRLZXlBYUJiQ2NEZEVlRmZHZ0hoSWlKaktrTGxNbU5uT28=' \
--data-raw '{
"mediaFileReferenceRequest": {
"url": "https://www.youtube.com/watch?v=B-q6vTvTwI4",
"contentType": "youtube"
}
}'
When you make the above request you will receive an import job ID like with the other types of import requests.
{
"result": "E4CXNRBFE0YoutubeImport"
}
This import job ID can be passed along to GetImportJobStatus to view the status of the import request.
curl --location --request GET 'https://cloud.scorm.com/api/v2/courses/importJobs/E4CXNRBFE0YoutubeImport' \
--header 'Authorization: Basic RTRDWE5SQkZFMDpTZWNyZXRLZXlBYUJiQ2NEZEVlRmZHZ0hoSWlKaktrTGxNbU5uT28='
While the import is still in progress, you will see a status of RUNNING
, but once the import is complete, you should
see a result that looks like the following:
{
"jobId": "E4CXNRBFE0YoutubeImport",
"status": "COMPLETE",
"message": "Finished",
"importResult": {
...
}
}
Once the import has finished, you have successfully imported the YouTube video to SCORM Cloud. You can now send this video course out to your learners like you would any other course in SCORM Cloud.