API / Power Automate によるラーニングモジュールの作成

  • 更新

Learn365では、Learn365 管理センター、または Learn365 API 、Power Automate を通じて、ラーニング モジュールを作成することができます。

ここでは、API 、Power Automate を通じてラーニングモジュールを作成する方法を説明します。

API でラーニング モジュールを作成する

API を通じてラーニングモジュールを作成するには、関連するコースの ID が必要です。コース ID の取得については、こちらを参照してください。

Learn365 API を通じたラーニング モジュールの作成は、以下の手順に沿って行います。

1.https://api.365.systems/  にアクセスし、API キーで認証します。

2.LearningModules セクションに移動し、POST/odata/v2/LearningModules Creates Learning Module を選択し、右上の「Try it out」をクリックします。

create learning module API-1.png

 

3.パラメータを入力します。

learningModule :「Edit Value」フィールドで、以下を入力します。

  • "CourseId": "guid":「string」を関連するコースの ID に置き換えます。このパラメータは必須です。
  • "Title": "string":ラーニング モジュールのタイトル。「string」を任意のタイトルに置き換えます。このパラメータは必須です。
  • "Configuration"  : ラーニングモジュール内のコンテンツを情報を入力します。

リクエスト例:


 

{
"CourseId": "02dc8861-f6c9-43f6-9d91-81ffd86ba4ca",
"Title": "Feedback Form",
"Configuration": {
"Items": "[{\"Content\":\"https://forms.office.com/Pages/ResponsePage.aspx?id=zz3XjXy17EC3-HVbUS2feyYsdHxAdIVGrmb7s_E7v85UOE42NzdHOExJMTdBVU5VSzdZMVBBU0ZIRy4u\",\"EmbedType\":5,\"ItemType\":3,\"Id\":\"8e55e9d4-93a7-4359-8427-7bc236359d68\",\"Title\":\"Feedback Form\",\"IsAvailable\":null,\"IsDeleted\":null},{\"ConfirmationMessage\":\"Please confirm that you have participated in the session and completed the feedback form\\n\",\"CheckMarkMessage\":\"I confirm that I participated in the webinar and completed the feedback form\",\"Type\":0,\"ItemType\":4,\"Id\":\"e00ca8b3-f25e-4375-a3fb-737d2fbcde79\",\"Title\":\"Confirmation\",\"IsAvailable\":null,\"IsDeleted\":null}]"
}
}

 

create learning module API-2.png

 

4.「Execute」を選択してリクエストを実行します。

5.Responses ブロックで結果を確認します。

  • Code 2xx(202など)は、リクエストが正しく動作したことを示します。
  • エラーの場合、Response body には、問題を説明するコードとメッセージ キーを含むエラー オブジェクトが含まれます。

Power Automate でラーニング モジュールを作成する

Power Automate では、LMS365 コネクタに同じアクションを持つ「 HTTP リクエストの送信」と「HTTP リクエストの送信(プレビュー)」が表示されます。

これらの違いについては、こちらをご参照ください。

Power Automate で作成するには、以下のフローを作成し実行します。

1.新しい「インスタント クラウド フロー」の作成を開始します。

2.「HTTP リクエストの送信」を選択します。

3.フィールドに入力します。

Method* :POST 

Uri*:LearningModules 

Body:API の "Configuration" パラメータをご参照ください。

create learning module API-3.png

 

参考:Configuration 設定の値は次の通りです。

Learning Module Configuration
Configuration.Items property is JSON serialized array of LearningPathItem objects.

class LearningPathItem
{
Id: Guid;
Title: string;
ItemType: LearningPathItemType;
}

enum LearningPathItemType
{
None = 0,
Document = 1,
Scorm = 2,
Embed = 3,
Confirmation = 4,
Quiz = 5,
ExternalApp = 6
}

class Document : LearningPathItem
{
DocumentId: int;
FileId: Guid;
Url: string;
}

class Scorm : LearningPathItem
{
ScormId: Guid;
}

class Embed : LearningPathItem
{
Content: string;
EmbedType: EmbedType;
}

enum EmbedType
{
OfficeVideo = 0,
OfficeMix = 1,
YouTube = 2,
Other = 3,
Link = 4,
WebsiteUrl = 5,
RichContent = 6,
MSStream = 7,
MSForms = 8,
MSSway = 9,
LinkInIFrame = 10,
Synthesia = 11,
}

class ConfirmationItem : LearningPathItem
{
ConfirmationMessage: string;
CheckMarkMessage: string;
Type: ConfirmationItemType;
}

enum ConfirmationItemType
{
SimpleCheckBox = 0,
Authorization = 1
}

class Quiz : LearningPathItem
{
QuizId: Guid;
}