-1

I'm using TeamCity 8.1.2 REST API and I want to check if there is a running build in my build configuration.

To get builds in a queue I can use the following request:

> http://<tc_address>/app/rest/latest/buildQueue/?locator=buildType:<my_buildTypeId>

It returns the builds in the queue but not the running one.

Accroding to documentation https://confluence.jetbrains.com/display/TCD8/REST+API to get running builds this request can be used:

> http://<tc_address>/app/rest/builds/?locator=buildType:<my_buildTypeId>,running:true

But it returns no builds. I tried

http://<tc_address>/app/rest/builds/?locator=running:true

which returns running builds from other build configuration but the running build from my build configuration is not listed.

user2250152
  • 14,658
  • 4
  • 33
  • 57

1 Answers1

0

Your API call is correct but seems like you are missing some configuration.

Check below setting for the given issue :

-> Go to Build Configuration

    -> Edit Configuration Settings

        -> General Settings

            -> Build options

                -> Enable status widget [Check this checkbox]

after that check API call

Nirav Mistry
  • 949
  • 5
  • 15
  • Enable status widget is already checked. I don't think that it's related to REST API. – user2250152 Mar 03 '20 at 07:14
  • Check the use of [Status-Widget](https://www.jetbrains.com/help/teamcity/2019.2/configuring-general-settings.html#ConfiguringGeneralSettings-EnableStatusWidget) – Nirav Mistry Mar 03 '20 at 07:56