Home how to get all the Task in a Workitem in Json form by postman for TFS API
Reply: 2

how to get all the Task in a Workitem in Json form by postman for TFS API

Akhil Jain
1#
Akhil Jain Published in 2018-02-14 03:30:04Z

i am currently using TFS API who's link is https://www.visualstudio.com/en-us/docs/integrate/api/wit/work-items#byids

currently in my project i want to accees the following workitem 61092 all the task http://apactfs.cbre.com:8080/tfs/CBRE.APAC.Applications/MRI_SCRUM_GIT/_workitems?_a=edit&id=61092

for that i am using this link in postman GET

http://apactfs.cbre.com:8080/tfs/cbre.apac.applications/_apis/wit/workitems/61092?$expand=all&api-version=1.0

i am getting all the task related to it but not getting all the field such as number of hours in the task,user of the task which i wanted.

and in Postman i am hitting the id by this Link By GET http://apactfs.cbre.com:8080/tfs/cbre.apac.applications/MRI_SCRUM_GIT/_workitems?_a=edit&id=61092&api-version=1.0

Cece Dong - MSFT
2#
Cece Dong - MSFT Reply to 2018-02-14 08:16:23Z

$expand=all has already expand all fields, but it doesn't show the empty fields in response. If you type a value for the field you want to get, you will see it as expect in response.

Eddie Chen - MSFT
3#
Eddie Chen - MSFT Reply to 2018-02-19 05:20:26Z

According to your screenshot, 61092 is a Product Backlog Item. The Rest API URL you use can only get the detailed information of the work item 61092 itself, it cannot get the detailed information about the work items that linked to 61092.

You have to use One-hop Query to get all the tasks related to it and then get the detailed data for each task returned. Refer to this link for details: Get Work Items.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.336844 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO