0
我正在嘗試:不能在Microsoft圖表Explorer更新taskDetails
繼上Microsoft Graph Explorer的文檔Update taskDetails,我試圖在PATCH請求:
https://graph.microsoft.com/beta/tasks/{Id}/details
請求頭:
Content-type: application/json
Prefer: "return=represent"
If-Match: {@odata.etag from a successful prior GET on taskDetails}
請求正文:
{
"description": "My new description",
"previewType": "description",
"references": {},
"checklist": {}
}
響應:
client-request-id: {some Id}
content-type: application/json
cache-control: private
request-id: {some Id}
Status Code: 412 <--- Pre-condition not met!
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"request-id": "{some Id}",
"date": "{date}"
}
}
}
使用Chrome開發者工具來分析響應頭:
HTTP/1.1 412 Precondition Failed
Cache-Control: private
Transfer-Encoding: chunked
Content-Type: application/json
request-id: {some Id}
client-request-id: {some Id}
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West US","Slice":"SliceB","ScaleUnit":"002","Host":"AGSFE_IN_1","ADSiteName":"WST"}}
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Location, Preference-Applied, Content-Range, request-id, client-request-id
Duration: 68.3028
Date: {date}
了一份關於計劃
奇怪的是,Planner使用完全不同的API來更新taskDetails,並且沒有關於該API的文檔。
任何幫助,將不勝感激;這是我們工作流程中的程序化Planner訪問的企業部署。