2

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)

Community
  • 1
  • 1
James Watson
  • 464
  • 2
  • 11
  • 1
    The VSO REST APIs are the *VSO* REST APIs. They will arrive in on-premises TFS in the next major version. – Edward Thomson Jan 15 '15 at 18:20
  • If there *are* supported endpoints, make sure to double check the path. The default collection's name is `DefaultCollection`, not `TFS_DefaultCollection`. – Edward Thomson Jan 16 '15 at 01:45
  • As noted above, DefaultCollection doesn't work for projects (or anything else that I've tried) but TFS_DefaultCollection **does** work for projects and teams. – James Watson Jan 16 '15 at 14:41

1 Answers1

2

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.

Richard Banks
  • 12,456
  • 3
  • 46
  • 62
  • I'm just using Visual Studio Online and have nothing on premise. I get the same error. Am I misunderstanding something? – Papa Burgundy Apr 08 '15 at 16:23
  • 2
    I think I figured it out. I was looking for just a list of all work items but this only appeared to work if you include the Work Item ID's like this: DefaultCollection/_apis/wit/workitems?ids=1&api-version=1.0 – Papa Burgundy Apr 08 '15 at 16:35