Microsoft Learn 目录 API 开发人员参考文档

本文为实现 Microsoft Learn 目录 API 的开发人员和请求者提供信息。 我们还建议查看 Learn 目录 API 最佳做法发行说明常见问题解答文章,以支持你的开发之旅。

API 终结点

Microsoft Learn 目录 API 是基于 REST 的 Web API,它返回 JSON 编码的响应。 若要请求完整目录,请将 GET 请求发送到:

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

注意

上面列出的终结点是当前终结点。 如果使用其他较旧的终结点,则其在你加入时仍会按预期工作,但切换到新终结点的好处是,它将为你提供增强的功能,例如其他查询参数。

查询参数

以下是请求可能包含的查询参数。 所有这些参数都是可选的。 必须对查询参数值进行 URL 编码。 使用终结点时,可以不使用这些参数,也可以使用其中一个、部分或全部参数。

重要

如果使用多个参数,则会使用 AND 运算符评估查询。

名称 类型 必须 示例
区域设置 支持的区域设置列表中有效的单个区域设置代码。 如果可用,返回的元数据将位于请求的区域设置中。 如果未提供此参数,则返回 en-us 响应。 字符串 ?locale=en-us
type 当前在返回响应中提供的一个或多个顶级内容或分类对象的逗号分隔列表。 支持的值为:modulesunitslearningPathsappliedSkillscertificationsmergedCertificationsexamscourseslevelsrolesproductssubjects string ?type=modules,learningPaths
uid 可用内容类型的一个或多个有效内容惟一 ID (uid) 的逗号分隔列表。 注意:uid 区分大小写。 字符串 ?uid=learn.azure.intro-to-azure-fundamentals
last_modified 一个运算符和日期时间,用于按对象的上次修改日期进行筛选。 运算符包括lt(小于)、lte(小于或等于)、eq(等于)、gt(大于)、gte(大于或等于)。 使用此参数时,如果未指定,运算符将默认为 gte 字符串 ?last_modified=gte 2022-01-01
popularity 一个运算符和值,用于按对象的热门程度值(介于 0 到 1 之间)进行筛选。 运算符包括lt(小于)、lte(小于或等于)、eq(等于)、gt(大于)、gte(大于或等于)。 使用此参数时,如果未指定,运算符将默认为 gte 字符串 ?popularity=gte 0.5
level 我们当前可用的一个或多个级别的逗号分隔列表(完整列表位于 API 响应的 level 对象中)。 字符串 ?level=beginner
角色 (role) 我们当前可用的一个或多个角色的逗号分隔列表(完整列表位于 API 响应的 role 对象中)。 字符串 ?role=developer
product 我们当前可用的一个或多个产品的逗号分隔列表(完整列表位于 API 响应的 products 对象中)。 API 不支持产品层次结构,因此请将每个产品添加到要包含在查询中的列表。 字符串 ?product=azure
subject 我们当前可用的一个或多个主题的逗号分隔列表(完整列表位于 API 响应的 subjects 对象中)。 API 不支持主题层次结构,因此请将每个主题添加到要包含在查询中的列表。 字符串 ?subject=cloud-computing

示例查询

下面列出了一些示例查询,可帮助了解可以请求的内容以及如何形成请求。

说明 查询
Learn 目录 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 进行编码,有 12 个节:

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

每个数组都有一个或多个 JSON 编码的对象,其中包含特定于响应部分的数据。

  1. modules:是已发布模块的数组。
  2. units:是已发布单元的数组。
  3. learningPaths:是已发布的学习路径的数组。
  4. appliedSkills:是一系列已发布的应用技能。
  5. mergedCertifications:是一系列与考试合并的已发布认证。
  6. certifications:是已发布认证的数组。
  7. exams:是已发布考试的数组。
  8. courses:是已发布的讲师引导式培训课程的数组。
  9. levels:是可能的受众级别数组。
  10. products:是目录中涵盖的可能产品和服务的数组。
  11. roles:是可能的作业角色的数组。
  12. 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
}

