Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does TFS 2010 have web services one can use to query check-ins, work items, etc?

Tags:

tfs

I have figured out that TFS 2010 has the following web service endpoint

http://tfsservername:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx

Are there ones to get a feed of check-ins, work items and other TFS items?

like image 863
Matt Avatar asked Feb 03 '12 01:02

Matt


2 Answers

Just like Edward mentioned, the TFS web services aren't meant for public consumption.

On the other hand, you might want to give the "OData Service for Team Foundation Server" a try.

It offers a really nice REST-like interface - thus callable simply by issuing HTTP requests, just like you were willing to do with the web services.

To learn more, check this blog post: http://blogs.msdn.com/b/briankel/archive/2011/10/26/odata-service-for-team-foundation-server-2010-v1.aspx

like image 28
Igor Abade Avatar answered Oct 15 '22 21:10

Igor Abade


Update: yes! Visual Studio Online introduced a new REST API, and on-premises installations of TFS 2013 have access to this new API.

In versions of TFS prior to TFS 2013:

tl;dr: Not in any way you're going to want to consume.

Team Foundation Server does expose SOAP web services that the clients use to talk to it. However, it's not something that is publicly documented, it's not supported by Microsoft (meaning they can, and will, change version to version) and, quite frankly, it's remarkably unlikely that the effort required will be worth the result.

Although the web services are well designed, some of the web services require a significant amount of client state. This is particularly true of the work item tracking web services. The clients basically contain an entire "rules engine" for processing and verifying changes to any fields. The client must, basically, be able to understand the process template and process all these state changes before submitting an updated work item back to the server. The server will also run the rules and verify that the client made only legal changes.

The rules engine is not exposed publicly. You would have to reverse engineer it.

This also makes some underlying assumptions like your web services stack can successfully speak NTLM2 and Kerberos properly (most can't, outside of the .NET web services stack, although some an support NTLM version 1 to some degree, which will only give you the illusion that you should be authenticating.)

It's therefore strongly suggested that you just use one of Microsoft's APIs for accessing TFS, either the .NET or the Java SDK.

(I actually worked for a third-party company that successfully wrote a Java front-end to TFS by talking to the web services. It was a fair challenge for us -- especially the work item implementation -- and this was the full-time job for several of us. I wouldn't recommend it as a side project.)

like image 91
Edward Thomson Avatar answered Oct 15 '22 20:10

Edward Thomson