1
votes

I am using the below url for retrieving all the CouldTests, but it is returning only top 100 records. Is it possible to retrieve all the records?.

http://{instance}/{collection}/{project}/_apis/test/runs?api-version=5.0

Any help is appreciated. Thanks in advance

For more about the above Link please refer.:https://docs.microsoft.com/en-us/rest/api/azure/devops/test/runs/list?view=azure-devops-server-rest-5.0

2

2 Answers

1
votes

it is returning only top 100 records.

This is because

On large collections, performance degrades when retrieving the later pages.

To avoid stress on the server, 100 is the default page size of REST api response which you can refer to REST API Result limit.

Is it possible to retrieve all the records?

Yes, as @Shayki Abramczyk said, the solution is to add a top parameter to select the top n records, make sure the n is bigger than the total amount of your all records.

For this solution, you can also check Limited to 100 result TFS api and Azure DevOps REST API: project count returned limited to 100.

0
votes

You can use the $top parameter in the URL:

http://{instance:/{collection}/{projects}/_apis/test/runs?api-versopn=5.0&$top=500