字段详细信息

字段 类型​​ 说明
summary 字符串型 提供模块简短说明的字符串。 该值表示为 HTML 段落标记,内部文本为摘要。
levels 字符串数组 与此模块相关联的级别列表,指示了解此模块所有方面所必要的角色经验。 有关单元的详细信息可在级别记录中引用。
roles 字符串数组 与此模块相关的作业角色的列表。
products 字符串数组 本模块涵盖的相关产品列表。 有关产品的详细信息可在产品记录中引用。
subjects 字符串数组 本学习路径涵盖的相关主题列表。
uid 字符串型 此模块的唯一标识符 - 此值在所有 MS Learn 中都是唯一的。
type 字符串型 记录类型。 值将始终为“模块”。
title 字符串型 请求的区域设置中模块的标题,或使用美式英语作为后备。
duration_in_minutes 整型 此模块完成所需的平均时间(分钟)。
rating object 包含 countaverage,前者是对此模块评级的用户人数,后者是评级总和 (1-5)
popularity Double 一个标准化的值 (0-1),它表示此模块的受欢迎程度
icon_url 字符串型 100x100 SVG 图像的完全限定的 URL,该图像表示具有透明背景的模块成就图像。
social_image_url 字符串 PNG 图像的完全限定的 URL,该图像表示具有矩形不透明背景的模块成就图像,适用于社交媒体或磁贴体验。 如果它对于此模块不可用,则不会在响应中返回此属性。
locale 字符串型 JSON 数据的写入语言。 如果可用,此值将是请求的区域设置,如果不可用,则为“en us”。
last_modified 日期 上一次此模块有重大修改。
url 字符串型 在请求的区域设置中,指向 Learn 模块的完全限定 URL。
firstUnitUrl 字符串 在请求的区域设置中,指向 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"
},

注意

单元记录没有关联的 URL,因为单位不作为独立内容写入。 它们旨在以特定的顺序用于模块。 出于此原因,我们在模块记录中包括指向模块详细信息页和第一个单元的链接,使用户可从该位置开始,继续浏览内容。 但是,单元记录可用于获取有关要在 LMSes 或其他体验中显示的单位的详细信息。

字段详细信息

字段 类型​​ 说明
uid 字符串型 此模块的唯一标识符 - 此值在所有 MS Learn 中都是唯一的。
type 字符串型 记录类型。 值将始终为“unit”。
title 字符串 请求的区域设置中单元的标题,或使用美式英语作为后备。
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
}

字段详细信息

字段 类型​​ 说明
summary 字符串型 提供学习路径简短说明的字符串。 该值表示为 HTML 段落标记,内部文本为摘要。
levels 字符串数组 与此学习路径相关联的级别列表,指示了解此学习路径所有方面所必要的角色经验。 有关单元的详细信息可在级别记录中引用。
roles 字符串数组 此学习路径的相关工作角色列表。
products 字符串数组 本学习路径涵盖的相关产品列表。 有关产品的详细信息可在产品记录中引用。
subjects 字符串数组 本学习路径涵盖的相关主题列表。
uid 字符串型 此学习路径的唯一标识符 - 此值在所有 MS Learn 中都是唯一的。
type 字符串型 记录类型。 值将始终为“学习路径”。
title 字符串型 请求的区域设置中学习路径的标题,或使用美式英语作为后备。
duration_in_minutes 整型 此学习路径完成所需的平均时间(分钟)。 此值是来自所有模块的数据的总和。
rating object 包含 countaverage,前者是对此学习路径评级的用户人数,后者是评级总和 (1-5)
popularity Double 一个标准化的值 (0-1),它表示此学习路径的受欢迎程度
icon_url 字符串型 表示学习路径的 100x100 SVG 图像的完全限定的 URL。
social_image_url 字符串 PNG 图像的完全限定的 URL,该图像表示具有矩形不透明背景的学习路径成就图像,适用于社交媒体或磁贴体验。 如果它对于此模块不可用,则不会在响应中返回此属性。
locale 字符串型 JSON 数据的写入语言。 如果可用,此值将是请求的区域设置,如果不可用,则为“en us”。
last_modified 日期 上一次此学习路径有更改。
url 字符串型 在请求的区域设置中,指向 Microsoft Learn 中学习路径的完全限定 URL。
firstModuleUrl 字符串 在请求的区域设置中,指向 Microsoft Learn 中学习路径的第一个模块的完全限定 URL。
modules 字符串数组 关联的模块 UID 的列表。 有关模块的详细信息可在模块记录中引用。
number_of_children 整型 此学习路径中包含的模块数。

