簡體   English   中英

Rest API 對於 Azure devops 日歷不工作

[英]Rest API for Azure devops calendar not working

我正在嘗試使用下面的 rest api 獲取 azure devops 中的日歷數據:

https://extmgmt.dev.azure.com/{organisation}/_apis/ExtensionManagement/InstalledExtensions/ms-devlabs/team-calendar/Data/Scopes/Default/Current/Collections/{teamId}.{monthNumber}.{year}/Documents

我嘗試了這個並替換為我的信息但收到此消息:

{
   "$id":"1",
   "innerException":null,
   "message":"%error=\"16902\";%:The collection does not exist\r\n%error=\"16902\";%:The collection does not exist",
   "typeName":"Microsoft.VisualStudio.Services.ExtensionManagement.WebApi.DocumentCollectionDoesNotExistException, Microsoft.VisualStudio.Services.ExtensionManagement.WebApi",
   "typeKey":"DocumentCollectionDoesNotExistException",
   "errorCode":0,
   "eventId":3900
}

我只想要來自 azure devops 的日歷事件。

Rest API for Azure devops 日歷不工作

您需要確保 URL 中的組織名稱正確。

我已經安裝了擴展Team Calendar ,添加一個測試事件。

然后我用 REST API 得到值:

https://extmgmt.dev.azure.com/{organisation}/_apis/ExtensionManagement/InstalledExtensions/ms-devlabs/team-calendar/Data/Scopes/Default/Current/Collections/{teamId}.{monthNumber}.{year}/Documents

{organisation}{teamId}{monthNumber}{year}替換為我的實際值:

在此處輸入圖像描述

嘗試刪除 URL 中的日期,然后像這樣使用它:

https://extmgmt.dev.azure.com/{organisation}/_apis/ExtensionManagement/InstalledExtensions/ms-devlabs/team-calendar/Data/Scopes/Default/Current/Collections/{teamId}/Documents

不同版本的擴展之間似乎有 API 的變化。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM