创建 educationSchool

命名空间:microsoft.graph

创建新的 educationSchool 对象。

权限

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

权限类型 权限(从最低特权到最高特权)
委派(工作或学校帐户) 不支持。
委派(个人 Microsoft 帐户) 不支持。
应用程序 EduRoster.ReadWrite.All

HTTP 请求

POST /education/schools

请求标头

名称 说明
Authorization Bearer {token}。必需。
Content-Type application/json. Required.

请求正文

在请求正文中,提供 educationSchool 对象的 JSON 表示形式。

下表显示创建 educationSchool 时所需的属性

属性 类型 说明
displayName String 学校的显示名称。 继承自 educationOrganization
说明 String 学校描述。 继承自 educationOrganization
externalSource educationExternalSource 创建组织的来源。 继承自 educationOrganization。 可能的值是 sis :、'manual。
externalSourceDetail String 生成此资源的外部源的名称。
principalEmail String 主体的电子邮件地址。
principalName String 主体名称。
externalPrincipalId String 同步系统中主体的 ID。
highestGrade String 教授的最高年级。
lowestGrade String 教授的最低年级。
schoolNumber String 学校编号。
externalId String 同步系统中学校的 ID。
phone String 学校电话号码。
fax String 学校传真号码。
createdBy identitySet 创建了学校的实体。
address physicalAddress 学校地址。

响应

如果成功,此方法会在响应正文中返回 201 Created 响应代码和 educationSchool 对象。

示例

请求

POST https://graph.microsoft.com/v1.0/education/schools
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.educationSchool",
  "displayName": "String",
  "description": "String",
  "externalSource": "String",
  "externalSourceDetail": "String",
  "principalEmail": "String",
  "principalName": "String",
  "externalPrincipalId": "String",
  "lowestGrade": "String",
  "highestGrade": "String",
  "schoolNumber": "String",
  "externalId": "String",
  "phone": "String",
  "fax": "String",
  "createdBy": {
    "@odata.type": "microsoft.graph.identitySet"
  },
  "address": {
    "@odata.type": "microsoft.graph.physicalAddress"
  }
}

响应

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

HTTP/1.1 201 Created
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.educationSchool",
  "id": "1c23c12e-c12e-1c23-2ec1-231c2ec1231c",
  "displayName": "String",
  "description": "String",
  "externalSource": "String",
  "externalSourceDetail": "String",
  "principalEmail": "String",
  "principalName": "String",
  "externalPrincipalId": "String",
  "lowestGrade": "String",
  "highestGrade": "String",
  "schoolNumber": "String",
  "externalId": "String",
  "phone": "String",
  "fax": "String",
  "createdBy": {
    "@odata.type": "microsoft.graph.identitySet"
  },
  "address": {
    "@odata.type": "microsoft.graph.physicalAddress"
  }
}