Create educationFeedbackResourceOutcome

Namespace: microsoft.graph

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 isn't 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.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) EduAssignments.ReadWriteBasic, EduAssignments.ReadWrite
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP request

POST /education/classes/{classId}/assignments/{assignmentId}/submissions/{submissionId}/outcomes

Request headers

Header Value
Authorization Bearer {token}. Required.
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 is an example of a request.

POST https://graph.microsoft.com/v1.0/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 is an example of 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/v1.0/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-10-21T18:58:42.019513Z",
    "id": "8c3d65c1-eacb-40f7-9360-7e47bb5b7d75",
    "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-10-21T18:58:42.0195022Z",
        "lastModifiedDateTime": "2022-10-21T18:58:42.019513Z",
        "fileUrl": "https://graph.microsoft.com/v1.0/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F8CNZWU38SarWxPyWM7jx/items/01VANVJQ5X3ULNDOWTJJEYSIBXZIK42E5G",
        "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
            }
        }
    }
}

See also

To upload an existing file, see Upload feedback files for education submissions.