-
Book Overview & Buying
-
Table Of Contents
Microsoft Team Foundation Server 2015 Cookbook
By :
In this recipe, you'll learn how to get details of a Work Item programmatically using the WorkItemTrackingHttpClient REST API.
Refer to instructions in the Getting ready section of the Getting build details programmatically using the REST API recipe for setup details. Download the RESTDemo solution provided with the course material. In this recipe, we'll be going through the GetWorkItemById project to get the details of a Work Item.
In the RESTDemo solution, set GetWorkItemById as the startup project:

Run the GetWorkItemById project, this will launch a console, enter the TFS server URL, and press Enter:

Enter the username and password of the user you want to connect to TFS with and press Enter:

Enter the Work Item ID you would like to query the API for:

The console outputs the details of the Work Item such as the Team Project it belongs to, its type, title, state, and created by:

We'll go through...
Change the font size
Change margin width
Change background colour