How to access / query Team Foundation Server 2012 with Odata

team-foundation-servervisual studio 2012

I've tried to find a solution for this for hours now, and I'm getting the same results in the end, asking me to install a lot of Azure and other stuff, plus running some example project .sln that I can't open with my 2012 version of Visual Studio.

So, I'm pretty much stuck, and have some pretty straight forward questions regarding this:

  1. Does TFS 2012 include the Odata service in any way, so that I don't have to install it?
  2. If not, how can I install a NATIVE 2012 version of the Odata service for TFS 2012?
  3. Is it possible that I'm aiming for the wrong target here? I'm looking for a solution to the following:

I have a TFS 2012 Server that I need to be able to create Work Items on programatically, based on data from our Help Desk system. Then I need to query these Work Items for changed status since its creation, and update the Help Desk Database.

Am I better off using the "regular" TFS API? I was kinda thinking that the Odata way was more "future proof", but I'm not sure…

Best Answer

Here are some ways I have been able to accomplish similar tasks in TFS 2010 (Disclaimer: I haven't been able to try them in 2012 yet, and I'm not having luck finding 2012 documentation for this, so be careful and try them out in a test environment first):

As for the OData, I have also been struggling for the last couple of days to get that built, and have had a similar difficulty with the Azure tools. The only reason I am trying to get OData to work is for accessing TFS from mobile devices, since the TFS client API DLLs aren't portable. Brian Keller (as of Oct 2011) says the following about the OData service (see http://blogs.msdn.com/b/briankel/archive/2011/10/26/odata-service-for-team-foundation-server-2010-v1.aspx):

  • "Currently we have no plans to support true work item editing / creation"
  • "I would like to continue to iterate on this and add value over time. I should make it clear, however, that this is not an official release from the TFS engineering team. The TFS engineering team has reviewed the service and approved of the approach we are taking, but there is no official support for this service"

I share your frustration about future-proofing. As of yet I have not seen any solution that won't need adjustment in the next iteration. The closest I have come is using the TFS Client API, since I have only noticed subtle differences between 2010 and 2012.