Why is TFS Rest API for fetching the TFVC changesets returning only 256 items? -


why tfs rest api fetching tfvc changesets returning 256 items. tried using $top more 256 results. no use.

the api getting git repository commits working fine.

i referring https://www.visualstudio.com/en-us/docs/integrate/api/tfvc/changesets

sample request https://tfs.domain.com/tfs/defaultcollection/projectname/_apis/tfvc/changesets?$searchcriteria.fromdate=2016-07-12t17:49:01&$skip=0&$top=500

i tried without $skip , $searchcriteria.fromdate also. please me understand how results.

i managed resolve strange logic (thank msft guys rock :/). in case want changesets.

1) need first 256 changesets (i used orderby in case of different order in responses):

<projectname>/_apis/tfvc/changesets?$top=256&orderby=id desc&searchcriteria.itempath=<your_path>&api-version=1.0 

2) if have more 0 items in response last value of changesetnumber response. if 0 - got changesets.

3) next 256 items starting changesetnumber:

  <projectname>/_apis/tfvc/changesets?searchcriteria.toid=<changesetnumber>&$top=256&orderby=id desc&searchcriteria.itempath=<your_path>&api-version=1.0 

you need skip first changeset (you have value) in response.

4) go step 2

so need replace changesetid createddate , searchcriteria.toid searchcriteria.fromdate. hope solution you.

p.s. unable find feedback on connect website.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -