Available licenses versus used up on a TeamCity server

Answered

TeamCity told there weren't enough licenses to assign to agents.  It means that all the licenses are used up. Is there any REST call that answers the number of available licenses in TeamCity server through a REST call? 

3 comments

Hello Anwin,

Currently there is no such API, please vote for the request: https://youtrack.jetbrains.com/issue/TW-29236.

For now, the list of license keys can be read from the data directory: .BuildServer\config\license.keys (or the web page can be parsed). To get the list of connected agents you can use the request:

http://teamcity:8111/httpAuth/app/rest/agents

Could you please describe your use case? Wy do you need to get this information using API?

1

Hi Alina,

Thanks for the revert. The use case is that we have a finite number of license keys with us. We authorize the build agents on the fly using one of available free license keys for builds. However, there are situations when there are no free license keys available & build agents are in wait to get authorized. In this use case, we wanted the user of the project that requested for the build (whose build is in wait) to understand (mail notice) that there are no free licenses available - hence the delay. An API query that can give us this information will really help.

Hope you understand the use case.

0

Thank you for the details. I added your use case as comment to the issue.

0

Please sign in to leave a comment.