0

In the following post uses the VSTS release API to get all the work items associated with a release: VSTS find workitems between two releases

It uses the following call:

https://{account}.vsrm.visualstudio.com/[teamproject]/_apis/Release/releases/{current release id}/workitems?api-version=4.1-preview.1&baseReleaseId={compare release id}

workitems isn't listed in the VSTS API documentation: https://learn.microsoft.com/en-us/rest/api/vsts/release/releases/get%20release?view=vsts-rest-4.1

Is there a more complete list available that I simply can't find? Is it possible to get the list of commits similar to:

enter image description here

Calidus
  • 1,374
  • 2
  • 14
  • 31

1 Answers1

2

Most of the REST APIs are documented here : Visual Studio Team Services REST API Reference

However some related REST APIs are not documented. For these REST APIs we can use tools such as Fiddler or directly press F12 - network in Chrome to track them.

Based on my test, no such a REST API can directly retrieve the compared commits from Release. Actually the different commits are retrieved by several REST APIs, get information from corresponding changesets then compare them...

So, if you want to get the different commits with REST API, you need to retrieve the changeset ID from previous release and the changeset ID in current release. then compare them.

e.g:

POST : https://{account}.visualstudio.com/{project}/_api/_versioncontrol/history?api-version=5.0-preview.1

Request Body:

{"repositoryId":"","searchCriteria":"{\"itemPaths\":[\"$/0522TFVCScrum/PS\"],\"fromVersion\":\"180\",\"toVersion\":\"183\",\"top\":50}"}

enter image description here

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55