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
Please sign in to leave a comment.
Hello Kamil,
Here is the logic behind each field:
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.
Hi Fedor,
Thank you for quick answer!
So let me understand correctly:
Do I understand it correctly?
Additional question here, is "TC major version release date" is the same value as in "serverEffectiveReleaseDate"?
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.
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).
Yes, this check makes sense to me too.