0

I started using azure git diff api, to find out the difference between two branches.

My problem is I can not able the whole set of difference between the two base and target branch.

I read somewhere in the document that default 100 diff we can get(not able to find that page again), Can anyone tell me how to remove this limitation when we use this API call for diff.

Indrajeet Gour
  • 4,020
  • 5
  • 43
  • 70

1 Answers1

1

You have a URL parameter $top, is the maximum number of changes to return. defaults to 100.

So, you can add $top=500 for example, to get the 500 changes.

GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/diffs/commits?&$top=500&api-version=5.1
Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114