简体   繁体   中英

Rest API for Azure devops calendar not working

I am trying to get the calendar data in azure devops using the rest api below:

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

I tried this and replaced with my information but getting this message:

{
   "$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
}

I just want the calendar events from azure devops.

Rest API for Azure devops calendar not working

You need make sure you have the correct the organisation name in the URL.

I have installed the extension Team Calendar , add a event for test.

Then I use the REST API to get the value:

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

Replace the {organisation} , {teamId} , {monthNumber} , {year} with my actual values:

在此处输入图像描述

Try removing the date in the URL and then use it like this instead:

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

There seem to be a change of the API between different versions of the extension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM