0
votes

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.

enter image description here 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

2

2 Answers

0
votes

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.

-1
votes

$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.