应用技能记录

每个应用技能记录都将采用以下形式:

{
    "uid": "applied-skill.deploy-and-configure-azure-monitor",
    "locale": "en-us",
    "url": "https://learn.microsoft.com/en-us/credentials/applied-skills/deploy-and-configure-azure-monitor/?WT.mc_id=api_CatalogApi",
    "title": "Deploy and configure Azure Monitor",
    "summary": "<p>To earn this Microsoft Applied Skills credential, learners demonstrate the ability to deploy and configure monitoring for Azure infrastructure.</p>\n<p>Candidates for this assessment lab should be familiar with operating systems, networking, servers, and virtualization.</p>\n",
    "levels": [
        "intermediate"
    ],
    "roles": [
        "administrator"
    ],
    "products": [
        "azure-monitor",
        "azure-virtual-machines",
        "azure-virtual-network",
        "windows-server"
    ],
    "subjects": [
        "it-management-monitoring"
    ],
    "study_guide": [
        {
            "uid": "learn.wwl.deploy-configure-azure-monitor",
            "type": "learningPath"
        }
    ],
    "last_modified": "2023-10-25T17:07:00+00:00"
}

字段详细信息

字段 类型​​ 说明
uid string 此应用技能的唯一标识符 - 该值在所有 MS Learn 中都将是独一无二的。
locale string JSON 数据的写入语言。 如果可用,此值将是请求的区域设置,如果不可用,则为“en us”。
title string 应用技能的标题,采用所请求的区域设置,或采用美国英语作为后备语言。
summary string 应用技能的摘要,采用所请求的区域设置,或采用美国英语作为后备语言。
url string Microsoft Learn 中应用技能的完全限定的 URL,采用所请求的区域设置。
icon_url string 代表应用技能的 100x100 SVG 图像的完全限定的 URL(前提是它可用,否则不包括在内)。
levels 字符串数组 与此应用技能关联的级别的列表。
roles 字符串数组 此应用技能的相关工作角色的列表。 有关角色的详细信息可在角色记录中引用。
subjects 字符串数组 此应用技能涵盖的相关主题的列表。
study_guide 对象数组 此应用技能的关联学习内容的列表。 有关这些对象的详细信息可在其关联的记录中引用。
last_modified date 上次更改此应用技能的时间。

合并认证记录

每个合并认证记录都将采用以下形式:

