How to get the correct internal build ID of a running build?

I have multiple users using the same faceless credentials and running the same build configuration.  It is possible that two users could start the same build configuration at almost the same time.  How do I get the correct internal build ID of each build for each user ( who are both using the same credentials)?  If the internal build ID was returned to the user upon triggering the build, this would solve my problem.  But I do not get this information as a response to triggering a build.  I must request this information using the REST API ( using attribute 'running' and buildTypeId and selecting the latest one from the list returned ) after the build was triggered.  In the meantime, another user could trigger the same build configuration, making my build one behind the latest.

Please sign in to leave a comment.