Hello,
I'm in the first days of running a connect add-on with a paid-by-Atlassian model.
Accessing License Details
In addition to the lic parameter, an add-on can use a REST API resource to get an instance's license for this plugin. Note, you will need to declare READ scope in order to use this resource.
The license resource is exposed as a REST resource at this URL:
https://{HOSTNAME}:{PORT}/{CONTEXT}/rest/atlassian-connect/latest/license
Among other information, the plugin can use the resource to discover:- whether the plugin license for an instance is valid
- the organisation name, SEN and contact email associated with the license
- the number of users allowed by the current license
- the expiration date of the license
- license type, such as
commercial or academic
Now, in reality here's what happens. All this in an add-on that declared the READ scope
Case 1:
Try this resource in a browser.
It correctly says that you need to issue this from an add-on. Good
Case 2:
Issue this on an instance that has your plugin installed, but the Free Trial has not been started already.
You get an error 401 : <title>Oops, you've found a dead link. - JIRA</title>
Case 3:
Issue this on an instance that has your plugin installed, and has started the Free Trial
You get this:
{"valid":true,"evaluation":true,"nearlyExpired":false,"licenseType":"DEVELOPER","creationDateString":"2014-07-25T21:06:08.585+08:00","organizationName":"[Organization]","enterprise":true}
This is the big issue I have - no contact email, no SEN, no numbers of users, no expiration date and a license type that I don't understand: DEVELOPER.
Anything I'm missing (again)?
Yves