Microsoft Learn Catalog API 開発者リファレンス ドキュメント

この記事の内容は、Microsoft Learn Catalog API を実装する開発者と要求者のための情報です。 今後の開発に役立つ Learn Catalog API のベスト プラクティスリリース ノートよく寄せられる質問の記事も確認することをお勧めします。

API エンドポイント

Microsoft Learn Catalog API は REST ベースの Web API であり、JSON でエンコードされた応答を返します。 完全なカタログを要求するには、GET 要求を次の場所に送信します。

https://learn.microsoft.com/api/catalog/

注意

上記のエンドポイントは現在のエンドポイントです。 別の古いエンドポイントを使用している場合でも、オンボード時の想定通りに動作しますが、新しいエンドポイントに切り替えると、クエリ パラメーターの追加など、機能が強化されるというメリットがあります。

クエリ パラメーター

要求に含めることができるクエリ パラメーターを次に示します。 すべてオプションです。 クエリ パラメーターの値を URL エンコードする必要があります。 これらのパラメーターについて、なし、1 つ、一部、またはすべてを使用して、エンドポイントを使用することができます。

重要

複数を使用する場合、クエリは AND 演算子を使用して評価されます。

名前 Type 必須
locale サポートされているロケール一覧の中から、有効なロケール コードを 1 つだけ指定します。 メタデータは要求したロケールで返されます (利用可能な場合)。 このパラメーターが指定されていない場合は、応答 en-us が返されます。 string いいえ ?locale=en-us
type 現在返す応答で提供しているトップレベルのコンテンツまたは分類オブジェクトの 1 つまたは複数のカンマ区切りリスト。 サポートされる値: modulesunitslearningPathscertificationsexamscourseslevelsrolesproductssubjects string いいえ ?type=modules,learningPaths
uid 使用可能なコンテンツ タイプからの、1 つ以上の有効なコンテンツ固有 ID (UID) のコンマ区切り一覧です。 注: uid は、大文字と小文字が区別されます。 string いいえ ?uid=learn.azure.intro-to-azure-fundamentals
last_modified オブジェクトの最終更新日時でフィルターするための演算子および日付時刻。 演算子には、lt (より小さい)、lte (以下)、eq (等しい)、gt (より大きい)、gte (以上) が含まれます。 このパラメーターを使用する場合、演算子の既定は (指定しない場合は) gte に設定されます。 string いいえ ?last_modified=gte 2022-01-01
使用頻度 オブジェクトの使用頻度 (0 〜 1 の範囲) でフィルターするための演算子と値。 演算子には、lt (より小さい)、lte (以下)、eq (等しい)、gt (より大きい)、gte (以上) が含まれます。 このパラメーターを使用する場合、演算子の既定は (指定しない場合は) gte に設定されます。 string いいえ ?popularity=gte 0.5
level 現在利用可能なレベルの 1 つ以上のカンマ区切りリスト (完全なリストは API 応答の levels オブジェクトにあります)。 文字列 いいえ ?level=beginner
role 現在利用可能なロールの 1 つ以上のカンマ区切りリスト (完全なリストは API 応答の roles オブジェクトにあります)。 string いいえ ?role=developer
product 現在利用可能なロールの 1 つ以上のカンマ区切りリスト (完全なリストは API 応答の products オブジェクトにあります)。 この API では製品の階層構造がサポートされていないため、クエリに含めたい製品をすべてリストに追加してください。 string No ?product=azure
subject 現在利用可能なロールの 1 つ以上のカンマ区切りリスト (完全なリストは API 応答の subjects オブジェクトにあります)。 この API ではサブジェクトの階層構造がサポートされていないため、クエリに含めたいサブジェクトをすべてリストに追加してください。 string いいえ ?subject=cloud-computing

サンプル クエリ

以下に示すクエリは、要求できる内容と要求を形成する方法を理解するのに役立つサンプルです。

説明 クエリ
Learn Catalog API のすべての項目 https://learn.microsoft.com/api/catalog/
すべてのスペイン語モジュール https://learn.microsoft.com/api/catalog/?locale=es-es&type=modules
人気スコアが 0.9 以上のすべてのモジュール https://learn.microsoft.com/api/catalog/?type=modules&popularity>0.9
すべての初心者向けセキュリティ トレーニング オブジェクトと認定オブジェクト https://learn.microsoft.com/api/catalog/?level=beginner&subject=security
人気スコアが 0.5 を超え、先月に更新されたすべての高度なアクセシビリティ モジュール https://learn.microsoft.com/api/catalog/?level=advanced&subject=accessibility&popularity>0.5&last_modified=gte 2022-10-01

