2
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 access all the Workitems who's iteration path= MRI_SCRUM_GIT http://apactfs.cbre.com:8080/tfs/CBRE.APAC.Applications/MRI_SCRUM_GIT/_workitems?_a=edit&id=61092
currently, i am finding a workitem number 6109 by this in postman GET

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

1 Answers

4
votes

You need to execute a query to get all the Work item for a particular Iteration path. After executing a query, get the work items using the IDs that are returned in the query results response. You can get up to 200 work items at a time. Please refer to this article:

https://www.visualstudio.com/en-us/docs/integrate/api/wit/wiql#get-work-items

The sample is as below:

POST http://apactfs.cbre.com:8080/tfs/cbre.apac.applications/_apis/wit/wiql?api-version=1.0

    Content-Type: application/json

    {
      "query": "Select [System.Id], [System.Title], [System.State] From WorkItems Where [System.IterationPath] under 'MRI_SCRUM_GIT'"
    }