クラスの割り当てを一覧表示する
名前空間: 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
オプションのクエリ パラメーター
このメソッドは、応答をカスタマイズするための OData クエリ パラメーターをサポートします。
このメソッドで使用できる$expandオプションは次のとおりです。categories``submissions``resources``rubric``*前のすべてのオプションが含まれます。
要求ヘッダー
| ヘッダー | 値 |
|---|---|
| Authorization | ベアラー {token}。必須。 |
要求本文
このメソッドの要求本文を指定しないでください。
応答
成功した場合、このメソッドは 200 OK 応答コードと、応答本文内の educationAssignment オブジェクトのコレクションを返します。
例
例 1: 割り当てを取得する
要求
要求の例を次に示します。
GET https://graph.microsoft.com/v1.0/education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments
応答
応答の例を次に示します。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "19002",
"addedStudentAction": "none",
"allowLateSubmissions": true,
"allowStudentsToAddResourcesToSubmission": true,
"assignDateTime": "2014-02-01T00:00:00Z",
"assignTo": {"@odata.type": "microsoft.graph.educationAssignmentRecipient"},
"assignedDateTime": "2014-02-01T00:00:00Z",
"classId": "11018",
"closeDateTime": "2014-02-11T00:00:00Z",
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "63cc91d2-59c7-4732-9594-35b91a26b340",
"displayName": null
}
},
"createdDateTime": "2014-02-01T00:00:00Z",
"displayName": "published",
"dueDateTime": "2014-02-01T00:00:00Z",
"grading": {
"@odata.type": "#microsoft.graph.educationAssignmentPointsGradeType",
"maxPoints": 100
},
"instructions": {
"contentType": "Text",
"content": "Read chapters 1 through 3"
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "63cc91d2-59c7-4732-9594-35b91a26b340",
"displayName": null
}
},
"lastModifiedDateTime": "2014-02-01T00:00:00Z",
"notificationChannelUrl": null,
"status": "published"
}
]
}
例 2: $expand オプションを使用して割り当てを取得する
要求
要求の例を次に示します。
GET https://graph.microsoft.com/v1.0/education/classes/acdefc6b-2dc6-4e71-b1e9-6d9810ab1793/assignments?$expand=resources
応答
応答の例を次に示します。割り当てごとにリソースの一覧が含まれています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 344
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#education/classes('72a7baec-c3e9-4213-a850-f62de0adad5f')/assignments(resources())",
"value": [
{
"classId": "72a7baec-c3e9-4213-a850-f62de0adad5f",
"displayName": "Test form",
"closeDateTime": null,
"dueDateTime": "2021-10-07T06:59:00Z",
"assignDateTime": null,
"assignedDateTime": null,
"allowLateSubmissions": true,
"resourcesFolderUrl": null,
"createdDateTime": "2021-10-05T16:12:02.0425967Z",
"lastModifiedDateTime": "2021-10-05T16:12:13.1121887Z",
"allowStudentsToAddResourcesToSubmission": true,
"status": "draft",
"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,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%2272a7baec-c3e9-4213-a850-f62de0adad5f%5C%22,%5C%22displayName%5C%22%3Anull,%5C%22assignmentIds%5C%22%3A%5B%5C%227e04c28e-5c5c-4fd0-ba83-62c59d196e5d%5C%22%5D%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22assignment-viewer%5C%22%7D%22,%22channelId%22%3Anull%7D",
"addedStudentAction": "none",
"id": "7e04c28e-5c5c-4fd0-ba83-62c59d196e5d",
"grading": null,
"instructions": {
"content": "",
"contentType": "text"
},
"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
}
},
"resources": []
},
{
"classId": "72a7baec-c3e9-4213-a850-f62de0adad5f",
"displayName": "Test 09.29",
"closeDateTime": null,
"dueDateTime": "2021-10-01T06:59:00Z",
"assignDateTime": null,
"assignedDateTime": null,
"allowLateSubmissions": true,
"resourcesFolderUrl": "https://graph.microsoft.com/v1.0/drives/b!OPmUsPgnBUiMIXMxWcj3neC1xck6I5NIsnFxfrLdmXoOOmEQNO79QpIMPdOmY3nf/items/01QTY63RM7P2UVIJIO3RAZYBLTBXOJRRXS",
"createdDateTime": "2021-09-29T22:19:36.2072672Z",
"lastModifiedDateTime": "2021-09-29T22:26:02.8551774Z",
"allowStudentsToAddResourcesToSubmission": true,
"status": "draft",
"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,%5C%22config%5C%22%3A%7B%5C%22classes%5C%22%3A%5B%7B%5C%22id%5C%22%3A%5C%2272a7baec-c3e9-4213-a850-f62de0adad5f%5C%22,%5C%22displayName%5C%22%3Anull,%5C%22assignmentIds%5C%22%3A%5B%5C%22c057de5a-850e-4a35-b233-daf89cd55c8b%5C%22%5D%7D%5D%7D,%5C%22action%5C%22%3A%5C%22navigate%5C%22,%5C%22view%5C%22%3A%5C%22assignment-viewer%5C%22%7D%22,%22channelId%22%3Anull%7D",
"addedStudentAction": "none",
"id": "c057de5a-850e-4a35-b233-daf89cd55c8b",
"grading": null,
"instructions": {
"content": "",
"contentType": "text"
},
"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
}
},
"resources": [
{
"distributeForStudentWork": false,
"id": "546c265e-6135-4244-83be-8ca7cdeae25e",
"resource": {
"@odata.type": "#microsoft.graph.educationWordResource",
"displayName": "Weekly Goals.docx",
"createdDateTime": "2021-09-29T22:26:02.2189853Z",
"lastModifiedDateTime": "2021-09-29T22:26:02.2189853Z",
"fileUrl": "https://graph.microsoft.com/v1.0/drives/b!OPmUsPgnBUiMIXMxWcj3neC1xck6I5NIsnFxfrLdmXoOOmEQNO79QpIMPdOmY3nf/items/01QTY63RPVL7ENX7J6RBAK5D37NEP6QO56",
"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
}
}
}
}
]
}
]
}
フィードバック
フィードバックの送信と表示