API 応答

サービスが、次の HTTP 状態コードを返す場合があります。

状態コード 説明
200 成功しました。 応答の本文には、JSON でエンコードされたデータが含まれます。
400 クエリ パラメーターのいずれかが指定されていないか、無効です。
404 URL がサーバーで見つかりませんでした。
500 予期しないサーバー エラーです。
503 サービスは一時的に利用できません。

正常な応答には、次に示すように、すべてのモジュールとラーニング パスに関する詳細情報が含まれます。

応答本文

成功した応答本文は JSON でエンコードされ、9 つのセクションがあります。

{
    "modules": [ ... ],
    "units": [...],
    "learningPaths": [ ... ],
    "certifications": [ ... ],
    "exams": [ ... ],
    "courses": [ ... ],
    "levels": [ ... ],
    "products": [ ... ],
    "roles": [ ... ],
    "subjects": [...],
}

各配列には、応答のそのセクションに固有のデータを含む、1 つ以上の JSON でエンコードされたオブジェクトがあります。

  1. modules: 公開済みのモジュールの配列です。
  2. units: 公開済みのユニットの配列です。
  3. learningPaths: 公開済みのラーニング パスの配列です。
  4. certifications: 公開済みの認定資格の配列です。
  5. exams: 公開済みの試験の配列です。
  6. courses: 公開済みの講師による指導付きトレーニング コースの配列です。
  7. levels: 可能性のある対象ユーザー レベルの配列です。
  8. products: カタログで網羅されている可能性のある製品とサービスの配列です。
  9. roles: 可能性のある職務の配列です。
  10. subjects: 可能なサブジェクト タグの配列です。

モジュール レコード

モジュール レコード

各モジュール レコードの形式は次のとおりです。

{
    "summary": "Explore the core concepts of cloud computing and how it can help your business.",
    "levels": [
        "beginner"
    ],
    "roles": [
        "administrator",
        "business-analyst",
        "developer"
    ],
    "products": [
        "azure",
        "azure-portal",
        "azure-resource-manager"
    ],
    "subjects": [
        "data-visualization"
    ],
    "uid": "learn.principles-cloud-computing",
    "type": "module",
    "title": "Cloud Concepts - Principles of cloud computing",
    "duration_in_minutes": 62,
    "rating": {
        count: 2014,
        average: 4.84
    },
    "popularity": 0.8839785477023878, 
    "icon_url": "https://learn.microsoft.com/learn/achievements/principles-cloud-computing.svg",
    "social_image_url": "https://learn.microsoft.com/learn/achievements/principles-cloud-computing-social.png",
    "locale": "en-us",
    "last_modified": "2018-09-24T00:00:00Z",
    "url": "https://learn.microsoft.com/learn/modules/principles-cloud-computing",
    "firstUnitUrl": "https://learn.microsoft.com/learn/modules/principles-cloud-computing/1-introduction",
    "units": [
        "learn.principles-cloud-computing.1-introduction",
        "learn.principles-cloud-computing.2-types-of-cloud-computing",
        "learn.principles-cloud-computing.3-benefits-of-cloud-computing",
        "learn.principles-cloud-computing.4-categories-of-cloud-services",
        "learn.principles-cloud-computing.5-knowledge-check",
        "learn.principles-cloud-computing.6-summary"
    ],
    "number_of_children": 6
}

フィールドの詳細

