Dependencies between fields returned by /app/rest/server/licensingData

Hello everyone,

I have question regarding REST API for gathering licensing data, especially regarding boolean fields returned for specific license key (https://www.jetbrains.com/help/teamcity/rest/licensekey.html#Properties)

We have `valid`, `active`, `expired` and `obsolete`, and I'm wondering when these values become false/true, and how they are connected to `maintenanceEndDate` or `expirationDate`.

I assume `expired` goes true when date goes past `expirationDate`, but what (and in what situation) happens with other fields?

Thank you in advance for response

0
5 comments
Avatar
Fedor Rumyantsev

Hello Kamil,

Here is the logic behind each field:

  • valid - the key is well-formed and readable (it may be expired or obsolete at the same time, though);
  • active - the key is actually used by the server (I believe that, for example, if you have two up-to-date server licenses at the same time only one will be actively used by TeamCity);
  • expired - the key has expired (this applies to time-limited keys like evaluation licenses);
  • obsolete - the key's maintenance period does not include the major version release date for the currently installed version of TeamCity;
  • maintenanceEndDate - used in conjunction with obsolete boolean field, shows the maintenance period end date
  • expirationDate - used in conjunction with expired boolean field, shows when the time-limited license expires

Usually, a license may be used indefinitely with the version that it covers, so in the majority of cases you may want to check the obsolete and maintenanceEndDate field values.

Please let me know if this helps.

0

Hi Fedor,

Thank you for quick answer!

So let me understand correctly:

  • valid - will be false if either "expired" or "obsolete" will be true
  • expired - will be true once current date will be later than expirationDate
  • obsolete - will be true once TC major version release date will be after "maintenanceEndDate"

Do I understand it correctly?

Additional question here, is "TC major version release date" is the same value as in "serverEffectiveReleaseDate"?

0
Avatar
Fedor Rumyantsev

Hello Kamil,

valid is not exactly correct - it will return true as long as license is readable. For example, IZAEF-889Z0-0TXDV... might be a valid license, but I-AM-DEFINITELY-NOT-A-LICENSE... is not.

In regards to serverEffectiveReleaseDate - yes, exactly, this is the date we compare maintenanceEndDate with.

0

Oh ok, to sum up use case, so if I want to check if license is working and available, I have to check if it's:

1. "expired" to false

2. "obsolete" on false,

3. and "valid" on true.

If either of those are changed to different value, means license is not working correctly (so f.e. for agent license, additional agent will not be added + additional build configurations limit will not be increased with this license).

0
Avatar
Fedor Rumyantsev
Hello Kamil,

Yes, this check makes sense to me too.
0

Please sign in to leave a comment.