Create educationFeedbackResourceOutcome
Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Create a new feedback resource for a submission. Only a teacher can perform this operation.
To create a new file-based resource, upload the file to the feedback resources folder associated with the assignment. If the file doesn't exist or is not in that folder, the POST
request will fail.
Important
Before you can upload an assignment feedback resource, you must set up the feedback resources folder for the educationAssignment to upload the files to.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ❌ | ❌ | ❌ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | EduAssignments.ReadWrite | Not available. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | EduAssignments.ReadWrite.All | Not available. |
HTTP request
POST /education/classes/{classId}/assignments/{assignmentId}/submissions/{submissionId}/outcomes
Request headers
Header | Value |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-Type | application/json |
Request body
In the request body, supply a JSON representation of an educationFeedbackResourceOutcome object.
Response
If successful, this method returns a 201 Created
response code and an educationFeedbackResourceOutcome object in the response body.
This method returns a 400 Bad Request
when the submission has exceeded more than five feedback resources.
Example
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/a3cce0ba-2008-4c4d-bf62-079408562d96/submissions/2185e6d7-2924-4ed1-dde1-269f89e29184/outcomes
Content-type: application/json
{
"@odata.type": "#microsoft.graph.educationFeedbackResourceOutcome",
"feedbackResource": {
"@odata.type": "#microsoft.graph.educationWordResource",
"displayName": "Document1.docx"
}
}
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/education/classes('37d99af7-cfc5-4e3b-8566-f7d40e4a2070')/assignments('a3cce0ba-2008-4c4d-bf62-079408562d96')/submissions('2185e6d7-2924-4ed1-dde1-269f89e29184')/outcomes/$entity",
"@odata.type": "#microsoft.graph.educationFeedbackResourceOutcome",
"lastModifiedDateTime": "2022-05-06T00:50:30.0772434Z",
"id": "ba12f282-2190-4958-80b3-42b8afb9626a",
"resourceStatus": "notPublished",
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "cb1a4af3-0aba-4679-aa12-9f99bab0b61a",
"displayName": null
}
},
"feedbackResource": {
"@odata.type": "#microsoft.graph.educationWordResource",
"displayName": "Document1.docx",
"createdDateTime": "2022-05-06T00:50:30.0772177Z",
"lastModifiedDateTime": "2022-05-06T00:50:30.0772434Z",
"fileUrl": "https://graph.microsoft.com/beta/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F8CNZWU38SarWxPyWM7jx/items/01VANVJQZQ33I4AJBSURHZJDDQKEJ5TEMJ",
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "cb1a4af3-0aba-4679-aa12-9f99bab0b61a",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "cb1a4af3-0aba-4679-aa12-9f99bab0b61a",
"displayName": null
}
}
}
}
Related content
To upload an existing file, see Upload feedback files for education submissions.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for