フィールド Type Description
summary 文字列 モジュールの簡単な説明を提供する文字列です。 値は、内部のテキストに概要が示される、HTML 段落タグとして表現されます。
levels 文字列の配列 このモジュールに関連するレベルのリストで、このモジュールのすべての側面を理解するために必要な職務経験を示しています。 ユニットに関する詳細は、レベル レコードで参照できます。
roles 文字列の配列 このモジュールが関連する職務のリストです。
products 文字列の配列 このモジュールがカバーする関連製品のリストです。 製品に関する詳細は、製品レコードで参照できます。
subjects 文字列の配列 このラーニング パスの対象となる関連サブジェクトのリストです。
uid 文字列 このモジュールの一意の識別子です。この値は、すべての MS Learn で一意になります。
type 文字列 レコードの種類です。 値は常に "module" になります。
title 文字列 要求されたロケール (またはフォールバックとして米国英語) でのモジュールのタイトルです。
duration_in_minutes 整数 このモジュールが完了するまでにかかる平均時間 (分) です。
rating object モジュールを評価した人の数である count と、評価の合計値である average (1 から 5) が含まれています。
popularity double モジュールの人気を示す 0 から 1 の正規化された値
icon_url 文字列 モジュールの実績イメージを表す 100 x 100 の SVG 画像 (背景は透明) の完全修飾 URL です。
social_image_url string モジュールの実績イメージを表す PNG 画像 (背景は長方形で不透明) への完全修飾 URL です。ソーシャル メディアやタイル エクスペリエンスに適しています。 このモジュールで使用できない場合、このプロパティは応答で返されません。
locale 文字列 この JSON データの書き込みに使用される言語です。 この値は、要求されたロケールになります (使用可能な場合)。使用できない場合は "en-us" になります。
last_modified 日付 このモジュールのメジャー リビジョンが最後に発生した時刻です。
url 文字列 要求されたロケールでの Learn モジュールへの完全修飾 URL です。
firstUnitUrl string 要求されたロケールでの Learn モジュールの最初のユニットへの完全修飾 URL です。
units 文字列の配列 関連付けられているユニット UID の一覧です。 ユニットに関する詳細は、ユニット レコードで参照できます。
number_of_children 整数 このモジュールに含まれるページ数 (ユニット数) です。

ユニット レコード

各ユニット レコードの形式は次のとおりです。

{
    "uid": "learn.azure.fundamental-azure-concepts.types-of-cloud-computing",
    "type": "unit",
    "title": "Discuss different types of cloud models",
    "duration_in_minutes": 5,
    "locale": "en-us",
    "last_modified": "2021-12-09T02:45:00+00:00"
},

Note

ユニットは独立したコンテンツとして書かれていないため、ユニット レコードには関連する URL はありません。 それらは、モジュールの特定の順序で実施されることが意図されています。 このため、モジュール レコードには、モジュール詳細ページと最初のユニットへのリンクが含まれており、ユーザーはそこから始めてコンテンツを進めることができます。 ただし、ユニット レコードは、LMS や他のエクスペリエンスに表示するユニットについての詳細を取得するために使用することができます。

フィールドの詳細

フィールド Type Description
uid 文字列 このモジュールの一意の識別子です。この値は、すべての MS Learn で一意になります。
type 文字列 レコードの種類です。 値は常に "unit" になります。
title string 要求されたロケール (またはフォールバックとして米国英語) でのユニットのタイトルです。
duration_in_minutes ユニットの期間です。 各モジュールに関連するユニットの duration_in_minutes をすべて足すと、モジュールの総時間が得られます。
locale 文字列 この JSON データの書き込みに使用される言語です。 この値は、要求されたロケールになります (使用可能な場合)。使用できない場合は "en-us" になります。
last_modified 日付 このモジュールのメジャー リビジョンが最後に発生した時刻です。

ラーニング パス レコード

各ラーニング パス レコードの形式は次のとおりです。

