2
您好我正在發出請求以圖形API(Beta)創建與受讓人的任務如下。Microsoft Graph API:任務資源(plannerTask)的任務(plannerAssignment)屬性不是norking
var settings = {
"async": true,
"crossDomain": true,
"url": "https://graph.microsoft.com/beta/planner/tasks",
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer token",
"cache-control": "no-cache",
"postman-token": "f6dd56ab-6fb4-f553-74aa-792945ba98b6"
},
"data": {"title": "testTask","planId": "rPWMLzwXlUOA33dPNU9-dWUAAoRf, "assignments": {"7d0544e0-2ed9-4aab-92a0-38efcaa292cd": {"orderHint": '5637' } } }
}
$.ajax(settings).done(function (response) {
console.log(response);
});
但它給錯誤如下,
{
"error": {
"code": "",
"message": "The request is invalid.",
"innerError": {
"request-id": "14a2ef00-a271-4be8-8197-71aa46379017",
"date": "2017-04-18T11:29:42"
},
"innererror": {
"message": "task : An error has occurred.\r\n"
}
}
}
任務資源鏈接:https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/plannertask