Monitor JEMH remotely

License Status

From version 2.1.2 it is possible to query the following authenticated REST endpoint in order to determine so JEMH license status.  Due to performance caching, changes in JIRA licensing will only show some time later and/or on reinstallation/update.

The below query URL's should have the JIRA installation's "base URL" at the start.

Query

License status data can be retrieved as either JSON or XML depending on the suffix added to the REST endpoint URL:



/rest/jemh/latest/public/status/license.json





/rest/jemh/latest/public/status/license.xml



Reponse

Server Response

Details

Server Response

Details

401 Unauthorised

Valid authorisation must be provided. See JIRA REST API documentation.

404 No License Found

No JEMH license has been installed. Go to the Licensing tab to request an evaluation or paid license, or add an existing one.

200 OK

JSON

When an installed license is valid: "licenseValid": true

{ "daysToExpiry": 344, "expiryDate": "2018-01-05@00:00Z", "organisation": "The Plugin People", "serverId": "BMOX-E9OX-IC30-EKMK", "jemhTier": "250", "parentApplicationTier": "10", "licenseType": "Commercial", "parentApplicationType": "JIRA Software", "parentApplicationLicense": "COMMERCIAL", "parentApplicationOrganisation": "The Plugin People", "parentApplicationServerId": "BMOX-E9OX-IC30-EKMK", "licenseSizeMismatch": false, "licenseTypeMismatch": false, "licenseOrganisationMismatch": false, "licenseValid": true, "expired": false, "dueToExpire": false }

XML

When a license is installed and valid: <licenseValid>true</licenseValid>



Detecting Problems

The presence of any value for errorMessage is an indicator of the problem, you could also check licenseValid.

Detect renewal due

Check for  <dueToExpire>true</dueToExpire> or "dueToExpire": true

Organisation Mismatch

Here there is <licenseValid>false</licenseValid> and the errorMessage clearly explaining the problem.

Related Articles