{
    "summary": "Azure Functions enable the creation of event driven, compute-on-demand systems that can be triggered by various external events. Learn how to leverage functions to execute server-side logic and build serverless architectures.",
    "levels": [
        "beginner",
        "intermediate"
    ],
    "roles": [
        "developer",
        "solution-architect"
    ],
    "products": [
        "azure",
        "azure-portal",
        "azure-functions",
        "azure-cosmos-db",
        "azure-cloud-shell"
    ],
    "subjects": [
        "data-visualization"
    ],
    "uid": "learn.create-serverless-applications",
    "type": "learningPath",
    "title": "Create serverless applications",
    "duration_in_minutes": 450,
    "rating": {
        count: 2014,
        average: 4.84
    },
    "popularity": 0.8839785477023878, 
    "icon_url": "https://learn.microsoft.com/learn/achievements/create-serverless-applications.svg",
    "social_image_url": "https://learn.microsoft.com/learn/achievements/create-serverless-applications-social.png",
    "locale": "en-us",
    "last_modified": "2018-12-27T00:00:00Z",
    "url": "https://learn.microsoft.com/learn/paths/create-serverless-applications",
    "firstModuleUrl": "https://learn.microsoft.com/learn/modules/choose-azure-service-to-integrate-and-automate-business-processes/",
    "modules": [
        "learn.choose-azure-service-to-integrate-and-automate-business-processes",
        "learn.create-serverless-logic-with-functions",
        "learn.execute-azure-function-with-triggers",
        "learn.chain-azure-functions-data-using-input-output-bindings",
        "learn.azure-create-long-running-serverless-workflow-with-durable-functions",
        "learn-pr.develop-test-deploy-azure-functions-core-tools",
        "learn.develop-test-deploy-azure-functions-with-visual-studio",
        "learn.azure.monitor-github-events-with-a-function-triggered-by-a-webhook",
        "learn.advocates.azure-functions-and-signalr"
    ],
    "number_of_children": 9
}

フィールドの詳細

フィールド Type Description
summary 文字列 ラーニング パスの簡単な説明を提供する文字列です。 値は、内部のテキストに概要が示される、HTML 段落タグとして表現されます。
levels 文字列の配列 このラーニング パスに関連するレベルのリストで、このラーニング パスのすべての側面を理解するために必要な職務経験を示しています。 ユニットに関する詳細は、レベル レコードで参照できます。
roles 文字列の配列 このラーニング パスに関連する職務のリストです。
products 文字列の配列 このラーニング パスの対象となる関連製品のリストです。 製品に関する詳細は、製品レコードで参照できます。
subjects 文字列の配列 このラーニング パスの対象となる関連サブジェクトのリストです。
uid 文字列 このラーニング パスの一意の識別子です。この値は、すべての MS Learn で一意になります。
type 文字列 レコードの種類です。 値は常に "learningPath" になります。
title 文字列 要求されたロケール (またはフォールバックとして米国英語) でのラーニング パスのタイトルです。
duration_in_minutes 整数 このラーニング パスの完了にかかる平均時間 (分) です。 この値は、含まれているすべてのモジュールのデータの合計です。
rating object 学習パスを評価した人の数である count と、評価の合計値である average (1 から 5) の両方が含まれます。
popularity double ラーニング パスの人気を示す 0 から 1 の正規化された値
icon_url 文字列 このラーニング パスを表す 100 x 100 の SVG 画像への完全修飾 URL です。
social_image_url string ラーニング パスの実績イメージを表す PNG 画像 (背景は長方形で不透明) への完全修飾 URL です。ソーシャル メディアやタイル エクスペリエンスに適しています。 このモジュールで使用できない場合、このプロパティは応答で返されません。
locale 文字列 この JSON データの書き込みに使用される言語です。 この値は、要求されたロケールになります (使用可能な場合)。使用できない場合は "en-us" になります。
last_modified 日付 このラーニング パスが最後に変更された時刻です。
url 文字列 要求されたロケールでの Microsoft Learn のラーニング パスへの完全修飾 URL です。
firstModuleUrl string 要求されたロケールでの Microsoft Learn の学習パスの最初のモジュールへの完全修飾 URL。
modules 文字列の配列 関連付けられているモジュール UID の一覧です。 モジュールの詳細はモジュール レコードで参照できます。
number_of_children 整数 このラーニング パスに含まれるモジュールの数です。

認定資格レコード

各認定資格レコードの形式は次のとおりです。

{
    "uid": "certification.d365-functional-consultant-customer-service",
    "title": "Microsoft Certified: Dynamics 365 Customer Service Functional Consultant Associate",
    "subtitle": "Microsoft Dynamics 365 Customer Service functional consultants are responsible for implementing omnichannel solutions that focus on service, quality, reliability, efficiency, and customer satisfaction.",
    "url": "https://learn.microsoft.com/cert-exam-sandbox/cert/?WT.mc_id=api_CatalogApi",
    "icon_url": "https://learn.microsoft.com/media/learn/certification/badges/microsoft-certified-associate-badge.svg",
    "type": "cert",
    "certification_type": "role-based",
    "exams": [
        "exam.77-881"
    ],
    "levels": [
        "intermediate"
    ],
    "roles": [
        "functional-consultant"
    ],
    "study_guide": [
        {
            "uid": "learn.get-started-with-d365",
            "type": "module"
        },
        {
            "uid": "learn.d365-notebook",
            "type": "module"
        },
        {
            "uid": "learn.d365-fundamentals",
            "type": "learningPath"
        }
    ]
}

