1

I have created a TFS build using TFVC as a source code repository. Now, I want to get a full information on all changesets that happened among previous and current build.

Any rest api for this ?

Same sort of thing is available in jenkins using following rest api http://server:port/job/jobname/lastBuild/api/xml

2 Answers2

0

According to get list of changesets rest api

GET https://{instance}/DefaultCollection/_apis/tfvc/changesets?api-version={version}

There are multiple options such as by item path, by person. However it's not able to do what you want directly.

You could use in a date range option. Then you just need to get the starttime and finshtime of your previous and current build through this API- Get build details by Timeline

GET https://{instance}/DefaultCollection/{project}/_apis/build/builds/{buildId}/timeline?api-version={version}
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
0

You can use Get build details - Changes in VSTS Rest API.

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
  • As per API URL, https://{instance}/DefaultCollection/{project}/_apis/build/builds/{buildId}/changes?api-version={version} , we need buildId. How to get that ? – Salman Patel Mar 15 '17 at 08:53
  • @SalmanPatel Get the build definition ID via https://www.visualstudio.com/en-us/docs/integrate/api/build/definitions#get-a-list-of-build-definitions first and then get build ID via https://www.visualstudio.com/en-us/docs/integrate/api/build/builds#get-a-list-of-builds – Eddie Chen - MSFT Mar 15 '17 at 08:59