TFS 2018 REST API Call for Backlogs // API Version 4.1 - rest

we have TFS 2018 and are able to call the following URL using PAT for authorization:
https://our.tfs/tfs/Our.Project.Collection/Our Team Project/_apis/wit/workitems?ids=1234&?api-version=2.0
This quite basic call returns expected results.
Trying to request API calls from the following documentation results always in 404 Page not found:
https://learn.microsoft.com/de-de/rest/api/vsts/work/backlogs/list?view=vsts-rest-4.1
For example:
https://our.tfs/tfs/Our.ProjectCollection/Our Team Project/_apis/work/backlogs?api-version=4.1
which yields the mentioned 404 error.
According Microsoft, the API is supported in version 4.0 on TFS 2018:
https://learn.microsoft.com/en-us/vsts/integrate/concepts/rest-api-versioning?view=tfs-2018
However, it seems calling the API in version 4.1 in the way the documentation describes it here only works for VSTS but not for TFS
Do I understand it correctly that any API calls to API version greater than 4.0 are currently only supported by VSTS but not on TFS on prem?
This would mean we have to live with API calls documented in the "Previous REST API Versions" when using TFS 2018 on prem?

The REST API format you used is incorrect, you missed the Team parameter
The format should be:
GET http://tfs2018:8080/tfs/DefaultCollection/{Project}/{Team}/_apis/work/backlogs?api-version=4.1-preview.1
It works without any issue on my side.

I believe you will get something by taking a look at these links, see
Visual Studio Team Services REST API Reference
REST API Overview for Visual Studio Team Services and Team Foundation Server
I was able to follow this example:
https://{instance}[/{collection}[/{team-project}]/_apis[/{area}]/{resource}?api-version={version}
see what Microsoft speaks about version 4.1 of this doc.
APIs e uso REST comuns
Discussion on TFS MS Apis
Similar discussion
Hugs

Related

Member Entitlement Management VSTS API

I have been trying to work with the Member Entitlement Management VSTS API in Visual Studio. I am attempting to get the user entitlement summary, and am receiving an API locator error.
http://Microsoft.VisualStudio.Services.WebApi.VssResourceNotFoundException : API resource location 5ae55b13-c9dd-49d1-957e-6e76c152e3d9 is not registered on https://tfs-test/tfs.
I have attempted to add the collection to the URL and dress it up as much as I can like the REST API call on the MSDN page, but am having no luck. I have noticed that the MSDN page has a section on oauth2, but I have been using a PAT. I cannot find any reference to oauth2 for on-prem TFS 2018, is this not possible?
MSDN - Get User Summary API
For this issue , it is because User Entitlement Summary - Get rest api is only available for VSTS(azure devops), does not support on-premise TFS. TFS APIs currently doesn't support to get access level.
When you switch the rest api version to TFS2018 U2, you will get this prompt:
The requested page is not available for Team Foundation Server 2018
U2. You have been redirected to the newest product version this page
is available for.
You can refer to this case for the similar issue.

TFS 2013 rest api basic authentication is not working

I've tried to get the projects from the TFS on-premise version using below API,
http://tfs2013.ilinktrichy.com:8080/tfs/{organization}/_apis/projects?api-version=1.0
Used the basic authentication and enabled the basic authentication in IIS as well. Still am getting 401 unauthorized issue.
Do i need to do any other changes on IIS?
This is an easy answer, but you're not going to like it.
TFS 2013 did not have REST APIs. They were introduced in TFS 2015.
You can use the old SOAP .NET client for automating tasks against TFS 2013, or (better yet) you can upgrade to a modern version.
update
What I said is not entirely accurate: some of the APIs were present in 2013, but they were not officially introduced until 2015 and are thus largely undocumented and totally unsupported.

How to update generated AutoRest code, after server REST API changed?

Context
I am writing client code to access Web API REST service. I am using typed client classes by using Visual Studio 2015 "Add"/"REST API client..."
Now the serverside API changed and I would like to update my generated client code accordingly.
Question
Besides of the obvious solution of deleting all the generated classes, then starting the Visual Studio 2015 "Add"/"REST API client..." from ground zero, is there any better way to do this?

Is "2013-08" the latest Azure Notification Hubs REST API version or is the documentation outdated?

I'm wondering if the Azure Notification Hubs REST API documentation is still correct and up-to-date or if there is already a newer API version than "2013-08" that can be used.
All the single pages show "Updated: February 26, 2015", but I guess it was just a meta data update of all the pages, since the API version didn't change, it's still "2013-08".
Here (and here) is an example for the REST API usage from Elio Damaggio which uses "2013-10" as the api version.
I tried all possible api version values in the format "yyyy-mm" from "2013-10" to "2015-03" and the following were working: "2013-10", "2014-01", "2014-05", "2014-08", "2014-09", "2015-01".
Does anyone use a newer API version than "2013-08" or does anyone know anything about a newer API version or documentation? Specifically, does anyone know if there is a documentation for a newer API version, e.g. "2015-01", or at least a changelog?
Got an answer on MSDN forums:
The latest version is 2015-01. All or most of features works with
starting version 2013-08.
Version in documentation indicates that minimum version required for
working that feature. Hence, all documentation is pointing to 2013-08.
...
Yes, you can use version 2015-01 instead of 2013-08. There won’t be
any difference because we didn’t do any breaking changes from 2013-08.
All the features works from version 2013-08.
Moreover, the source code for the Java REST wrapper for Windows Azure Notification Hubs on github seems to be a good reference. It is using api version "2014-09", not "2015-01" right now, but at least it includes the registration code for Amazon Device Messaging and Baidu Cloud Push which are currently missing in the REST API documentation.

TFS VSO REST API workitems (wit) paths give 404 errors

I recently discovered that TFS has a RESTFul API and I am trying to pull information about workitems based on the documentation here: Work Items
I've been able to get information about projects using this path:
[host]/tfs/TFS_DefaultCollection/_apis/projects
but when I try
[host]/tfs/TFS_DefaultCollection/_apis/wit/workitems
or
[host]/tfs/TFS_DefaultCollection/_apis/wit/workitems?version=1.0-preview
I get a 404 error. I've tried a bunch of things based on various examples but I've not yet gotten anything back for any URI under the /wit/ path.
This question has an answer that suggests that this feature may not yet be supported in on-premises installations. Has anyone gotten this to work? There's a blurb about how you can get a 404 if you don't have premissions on the main REST Basics page for TFS. Is there some authorization setting required or am I just going to have to wait for a later version? We are running 2013 (Version 12.0.31101.0)
You're getting a 404 because those particular APIs aren't in the on-premise TFS 2013 product. They APIs are available from TFS 2015 CTP1 onwards.