フィールドの詳細

フィールド Type Description
uid string この認定資格の一意の識別子です。この値は、すべての MS Learn で一意になります。
title string 要求されたロケール (またはフォールバックとして米国英語) での認定資格のタイトルです。
subtitle string 要求されたロケール (またはフォールバックとして米国英語) での認定資格のサブタイトルです。
url string 要求されたロケールでの Microsoft Learn の認定資格への完全修飾 URL です。
icon_url string この認定資格を表す 100 x 100 の SVG 画像への完全修飾 URL です。
type 文字列 レコードの種類です。 値は常に "cert" になります。
certification_type string 認定資格の種類です。 可能性のある値は、"fundamentals"、"mce"、"mcsa"、"mcsd"、"mcse"、"mos"、"mta"、"role-based"、"specialty" です。
exams 文字列の配列 この認定資格に必要な関連する試験の一覧です。 ユニットに関する詳細は、認定資格レコードで参照できます。
levels 文字列の配列 この認定資格に関連するレベルのリストで、この認定資格の試験のすべての側面を理解するために必要な職務経験を示しています。 ユニットに関する詳細は、レベル レコードで参照できます。
roles 文字列の配列 この認定資格に関連する職務のリストです。 役割の詳細は、役割レコードで参照できます。
study_guide オブジェクトの配列 この資格を取得するために学習する関連コンテンツの一覧です。 オブジェクトの詳細は、それが関連付けられているレコードで参照できます。

試験レコード

各試験レコードの形式は次のとおりです。

{
    "uid": "exam.77-881",
    "title": "Word 2010",
    "subtitle": "The core-level Microsoft Office Word 2010 user should be able to navigate Microsoft Office Word 2010 software at the feature and functional level. They should be familiar with and know how to use at least 80 percent of the features and capabilities of Microsoft Office Word 2010. The core-level user should be able to use Microsoft Office Word 2010 to create and edit professional-looking documents for a variety of purposes and situations. Users would include people from a wide variety of job roles from almost all areas of professional, student, and personal life.",
    "display_name": "77-881",
    "url": "https://learn.microsoft.com/cert-exam-sandbox/exam/77-881/?WT.mc_id=api_CatalogApi",
    "icon_url": "https://learn.microsoft.com/media/learn/certification/badges/certification-exam.svg",
    "pdf_download_url": "https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RE4trjX",
    "practice_test_url": "https://www.mindhub.com/70-413-Designing-and-Implementing-a-Server-Infrast-p/mu-70-413_p.htm?utm_source=microsoft&utm_medium=certpage&utm_campaign=msofficialpractice",
    "practice_assessment_url": "https://learn.microsoft.com/en-us/certifications/exams/{exam}/practice/assessment?assessment-type=practice&assessmentId={assessmentId}",
    "locales": [],
    "type": "exam",
    "courses": [
        "course.pl-200t00",
        "course.mb-230t01"
    ],
    "levels": [
        "beginner"
    ],
    "roles": [
        "business-user"
    ],
    "products": [
        "office-word"
    ],
    "providers": [],
    "study_guide": [
        {
            "uid": "learn.get-started-with-word-2010",
            "type": "module"
        },
        {
            "uid": "learn.office2010-notebook",
            "type": "module"
        },
        {
            "uid": "learn.office2010-fundamentals",
            "type": "learningPath"
        }
    ]
}

フィールドの詳細

