which is the best API to get all the workitem in TFS?

user8887761 Source

I want to get all the workitem and there child task currently I am using this api.

I'm getting all the workitem with there task but not getting all the fields of task.



answered 6 months ago Cece Dong - MSFT #1

Add parameter $expand=all in the api. $expand=all expands 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 expected in response.

Please notice, the Rest API URL you use can only get the detailed information of the work item itself, it cannot get the detailed information about the work items that linked to a work item.

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

comments powered by Disqus