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 parameters five are required and others are optional to fill in when creating a 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 - the unique ID of the catalog where this new course will appear. 
  • UICulture - site language, which should be added from the list of the SharePoint supported languages. Use the locale ID from the LCID column of the SharePoint table with the supported languages, for example en-us for English (United States). Creation will fail in case other format of locales is 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 training type won't be set and it can't be configured later. To create an e-Learning course select 1, for an Instructor-Led Training course use 3, and select 4 for a Training Plan.

NOTE   

For a course of the Instructor-Led Training type you also need to add the "CourseSessionEnrollmentType" parameter to configure the enrollment type:

  • replace number with 1 for the Single group or standalone session enrollment type,
  • replace number with 2 for the Multiple groups or standalone sessions enrollment type,
  • replace number with 3 for the All groups and standalone sessions enrollment type.

TIP   

  • Instructor-Led Training is 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
}

  • TeacherLogins - specify the usernames you want to assign as course admins.
  • TrainerLogins - specify the users from the TeacherLogins field who you want to display as contacts on the training home page. If you add a user here who isn't also included in the TeacherLogins field, they won't be displayed as a contact on the training home page.
  • VisitorLogins - if the Training Audience Targeting option is enabled, specify the users who will be the target audience. If the Training Audience Targeting option is disabled, no users will be set as the target audience.

 

Examples of requests to create a course 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 course

{
"CourseCatalogId": "d4d0b82f-e67f-46d7-a142-fc347a520973",
"UICulture": "fr-fr",
"Title": "Analyse commerciale, partie 4",
"Description": "Le cours s'adresse aux analystes commerciaux experts.",
"CourseType": "3",
"CourseSessionEnrollmentType": "3",
"PublishingSettings": {"IsEnabled": true}
}

 

Creating a training plan

{
"CourseCatalogId": "d4d0b82f-e67f-46d7-a142-fc347a520973",
"UICulture": "de-de",
"Title": "Geschäftsanalyse",
"Description": "Der Ausbildungsplan ist auf erfahrene Business Analysten ausgerichtet.",
"CourseType": "4",
"PublishingSettings": {"IsEnabled": true}
}

 

4. When ready, select Execute 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. You can use the Download option to save the results to your computer in JSON format.
  • In the Response body field, you will see a newly created course with the set parameters. The course is displayed on the Training Management page of the LMS365 Admin Center where you can view and manage its settings.

    NOTE   

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

 

Was this article helpful?
2 out of 3 found this helpful

Comments

Article is closed for comments.