{
    "uid": "certification.d365-functional-consultant-manufacturing",
    "title": "Microsoft Certified: Dynamics 365 Supply Chain Management, Manufacturing Functional Consultant Associate",
    "summary": "<div class=\"WARNING\">\n<p>Warning</p>\n<p>This certification retired on June 30, 2023. You can renew it for at least six months after the retirement date by completing the free online assessment available on the <a href=\"/credentials/certifications/d365-functional-consultant-manufacturing/renew\">certification renewal page</a>. <a href=\"https://aka.ms/BACertPortfolioUpdatesBlog\">Read the blog post</a>.</p>\n</div>\n<p>If you’re a functional consultant or a business user with a deep understanding of manufacturing industry standards, this certification might be for you. You also need experience configuring and implementing Dynamics 365 Supply Chain Management to meet the needs of your organization. Supply chain management, manufacturing functional consultants are key resources who work with developers, solution architects, project managers, and functional consultants in finance, commerce, and supply chain.</p>\n<p>If you need more experience before you try to earn this certification, here are some suggestions:</p>\n<ul>\n<li>Study the supply chain management and supply chain management, manufacturing modules on Microsoft Learn, and complete more hands-on practice.</li>\n<li>Sign up for an instructor-led training course that covers the MB-300 or MB-320 track.</li>\n<li>Take part in the community at <a href=\"https://community.dynamics.com/\">community.dynamics.com</a>, or join a user group.</li>\n<li>Shadow a manufacturing functional consultant in a manufacturing workstream.</li>\n<li>Get a mentor, tour manufacturing lines, and learn how things are made.</li>\n<li>Ask questions, and learn from experts and customers.</li>\n</ul>\n",
    "url": "https://learn.microsoft.com/en-us/credentials/certifications/d365-functional-consultant-manufacturing/?WT.mc_id=api_CatalogApi",
    "icon_url": "https://learn.microsoft.com/en-us/media/learn/certification/badges/microsoft-certified-associate-badge.svg",
    "last_modified": "2023-09-19T00:47:00+00:00",
    "type": "cert",
    "certification_type": "role-based",
    "products": [
        "dynamics-365",
        "dynamics-finance"
    ],
    "levels": [
        "intermediate"
    ],
    "roles": [
        "functional-consultant"
    ],
    "subjects": [],
    "renewal_frequency_in_days": 0,
    "prerequisites": [],
    "skills": [
        "Describe finance and operations apps, and extend apps by using Microsoft Power Platform technologies",
        "Configure administrative features and workflows",
        "Manage finance and operations data",
        "Validate and support solutions",
        "Configure Dynamics 365 Supply Chain Management, Manufacturing",
        "Manage manufacturing processes",
        "Implement master planning for production",
        "Implement other manufacturing features"
    ],
    "recommendation_list": [],
    "study_guide": [],
    "exam_duration_in_minutes": 0,
    "locales": [],
    "providers": [],
    "career_paths": []
}

字段详细信息

字段 类型​​ 说明
uid 字符串 此认证的唯一标识符 - 此值在所有 MS Learn 中都是唯一的。
title 字符串 请求的区域设置中认证的标题,或使用美式英语作为后备。
summary string 认证的摘要,采用所请求的区域设置,或采用美国英语作为后备语言。
url string 在请求的区域设置中,指向 Microsoft Learn 中认证的完全限定的 URL。
icon_url 字符串 表示认证的 100x100 SVG 图像的完全限定的 URL。
last_modified date 上次更改此认证的时间。
type string 记录类型。 值将始终为“cert”。
certification_type 字符串 认证的类型。 可能的值有“fundamentals”、“mce”、“mcsa”、“mcsd”、“mcse”、“mos”、“mta”、“role-based”、“specialty”。
products 字符串数组 此认证涵盖的相关产品的列表。 有关产品的详细信息可在产品记录中引用。
levels 字符串数组 与此认证相关联的级别列表,指示了解此认证考试的所有方面所必要的角色经验。 有关单元的详细信息可在级别记录中引用。
roles 字符串数组 此认证的相关工作角色的列表。 有关角色的详细信息可在角色记录中引用。
subjects 字符串数组 此认证涵盖的相关主题的列表。
renewal_frequency_in_days integer 距离此认证到期并需要进行续订的天数。 如果此值为 0,则认证不会过期。
prerequisites 字符串数组 获得此认证的建议先决条件的列表。 可以在认证记录中参考有关认证的详细信息。
skills 字符串数组 针对此认证所需的考试测试的技能的列表。
recommendation_list 字符串数组 与此认证相关的建议的列表。
study_guide 对象数组 为获得此认证而要学习的关联内容的列表。 有关这些对象的详细信息可在其关联的记录中引用。
exam_duration_in_minutes integer 安排给考生完成考试的时间(分钟)。
locales 字符串数组 此认证的语言的列表。
providers 对象数组 此认证的提供者的列表。 该类型描述了涉及的提供程序和一个完全限定的 URL,其中包含一个在提供程序安排考试的链接。
career_paths 对象数组 此认证的职业道路的列表。