フィールド Type Description
uid string この試験の一意の識別子です。この値は、すべての MS Learn で一意になります。
title string 要求されたロケール (またはフォールバックとして米国英語) での試験のタイトルです。
subtitle string 要求されたロケール (またはフォールバックとして米国英語) での試験のサブタイトルです。
display_name string 要求されたロケール (またはフォールバックとして米国英語) での試験の表示名です。
url string 要求されたロケールでの Microsoft Learn 内の試験への完全修飾 URL です。
icon_url string この試験を表す 100x100 の SVG 画像への完全修飾 URL です。
pdf_download_url string この試験で測定されるスキルを概説した PDF への完全修飾 URL です。
practice_test_url string 試験に関連する模擬試験への完全修飾 URL です。
practice_assessment_url string 試験に関連する無料のプラクティス評価への完全修飾 URL です。
locales 文字列の配列 この試験で提供されている言語の一覧です。
type 文字列 レコードの種類です。 値は常に "exam" になります。
courses 文字列の配列 関連付けられているコースの UID の一覧です。 コースの詳細は、コース レコードで参照できます。
levels 文字列の配列 この試験に関連するレベルのリストで、この試験のすべての側面を理解するために必要な職務経験を示しています。 ユニットに関する詳細は、レベル レコードで参照できます。
roles 文字列の配列 この試験に関連する職務のリストです。 役割の詳細は、役割レコードで参照できます。
products 文字列の配列 この試験がカバーする関連製品のリストです。 製品に関する詳細は、製品レコードで参照できます。
providers オブジェクトの配列 この試験のプロバイダーの一覧です。 この型では、プロバイダーと完全修飾 URL が記述されており、プロバイダーで試験をスケジュールするためのリンクが含まれています。
study_guide オブジェクトの配列 この試験のために学習する関連コンテンツの一覧です。 オブジェクトの詳細は、それが関連付けられているレコードで参照できます。

講師による指導付きコース レコード

各コース レコードの形式は次のとおりです。

{
    "uid": "course.mb-230t01",
    "course_number": "MB-230T01",
    "title": "Microsoft Dynamics 365 Customer Service - added non-exist studyguide",
    "summary": "Microsoft Dynamics 365 Customer Service offers any organization an opportunity for customer success. Using tools such as automatic case creation and queue management frees up your time to dedicate it where you can have a greater impact, directly with your customers. Join our team of globally recognized experts as they take you step by step from creating cases to interacting with customers to resolving those cases. Once you’ve resolved those cases you can learn from data analysis the key details to help you resolve similar cases faster or avoid new issues altogether. A Dynamics 365 Customer Engagement Functional Consultant is responsible for performing discovery, capturing requirements, engaging subject matter experts and stakeholders, translating requirements, and configuring the solution and applications. The Functional Consultant implements a solution using out of the box capabilities, codeless extensibility, application and service integrations.",
    "duration_in_hours": 72,
    "url": "https://learn.microsoft.com/cert-exam-sandbox/course/mb-230t01/?WT.mc_id=api_CatalogApi",
    "icon_url": "https://learn.microsoft.com/media/learn/certification/course.svg",
    "locales": [
        "en"
    ],
    "type": "course",
    "certification": "certification.d365-functional-consultant-customer-service",
    "exam": "exam.77-881",
    "levels": [
        "intermediate"
    ],
    "roles": [
        "functional-consultant"
    ],
    "products": [
        "dynamics-365"
    ],
    "study_guide": [
        {
            "uid": "learn.align-requirements-in-azure",
            "type": "module"
        },
        {
            "uid": "learn.manage-resources-in-azure",
            "type": "learningPath"
        }
    ]
},

フィールドの詳細

フィールド Type Description
uid string この講師による指導付きコースの一意の識別子です。この値は、すべての MS Learn で一意になります。
course_number string 講師による指導付きコースの番号識別子です。
title string 要求されたロケール (またはフォールバックとして米国英語) での講師による指導付きコースのタイトルです。
summary string 講師による指導付きコースの簡単な説明を提供する文字列です。 値は、内部のテキストに概要が示される、HTML 段落タグとして表現されます。
duration_in_hours 整数 (integer) この講師による指導付きコースを修了するまでにかかる平均時間 (時間単位) です。
url string 要求されたロケールでの Microsoft Learn 内の講師による指導付きコースの詳細ページへの完全修飾 URL です。
icon_url string この講師による指導付きコースの実績を表す 100 x 100 の SVG 画像への完全修飾 URL です。
locales 文字列の配列 この講師による指導付きコースが正式に提供されている言語の一覧です。 他の言語は、学習パートナーによってサポートされる場合があります。
type 文字列 レコードの種類です。 講師による指導付きコースでは、値は常に "course" になります。
certification string 講師による指導付きコースに関連付けられている認定資格です。
exam string 講師による指導付きコースに関連付けられている試験です。
levels 文字列の配列 この講師による指導付きコースに関連するレベルのリストで、このコースのすべての側面を理解するために必要な職務経験を示しています。 ユニットに関する詳細は、レベル レコードで参照できます。
study_guide オブジェクトの配列 この認定資格で測定されるスキルを概説した PDF への完全修飾 URL です。

