将文件上传到 educationSynchronizationProfile 后开始同步

命名空间:microsoft.graph

重要

Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。

验证上传到租户中特定学校数据 同步配置文件 的文件。 如果验证成功,将在配置文件上启动同步。 否则,响应将包含错误和警告。 如果响应包含错误,将不会启动同步。 如果响应仅包含警告,将启动同步。

注意: 仅在数据提供程序类型为 educationcsvdataprovider 时使用此方法。 此外,需要设置配置文件的状态属性,然后才能启动它。 轮询配置文件对象以检查其状态属性。

权限

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限

权限类型 权限
委派(工作或学校帐户) EduAdministration.ReadWrite
委派 (个人 Microsoft 帐户 不支持。
应用程序 EduAdministration.ReadWrite.All

HTTP 请求

POST /education/synchronizationProfiles/{id}/start

请求标头

名称 类型 说明
Authorization string Bearer {token}。必需。

请求正文

请勿提供此方法的请求正文。

响应

如果成功,此方法返回 200 OK 响应代码。 如果失败,则返回 。400 Bad Request 如果发现任何错误或警告,响应包含 educationFileSynchronizationVerificationMessage 对象的集合作为响应正文的一部分。

示例

请求

下面是一个请求示例。

POST https://graph.microsoft.com/beta/education/synchronizationProfiles/{id}/start
响应

下面是一个响应示例。

注意: 为了提高可读性,可能缩短了此处显示的响应对象。

HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/Collection(microsoft.graph.verificationMessage)",
    "value": [
        {
            "type": "Error",
            "fileName": "section.csv",
            "description": "5 row(s) have missing data for the field - SIS ID"
        },
        {
            "type": "Error",
            "fileName": "section.csv",
            "description": "5 row(s) have an invalid format for the field - SIS ID"
        },
        {
            "type": "Warning",
            "fileName": "student.csv",
            "description": "3 duplicates found in column SIS ID which requires values to be Unique."
        },
        {
            "type": "Warning",
            "fileName": "student.csv",
            "description": "3 duplicates found in column Username which requires values to be Unique."
        },
        {
            "type": "Error",
            "fileName": "studentenrollment.csv",
            "description": "125 row(s) have referenced data not found in source. Field - Section SIS ID"
        },
        {
            "type": "Error",
            "fileName": "studentenrollment.csv",
            "description": "35 row(s) have referenced data not found in source. Field - SIS ID"
        },
        {
            "type": "Warning",
            "fileName": "teacher.csv",
            "description": "3 duplicates found in column SIS ID which requires values to be Unique."
        },
        {
            "type": "Warning",
            "fileName": "teacher.csv",
            "description": "3 duplicates found in column Username which requires values to be Unique."
        },
        {
            "type": "Error",
            "fileName": "teacherroster.csv",
            "description": "10 row(s) have referenced data not found in source. Field - Section SIS ID"
        },
        {
            "type": "Error",
            "fileName": "teacherroster.csv",
            "description": "91 row(s) have referenced data not found in source. Field - SIS ID"
        }
    ]
}