{"id":2765,"date":"2019-04-03T18:22:29","date_gmt":"2019-04-04T01:22:29","guid":{"rendered":"https:\/\/developer.microsoft.com\/en-us\/office\/blogs\/?p=2765"},"modified":"2019-04-03T18:22:29","modified_gmt":"2019-04-04T01:22:29","slug":"breaking-change-education-api-updates-in-microsoft-graph-beta","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/breaking-change-education-api-updates-in-microsoft-graph-beta\/","title":{"rendered":"Breaking change: Education API updates in Microsoft Graph beta"},"content":{"rendered":"<p>We are announcing several changes to the education API\u00a0in Microsoft Graph beta, including a breaking change related to submissions. This change will affect existing applications that get and update submissions. This change is a step toward exposing rubrics in Microsoft Graph in the future.<\/p>\n<h2>Breaking change to submissions<\/h2>\n<p>We will be deploying a <strong>breaking change<\/strong> to the <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/educationsubmission-get?view=graph-rest-beta\">Get submission<\/a>, <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/educationassignment-list-submissions?view=graph-rest-beta\">List submissions<\/a>, and <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/educationsubmission-update?view=graph-rest-beta\">Update submission<\/a> APIs in the Microsoft Graph beta endpoint. We expect the breaking change to be fully deployed by the end of April 2019. These changes are part of steps to expose rubrics in Microsoft Graph and will affect existing applications that are getting and updating submissions.<\/p>\n<p>The following are the updates:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/educationsubmission-get?view=graph-rest-beta\">Get submission<\/a>, <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/educationassignment-list-submissions?view=graph-rest-beta\">List submissions<\/a>: A submission will no longer return with the following properties: <strong>feedback<\/strong><em>, <\/em><strong>publishedFeedback<\/strong><em>, <\/em><strong>grade<\/strong><em>, <\/em><strong>publishedGrade<\/strong>. Instead, a submission will return with a single <strong>outcomes <\/strong>property. The <strong>outcomes <\/strong>property is a list that contains any number of <strong>outcome <\/strong>objects. An <strong>outcome <\/strong>is the result of a submission, and one of each type of outcome can be contained within the <strong>outcomes\u00a0<\/strong>list. We support any combination of supported outcome types, and you do not need to have all of them. Currently, we support the following types of <strong>outcomes<\/strong>: feedback and points (formerly grade).\n<ul>\n<li>A submission can be expanded ($expand = outcomes<em>)<\/em> to fetch the <strong>outcomes<\/strong> field. If <strong>outcomes<\/strong> is not expanded, a submission will not have the <strong>outcomes<\/strong> property (and due to this change, will also not have <strong>feedback<\/strong> or <strong>grade<\/strong> properties).<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/educationsubmission-update?view=graph-rest-beta\">Update submission<\/a><em>:<\/em>\u00a0This method will no longer update the\u00a0<strong>feedback<\/strong> or <strong>grade<\/strong> properties. You can update these values via Update outcomes (as described later in this post).<\/li>\n<\/ul>\n<p>Eventually, when rubrics are exposed in Microsoft Graph, you will be able to get an update a rubric outcome via the <strong>outcomes<\/strong> list on the submission.<\/p>\n<h3><strong>Get submission &#8211; current behavior<\/strong><\/h3>\n<p>Request<\/p>\n<pre class=\"lang:default decode:true \">GET https:\/\/graph.microsoft.com\/beta\/Education\/classes\/{id}\/assignments\/{id}\/submission\/{id}<\/pre>\n<p>Response<\/p>\n<p>Submission with the following properties: <strong>feedback<\/strong>, <strong>publishedFeedback<\/strong>, <strong>grade<\/strong>, <strong>publishedGrade<\/strong><\/p>\n<h3><strong>Get submission &#8211; new behavior<\/strong><\/h3>\n<p>Request<\/p>\n<pre class=\"lang:default decode:true \">GET https:\/\/graph.microsoft.com\/beta\/Education\/classes\/{id}\/assignments\/{id}\/submission\/{id}\/?$expand=outcomes<\/pre>\n<p>Response<\/p>\n<p>Submission WITHOUT the following properties: <strong>feedback<\/strong>, <strong>publishedFeedback<\/strong>, <strong>grade<\/strong>, <strong>publishedGrade<\/strong>.\u00a0Submission WITH the following property: outcomes<\/p>\n<h3><strong>List submissions &#8211; current behavior<\/strong><\/h3>\n<p>Request<\/p>\n<pre class=\"lang:default decode:true \">GET https:\/\/graph.microsoft.com\/beta\/Education\/classes\/{id}\/assignments\/{id}\/submission\/<\/pre>\n<p>Response<\/p>\n<p>Submission with the following properties: <strong>feedback<\/strong>, <strong>publishedFeedback<\/strong>, <strong>grade<\/strong>, <strong>publishedGrade<\/strong><\/p>\n<h3><strong>List submission &#8211; new behavior<\/strong><\/h3>\n<p>Request<\/p>\n<pre class=\"lang:default decode:true \">GET https:\/\/graph.microsoft.com\/beta\/Education\/classes\/{id}\/assignments\/{id}\/submission\/?$expand=outcomes<\/pre>\n<p>Response<\/p>\n<p>Submissions, where each submission lacks the following properties: <strong>feedback<\/strong>, <strong>publishedFeedback<\/strong>, <strong>grade<\/strong>, <strong>publishedGrade<\/strong>. Submissions, where each submission has the following property: <strong>outcomes.<\/strong><\/p>\n<h3><strong>Update submission &#8211; current behavior<\/strong><\/h3>\n<p>Request<\/p>\n<pre class=\"lang:default decode:true \">PATCH https:\/\/graph.microsoft.com\/beta\/Education\/classes\/{id}\/assignments\/{id}\/submission\n{\n\t\"feedback\": {\n\t\t\"text\": {\n\t\t\t\"contentType\":\"text\",\n\t\t\t\"content\": \"Needs work\"\n\t\t}\n\t}\n}<\/pre>\n<p>Response<\/p>\n<p>Ability to patch submission on the following properties: <strong>feedback<\/strong>, <strong>publishedFeedback<\/strong>, <strong>grade<\/strong>, <strong>publishedGrade<\/strong><\/p>\n<h3><strong>Update submission &#8211; new behavior<\/strong><\/h3>\n<p>Request<\/p>\n<pre class=\"lang:default decode:true \">PATCH https:\/\/graph.microsoft.com\/beta\/Education\/classes\/{id}\/assignments\/{id}\/submission\/{id}\/outcomes\/{id}\n{\n\t\"@odata.type\": \"#microsoft.education.assignments.api.educationFeedbackOutcome\",\n\t\"feedback\": {\n\t\t\"text\": {\n\t\t\t\"contentType\":\"text\",\n\t\t\t\"content\": \"Needs work\"\n\t\t}\n\t}\n}<\/pre>\n<p>Response<\/p>\n<p>Ability to patch one outcome at a time per unique submission. For example, if you want to update both feedback and points, you will need to make two separate calls \u2013 one to update the feedback outcome, and one to update the points outcome. You will be able to find the <strong>outcomeId<\/strong> you want to update by getting the submission.<\/p>\n<h2>Assignment categories<\/h2>\n<p>We are exposing assignment categories in the Microsoft Graph beta endpoint. We now support the following Microsoft Graph calls:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/educationassignment-list-categories?view=graph-rest-beta\">List categories<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/educationassignment-add-categories?view=graph-rest-beta\">Add category<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/educationassignment-remove-category?view=graph-rest-beta\">Remove\u00a0category<\/a><\/li>\n<\/ul>\n<h2>Forms resource<\/h2>\n<p>We are exposing Microsoft Forms as a resource through the Microsoft Graph API. A Microsoft Forms resource is currently served as a hyperlink (URL). The\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/resources\/educationformresource?view=graph-rest-beta\"><strong>formResource<\/strong><\/a>\u00a0resource in Microsoft Graph beta exposes its own custom properties.<\/p>\n<h3><strong>Get assignment &#8211; current behavior<\/strong><\/h3>\n<p>Request<\/p>\n<pre class=\"lang:default decode:true \">GET\u00a0https:\/\/graph.microsoft.com\/beta\/Education\/classes\/{id}\/assignments\/{id}<\/pre>\n<p>Response<\/p>\n<p>Assignment with forms resource has the following property:<\/p>\n<pre class=\"lang:default decode:true \">fileUrl<\/pre>\n<h3><strong>Get assignment &#8211; new behavior<\/strong><\/h3>\n<p>Request<\/p>\n<pre class=\"lang:default decode:true \">GET\u00a0https:\/\/graph.microsoft.com\/beta\/Education\/classes\/{id}\/assignments\/{id}<\/pre>\n<p>Response<\/p>\n<p>Assignment with forms resource will have the following resource properties:<\/p>\n<pre class=\"lang:default decode:true  \">\"resource\":{\n\t\"@odata.type\":\"#microsoft.education.assignments.api.educationFormResource\",\n\t\"displayName\":\"\",\n\t\"createdDateTime\":\"2019-04-01T22:01:38.2604366Z\",\n\t\"lastModifiedDateTime\":\"2019-04-01T22:01:38.2614376Z\",\n\t\"originalFormId\":\"\",\n\t\"formId\":\"\",\n\t\"isGroupForm\":true,\n\t\"viewUrl\":\"\",\n\t\"editUrl\":\"\",\n\t\"createdBy\":{\n\t\t\"application\":\"\",\n\t\t\"device\":\"\",\n\t\t\"user\":{\n\t\t\t\"id\":\"\",\n\t\t\t\"displayName\":\"\"\n\t\t}\n\t},\n\t\"lastModifiedBy\":{\n\t\t\"application\":\"\",\n\t\t\"device\":\"\",\n\t\t\"user\":{\n\t\t\t\"id\":\"\"\n\t\t\t\"displayName\":\"\"\n\t\t}\n\t}\n}<\/pre>\n<p>Notes:<\/p>\n<ul>\n<li><strong>viewUrl <\/strong>is the URL for students and <strong>editUrl <\/strong>is the URL for teacher(s).<\/li>\n<li><strong>originalFormId <\/strong>refers to the form that this form was cloned from for this assignment.<\/li>\n<li><strong>formId <\/strong>refers to the cloned form.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We are announcing breaking changes in the Assignments Education API related to updates in Microsoft Graph beta<\/p>\n","protected":false},"author":69077,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-2765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph"],"acf":[],"blog_post_summary":"<p>We are announcing breaking changes in the Assignments Education API related to updates in Microsoft Graph beta<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/2765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69077"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=2765"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/2765\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=2765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=2765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=2765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}