TeamCity REST plugin to expose licenses information

Hi,

I'm working on extending TeamCity's REST plugin in order to expose information about its licenses (License key, number of build configurations, number of agents, type, generation date, end of maintenance and expiration date). This feature was already requested (http://youtrack.jetbrains.com/issue/TW-29236) some time ago.

I've already managed to do it by parsing HTML from licenses list page on TC admin page (but it requires passing credentials for authorization to TC license page, script will probably require updates for all TeamCity script upgrades which can modify HTML structure of this page), I don't think this is best approach for this so I've decided to try with some alternatives. Unfortunately I couldn't find any method in openapi which allows me to read all those information. Best thing I've found was LicensingPolicy interface which contains some information about licenses but that is not exactly what I wanted to achieve.I know that license keys is contained in .BuildServer\config\license.keys but there is no information about licenses expiration dates. I've also thought about query TC database to find information about licenses but I couldn't find any records containing information about licenses.

Do you have any idea where can I find those in database? Maybe there is some other way to create such REST method? I guess this method would be pretty useful for everyone who has to maintain licenses on multiple TeamCity instances.
2 comments
Comment actions Permalink

Hi Wojciech,

Sorry for the delay in replying.

Listing license keys is not exposed via open API, but can be retrieved via closed API.
I will look what can I do to help you with the task and will post a comment to the issue http://youtrack.jetbrains.com/issue/TW-29236

0
Comment actions Permalink

Unfortunately, my investigation showed that there is no way to get the license keys information from a not-bundled plugin, so I am affraid parsing the license page is the easiest way until http://youtrack.jetbrains.com/issue/TW-29236 is implemented.

0

Please sign in to leave a comment.