注意

只需要一项考试的认证将作为此 mergedCertifications 属性的一部分返回。

认证记录

每个认证记录都有以下格式:

{
    "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"
        }
    ]
}

字段详细信息

字段 类型​​ 说明
uid 字符串 此认证的唯一标识符 - 此值在所有 MS Learn 中都是唯一的。
title 字符串 请求的区域设置中认证的标题,或使用美式英语作为后备。
subtitle 字符串 请求的区域设置中认证的副标题,或使用美式英语作为后备。
url 字符串 在请求的区域设置中,指向 Microsoft Learn 中认证的完全限定的 URL。
icon_url 字符串 表示认证的 100x100 SVG 图像的完全限定的 URL。
type 字符串型 记录类型。 值将始终为“cert”。
certification_type 字符串 认证的类型。 可能的值有“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&amp;utm_medium=certpage&amp;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"
        }
    ]
}

字段详细信息

字段 类型​​ 说明
uid 字符串 此考试的唯一标识符 - 此值在所有 MS Learn 中都是唯一的。
title 字符串 请求的区域设置中考试的标题,或使用美式英语作为后备。
subtitle 字符串 请求的区域设置中考试的副标题,或使用美式英语作为后备。
display_name 字符串 请求的区域设置中考试的显示名称,或使用美式英语作为后备。
url 字符串 在请求的区域设置中,指向 Microsoft Learn 中考试的完全限定的 URL。
icon_url 字符串 表示考试的 100x100 SVG 图像的完全限定的 URL。
pdf_download_url 字符串 PDF 的完全限定的 URL,概述了此考试衡量的技能。
practice_test_url 字符串 一个完全限定的 URL,指向与考试关联的练习测试。
practice_assessment_url 字符串 一个完全限定的 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"
        }
    ]
},

字段详细信息

字段 类型​​ 说明
uid 字符串 此讲师引导式课程的唯一标识符 - 此值在所有 MS Learn 中都是唯一的。
course_number 字符串 讲师引导式课程编号标识符。
title 字符串 请求的区域设置中讲师引导式课程的标题,或使用美式英语作为后备。
summary 字符串 提供讲师引导式课程简短说明的字符串。 该值表示为 HTML 段落标记,内部文本为摘要。
duration_in_hours integer 此讲师引导式课程的平均完成时间(小时)。
url 字符串 在请求的区域设置中,指向 Microsoft Learn 中讲师引导式课程详细信息页面的完全限定的 URL。
icon_url 字符串 表示讲师引导式课程成就的 100x100 SVG 图像的完全限定的 URL。
locales 字符串数组 此讲师引导式课程正式采用的语言列表。 学习合作伙伴可能支持其他语言。
type 字符串型 记录类型。 对于讲师引导式课程,此值将始终为“course”。
certification 字符串 与讲师引导式课程相关的认证。
exam 字符串 与讲师引导式课程相关的考试。
levels 字符串数组 与此讲师引导式课程相关联的级别列表,指示了解此课程所有方面所必要的角色经验。 有关单元的详细信息可在级别记录中引用。
study_guide 对象数组 PDF 的完全限定的 URL,概述了此认证衡量的技能。

级别、产品、角色和主题记录

levelsproductsrolessubjects 集合为模块中使用的值和学习路径数据提供友好的名称。 四个集合都有相同的形状:

{
    "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 目录 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)

后续步骤

查看以下资源,帮助你完成开发之旅: