queuedDate in the REST API

Completed

Hi, 

I'm trying to use the queued date locator with the builds rest api call to locate all builds that were started during the course of one day and I'm running into some issues.

First, if I say, use this: app/rest/builds?locator=startDate:20200302T000000%2B0800,count:25000,start:0

Now, I know that there aren't 25000 builds from that day, so, I'd expect that it would return all builds queued during that day, instead at the bottom of the results I get builds from further in the future. 

Is there an easy query I can use to grab all builds across the system from a particular day, week, month? 

 

Thanks,

James

2 comments
Comment actions Permalink

Sure, you can use conditional statements on the dates to filter the range you are looking for. For example, to get all the builds from 3/12/2020, you could use:

/app/rest/builds?locator=queuedDate:(date:20200312T200000%2B0800,condition:after)&queuedDate:(date:20200313T000000%2B0800,condition:before)

You can find more about the build locator functions here: https://www.jetbrains.com/help/teamcity/rest-api.html#RESTAPI-BuildLocator

0
Comment actions Permalink

Thanks Eric, much appreciated

0

Please sign in to leave a comment.