Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the format for the minTime URI parameter in the VSTS REST API, Builds - List?

Tags:

azure-devops

Given a VSTS REST API call like this:

https://*account*/*project*/_apis/build/builds?definitions=2&minTime=????queryOrder=startTimeDescending&api-version=4.1

What is the correct datetime format for the minTime value? Everything I have tried either returns all builds, or none, and is not filtering by date. For example, I have tried "31/08/2018", "2018-08-31T12:01:31.450Z", "08/31/2018". The format is not documented anywhere that I can see.

like image 547
Polyfun Avatar asked Dec 17 '25 15:12

Polyfun


1 Answers

The format for minTime should be YYYY-MM-DD.

So the request URL looks like:

https://marinaliu.visualstudio.com/Git2/_apis/build/builds?definitions=41&queryOrder=queueTimeDescending&minTime=2018-09-01&api-version=4.1

Note: when you specify minTime in the request url, it's not working to specify queryOrder with startTimeDescending. Instead, you can remove &queryOrder=startTimeDescending from url, or you can replace with queueTimeDescending.

like image 112
Marina Liu Avatar answered Dec 20 '25 10:12

Marina Liu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!