レベル、製品、ロール、サブジェクト レコード

levelsproductsrolessubjects コレクションは、モジュールおよびラーニング パスのデータで使用される値のフレンドリ名を提供します。 4 つのコレクションの構造はすべて同じです。

{
    "id": "unique-id",
    "name": "name-of-item",
    "children": [
        { "id": "unique-id", "name": "name-of-item" },
        { "id": "unique-id", "name": "name-of-item" },
           ...
    ]
}

id はその他のカタログ エントリに含まれるレベル、製品、ロール、サブジェクトの値と一致します。 関連する name は、エントリに対して適切な名前 (英語) を提供します。 children 配列は省略可能であり、製品などの子リレーションシップを持つ値に対する階層を利用できます。

例として、次のロール セットを示します。

{
    ...
    "roles": [
        {
            "id": "administrator",
            "name": "Administrator"
        },
        {
            "id": "ai-engineer",
            "name": "AI Engineer"
        },
        {
            "id": "business-analyst",
            "name": "Business Analyst"
        },
        {
            "id": "developer",
            "name": "Developer"
        },
        ...
    ]
}

次に示すのは、さらに具体的な製品カテゴリを提供するための子が含まれている製品セットの例です。

{
    ...
    "products": [
        {
            "id": "dotnet",
            "name": ".NET",
            "children": [
                { "id": "dotnet-core", "name": ".NET Core" },
                { "id": "dotnet-standard", "name": ".NET Standard" },
                { "id": "aspnet-core", "name": "ASP.NET Core" },
                { "id": "ef-core", "name": "Entity Framework Core" }
            ]
        },
        {
            "id": "ms-graph",
            "name": "Microsoft Graph"
        },
        {
            "id": "office",
            "name": "Office",
            "children": [
                { "id": "office-365", "name": "Office 365" },
                { "id": "office-add-ins", "name": "Office Add-ins" },
                { "id": "office-teams", "name": "Teams" }
            ]
        },
        {
            "id": "sql-server",
            "name": "SQL Server"
        },
        ...
    ]
}

コード サンプル

Learn Catalog API を呼び出す方法は多くありますが、コード サンプルの使用方法の例をいくつかご紹介します。

jQuery

$(function() {
    var params = {
        locale:'en-us'
    };
    $.ajax({
        url: "https://learn.microsoft.com/api/learn/catalog?" + $.param(params),
            type: "GET"
    }).done(function(data) {
        alert("success");
    }).fail(function(error) {
        alert("error");
    });
})

.NET C#

public string GetCatalogData()
{
var client = new WebClient();
client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko");
var response = client.DownloadString("https://learn.microsoft.com/api/learn/catalog?locale=en-us");
dynamic parsedJson = JsonConvert.DeserializeObject(response);
JsonConvert.SerializeObject(response, Formatting.Indented);
return Convert.ToString(response);
}

cURL 拡張機能を使用した PHP

<?php 

// From URL to get webpage contents. 
$url = "https://learn.microsoft.com/api/learn/catalog"; 

// Initialize a CURL session. 
$ch = curl_init(); 

// Return Page contents. 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
//grab URL and pass it to the variable. 
curl_setopt($ch, CURLOPT_URL, $url); 

$result = curl_exec($ch); 

echo $result;

?>

'requests' ライブラリを使用した PYTHON 3


#!/usr/bin/env python3
#Using Python 3.8.2 install 5/6/2020

import requests
import json

#if given error 'response / requests not defined', install requests via 'pip install requests' in the command line

parameters= {"locale": "en-us"}

response = requests.get("https://learn.microsoft.com/api/learn/catalog/", parameters)

#print(response.status_code)

rawJson = response._content

#Create python objects based on the data using json.loads

data = json.loads(rawJson)

print(data)

次のステップ

以下のリソースを確認して、今後の開発にお役立てください。