Create courses via API

Some users prefer using LMS365 API to create courses and this article provides guidelines on the steps to do this.

 

To create a new course via the help of LMS365 API do the following:

1. Navigate to https:/api.365.systems/ and authorize with the relevant API key. You can find more about the authorization process here.

 

2. In the list of LMS365 Cloud API sections find the Courses section, expand it, and find the POST method /odata/v2/Courses with the Creates new Course description

 

 

3. Select Try it out in the top right corner. In the Edit Value field you can see what parameters can be used for a course creation. 

 

 

Among the parameter five are required and others are optional to fill in when creating a new course via API. Optional parameters can be added after the course creation via course editing in the LMS365 Admin Center.

The default data for the values can be of the following types:

  • guid - unique id.
  • string - any finite sequence of characters (letters, numerals, symbols, punctuation marks, etc.).
  • integer - whole number.
  • boolean - true or false variable.

The required parameters are:

  • CourseCatalogId - unique ID of the course catalog where this new course will appear. Please find full instructions on how to get the course catalog ID here.
  • UICulture - site language, which should be added from the list of the SharePoint supported languages.

NOTE   

Locale ID should be used, for example en-us for English (United States). The list of languages supported by SharePoint can be found here. Creation will fail in case other locales are used.

  • Title - give your course a title.
  • Description - provide a short description for your course.
  • CourseType - select the relevant training type. If this parameter isn't configured or is set as 0, the type of the training will not be set and will be impossible to configure later. To create an e-Learning course select 1, for an Instructor-Led Training select 3, and select 4 for a Training Plan.

NOTE   

For the Instructor-Led Training you will also need need to add the parameter  "CourseSessionEnrollmentType": "number" to configure the enrollment type:

  • replace number with 1 for the Enroll user into single course sessions enrollment type,
  • with 2 for the Enroll user into all course sessions enrollment type,
  • or with 3 for the Enroll user into multiple course sessions enrollment type.

TIP   

  • Instructor-Led Training will be marked as 'Classroom' in the response.
  • You can publish your course right away while creating via API by adding the following parameter:

"PublishingSettings": {
"IsEnabled": true
}

 

Examples of an API request to create a training with required parameters and publishing status set:

 

Creating an e-Learning course

{
"CourseCatalogId": "d4d0b82f-e67f-46d7-a142-fc347a520973",
"UICulture": "en-us",
"Title": "Business Analysis, part 2",
"Description": "The course is oriented towards expert business analysts.",
"CourseType": "1",
"PublishingSettings": {"IsEnabled": true}
}

 

Creating an Instructor-Led Training course

{
"CourseCatalogId": "d4d0b82f-e67f-46d7-a142-fc347a520973",
"UICulture": "en-us",
"Title": "Business Analysis, part 4",
"Description": "The course is oriented towards expert business analysts.",
"CourseType": "3",
"CourseSessionEnrollmentType": "1",
"PublishingSettings": {"IsEnabled": true}
}

 

Creating a Training Plan

{
"CourseCatalogId": "d4d0b82f-e67f-46d7-a142-fc347a520973",
"UICulture": "en-us",
"Title": "Business Analysis, part 3",
"Description": "The training plan is oriented towards expert business analysts.",
"CourseType": "4",
"PublishingSettings": {"IsEnabled": true}
}

 

4. When ready, select the Execute button to run the request and create a training.

 

 

5. Go to the Responses block to check the results:

  • Number 2xx (for example, 202) under Code shows that the request worked correctly.
  • In the Response body field you will see a newly created course with the set parameters. The course will be displayed in the Training Management section of the LMS365 Admin Center where you can go on and manage its settings.
  • You can use the Download button to save the results to your computer in .JSON format.

 

NOTE   

We recommend you wait a while before adding learning items and configuring the settings of a newly created training to let the training provisioning succeed. You can use LMS365 API to check the creation status of a training.

 

Was this article helpful?
0 out of 1 found this helpful

Comments

Article is closed for comments.