将文件上传到 educationSynchronizationProfile 后开始同步Start sync after uploading files to an educationSynchronizationProfile

命名空间:microsoft.graphNamespace: microsoft.graph

重要

/betaMicrosoft Graph 中的版本下的 api 可能会发生更改。APIs under the /beta version in Microsoft Graph are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported. 若要确定 API 在 v1.0 中是否可用,请使用 版本 选择器。To determine whether an API is available in v1.0, use the Version selector.

验证是否已将文件上载到租户中的特定学校数据 同步配置文件Verify the files uploaded to a specific school data synchronization profile in the tenant. 如果验证成功,将在配置文件上启动同步。If the verification is successful, synchronization will start on the profile. 否则,响应中将包含错误和警告。Otherwise, the response will contain errors and warnings. 如果响应中包含错误,同步将不会启动。If the response contains errors, the synchronization will not start. 如果响应仅包含警告,将启动同步。If the response contains only warnings, synchronization will start.

注意: 仅当数据提供程序的类型为 educationcsvdataprovider时,才可使用此方法。Note: Use this method only when the data provider is of type educationcsvdataprovider. 此外,还需要先设置配置文件的 state 属性,然后才能启动该属性。Also, the profile's state property needs to be provisioned before it can be started. 轮询配置文件对象以检查其状态属性。Poll the profile object to check its state property.

权限Permissions

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限Permissions
委派(工作或学校帐户)Delegated (work or school account) EduAdministration.ReadWriteEduAdministration.ReadWrite
委派 (个人 Microsoft 帐户Delegated (personal Microsoft account 不支持。Not supported.
应用程序Application 不支持。Not supported.

HTTP 请求HTTP request

POST /synchronizationProfiles/{id}/start

请求标头Request headers

名称Name 类型Type 说明Description
AuthorizationAuthorization stringstring Bearer {token}。必需。Bearer {token}. Required.

请求正文Request body

请勿提供此方法的请求正文。Do not supply a request body for this method.

响应Response

如果成功,此方法返回 200 OK 响应代码。If successful, this method returns a 200 OK response code. 如果不成功,则返回 400 Bad RequestIf unsuccessful, it returns a 400 Bad Request. 如果发现任何错误或警告,响应将包含 educationFileSynchronizationVerificationMessage 对象的集合作为响应正文的一部分。The response contains a collection of educationFileSynchronizationVerificationMessage objects as part of the response body if any errors or warnings were found.

示例Example

请求Request

下面是一个请求示例。Here is an example of the request.

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

下面是一个响应示例。Here is an example of the response.

注意: 为了提高可读性,可能缩短了此处显示的响应对象。所有属性都将通过实际调用返回。Note: The response object shown here might be shortened for readability. All the properties will be returned from an actual call.

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

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