获取 educationAssignment
命名空间:microsoft.graph
获取工作分配 的属性和 关系。
学生只能看到分配给他们的作业;教师和具有应用程序权限的应用程序可以看到课程的所有作业。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | EduAssignments.ReadBasic、EduAssignments.ReadWriteBasic、EduAssignments.Read、EduAssignments.ReadWrite |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| 应用程序 | EduAssignments.ReadBasic.All、EduAssignments.ReadWriteBasic.All、EduAssignments.Read.All、EduAssignments.ReadWrite.All |
HTTP 请求
GET /education/classes/{id}/assignments/{id}
可选的查询参数
此方法支持 OData 查询参数 来帮助自定义响应。
此方法 $expand 的可用选项包括:、、 categories resources rubric submissions 和 * ,其中包括之前的所有选项。
请求标头
| 标头 | 值 |
|---|---|
| Authorization | Bearer {token}。必需。 |
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法在响应 200 OK 正文中返回 响应代码和 educationAssignment 对象。
示例
请求
下面展示了示例请求。
GET https://graph.microsoft.com/v1.0/education/classes/f4a941ff-9da6-4707-ba5b-0eae93cad0b4/assignments/3c77de7f-539b-49e1-9c96-1274f2f0ee3b
响应
下面展示了示例响应。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 279
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#education/classes('f4a941ff-9da6-4707-ba5b-0eae93cad0b4')/assignments/$entity",
"classId": "f4a941ff-9da6-4707-ba5b-0eae93cad0b4",
"displayName": "07.30 SubmissionsUploadResource Word2",
"closeDateTime": null,
"dueDateTime": "2021-08-01T06:59:00Z",
"assignDateTime": null,
"assignedDateTime": "2021-07-30T16:01:32.5518042Z",
"allowLateSubmissions": true,
"resourcesFolderUrl": "https://graph.microsoft.com/v1.0/drives/b!DPA6q59Tw0mtgmyXRUmrQRqBZTesG-lMkl1cBmvvMeU6BLWBcGc_R6UgCKyYyTin/items/016XPCQECCTNQDGB5U4RCZFBXZBV5ZX24X",
"createdDateTime": "2021-07-30T16:00:52.1918016Z",
"lastModifiedDateTime": "2021-07-30T19:39:09.6384593Z",
"allowStudentsToAddResourcesToSubmission": true,
"status": "assigned",
"notificationChannelUrl": null,
"webUrl": "https://teams.microsoft.com/l/entity/66aeee93-507d-479a-a3ef-8f494af43945/classroom?context=%7b%22subEntityId%22%3a%22%7b%5c%22version%5c%22%3a%5c%221.0%5c%22%2c%5c%22config%5c%22%3a%7b%5c%22classes%5c%22%3a%5b%7b%5c%22id%5c%22%3a%5c%22f4a941ff-9da6-4707-ba5b-0eae93cad0b4%5c%22%2c%5c%22displayName%5c%22%3anull%2c%5c%22assignmentIds%5c%22%3a%5b%5c%223c77de7f-539b-49e1-9c96-1274f2f0ee3b%5c%22%5d%7d%5d%7d%2c%5c%22action%5c%22%3a%5c%22navigate%5c%22%2c%5c%22view%5c%22%3a%5c%22assignment-viewer%5c%22%7d%22%2c%22channelId%22%3anull%7d",
"addedStudentAction": "none",
"id": "3c77de7f-539b-49e1-9c96-1274f2f0ee3b",
"instructions": {
"content": "<div style=\"font-family: inherit; font-size: inherit; color: inherit;\">upload a word document</div>",
"contentType": "html"
},
"grading": {
"@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
"maxPoints": 10
},
"assignTo": {
"@odata.type": "#microsoft.graph.educationAssignmentClassRecipient"
},
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "f3a5344e-dbde-48b0-be24-b5b62a243836",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "f3a5344e-dbde-48b0-be24-b5b62a243836",
"displayName": null
}
}
}
反馈
提交和查看相关反馈