How can I get the start time of current running builds with TeamCity API?
Answered
I want to get the start time of a running build using the REST API. I am able to get a list of current running builds by making a request to:
app/rest/builds?locator=running:true
but the results do not contain the time the builds started. I've look through the API docs and did not see any reference to how I can obtain this information. Any help is appreciated.
Please sign in to leave a comment.
Alternatively, you can try to use "fields" feature:
app/rest/builds?locator=running:true&fields=build(id,startDate)
Ok, I realized I need to make an additional API request to get individual build details, and extract the start time from there.
Thank you Yegor. This is exactly what I was looking for :)