License endpoints
Indicium supports UI and HTTP endpoints for licensing an IAM environment. Users can use these endpoints to update the license information of their IAM environment without needing a UI.
UI endpoints
The UI page is available at <Indicium URL>/license
.
UI endpoint
If Indicium detects that the environment is not registered, it displays the link Register environment. After registering your environment, you can check for an updated license without restarting Indicium.
HTTP endpoints
/license
endpoint
You can use the /license
HTTP endpoint to fetch a JSON representation of the current status of the license.
Make sure to include an Accept
header containing application/json
in your GET
request to the endpoint:
GET /license
Accept application/json
Example responses
The license is unregistered.
200 OK
{
"state": "Unregistered",
"refresh_on": "2023-06-27T08:54:56.92Z",
"valid_until": "2023-06-27T09:04:56.92Z",
"is_updating": false,
"registration_url": "http://tcp.thinkwise.app/<rest of url>"
}The license is valid.
200 OK
{
"state": "Valid",
"refresh_on": "2023-07-27T08:53:51.1337524Z",
"valid_until": "2023-09-25T08:53:51.1337529Z",
"is_updating": false
}The license is stale because the refresh date is in the past.
200 OK
{
"state": "StaleByDate",
"refresh_on": "2023-07-25T08:53:51.1337524Z",
"valid_until": "2023-09-25T08:53:51.1337529Z",
"is_updating": false
}The license is stale because the IAM contains a model that is not part of the current license.
200 OK
{
"state": "StaleByGuid",
"refresh_on": "2023-07-27T08:53:51.1337524Z",
"valid_until": "2023-09-25T08:53:51.1337529Z",
"is_updating": false
}The license is expired.
200 OK
{
"state": "Expired",
"refresh_on": "2023-06-27T08:53:51.1337524Z",
"valid_until": "2023-07-25T08:53:51.1337529Z",
"is_updating": false
}
/license/update
endpoint
You can also trigger the check for an updated license by making a POST
request to a /license/update
endpoint.
Use this together with the Licensing:ScheduleUpdate
setting to, for example, disable the hourly update schedule
and have a Continuous Integration (CI) environment perform the update at a specific time of the day instead.
The procedure for this is as follows:
POST /license/update
Example responses
If the update completes within 10 seconds, which it should in most cases, you will receive the same response data as with a GET request to
/license
, for example:200 OK
{
"state": "Valid",
"refresh_on": "2023-08-27T08:53:51.1337524Z",
"valid_until": "2023-09-25T08:53:51.1337529Z",
"is_updating": false
}If the update somehow takes longer than 10 seconds, the client will instead receive a '201 Created' response with a 'Location' header that points to the
/license
endpoint:201 Created
Location <Indicium>/licenseNow, the client must poll the
/license
endpoint every so often until it confirms that theis_updating
property specifies 'false', to prevent queuing another license update:GET /license
Accept application/jsonIf the client is not done updating, the response will be similar to:
200 OK
{
"state": "Expired",
"refresh_on": "2023-06-27T08:53:51.1337524Z",
"valid_until": "2023-07-25T08:53:51.1337529Z",
"is_updating": true
}If the client is done updating, the response will be similar to:
200 OK
{
"state": "Valid",
"refresh_on": "2023-08-27T08:53:51.1337524Z",
"valid_until": "2023-09-25T08:53:51.1337529Z",
"is_updating": false
}