Book Image

Microsoft Team Foundation Server 2015 Cookbook

By : Tarun Arora
Book Image

Microsoft Team Foundation Server 2015 Cookbook

By: Tarun Arora

Overview of this book

Team Foundation Server (TFS) allows you to manage code repositories, build processes, test infrastructure, and deploy labs. TFS supports your team, enabling you to connect, collaborate, and deliver on time. Microsoft's approach to Application Lifecycle Management (ALM) provides a flexible and agile environment that adapts to the needs of your team, removes barriers between roles, and streamlines processes. The book introduces you to creating and setting up team projects for scrum teams. You'll explore various source control repositories, branching, and merging activities, along with a demonstration of how to embed quality into every code check-in. Then, you'll discover agile project planning and management tools. Later, emphasis is given to the testing and release management features of TFS which facilitate the automation of the release pipeline in order to create potentially shippable increments. By the end of the book, you'll have learned to extend and customize TFS plugins to incorporate them into other platforms and enable teams to manage the software lifecycle effectively.
Table of Contents (16 chapters)
Microsoft Team Foundation Server 2015 Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Getting a Work Item by ID programmatically using the REST API


In this recipe, you'll learn how to get details of a Work Item programmatically using the WorkItemTrackingHttpClient REST API.

Getting ready

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.

How to do it…

  1. In the RESTDemo solution, set GetWorkItemById as the startup project:

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

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

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

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

How it works…

We'll go through...