0

I'm trying to get historical data from a server in Team Foundation server 2013, does someone know how? In TFS 2015 there is a way with AsOf but it doesn't work in the 2013 version.

weegee
  • 3,256
  • 2
  • 18
  • 32

2 Answers2

0

In TFS2013, you need work with TFS API to get work item historical data. You should use the WorkItem.Revisions property.

var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("http://tfsservername:8080/tfs/defaultcollection"));
var service = tfs.GetService<WorkItemStore>();
var wi = service.GetWorkItem(workitemid);
foreach (Revision revision in wi.Revisions)
{
    //historical data
}

Have a check on this blog for the details: http://geekswithblogs.net/TarunArora/archive/2011/08/21/tfs-sdk-work-item-history-visualizer-using-tfs-api.aspx

weegee
  • 3,256
  • 2
  • 18
  • 32
Vicky - MSFT
  • 4,970
  • 1
  • 14
  • 22
0

Turns out, what I wanted was an endpoint.

I found one, it needs to be formatted to use the data that is there: #{server_url}/_api/_wit/workitems?ids=#{workItem_id}

weegee
  • 3,256
  • 2
  • 18
  • 32