How to use SQL to get plugins license status?

New February 12, 2018

Hi Support,

How to use SQL to get plugins license status?

We want to write a groovy scripts or use rest api to get all the trial plugins license status

and before the license expire date the system will send mail to administrators automatically.

Thank you!

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2018
New February 12, 2018

Hi Support,

Is it possible to use groovy scripts to do it?

Thank you!

New February 13, 2018

Please respond. This is urgent

Thank you!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 16, 2018

Yes, you could dig through the API for pluginlicencemanger type stuff, but in this case, unusually, I'd step away from ScriptRunner, and do it over REST, as Alexey mentions. 

At a glance, it looks like you'll need SR code to get admin, iterate over the add-ons, check the licence, work out dates, and dump the results out into something you can read. 

Or, you could use a single line of code to make a REST API call to get some standardised JSON, and then a few lines of script to parse it and send emails if needed.

New February 28, 2018

Hi Support,

I use the following code:

For example:

1. http://localhost:8080/rest/plugins/1.0/  to get all jira plugin's key

2.Search for the key name: com.onresolve.jira.groovy.groovyrunner

3.Convert to expire date information

http://localhost:8080/rest/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/license

"maintenanceExpiryDateString": "30/March/18"

My question is: we have around 10 trail plugins,how could I  batch get all plugin's expire date information,thank you in advance!

New March 1, 2018

The question is urgent,please respond as soon as possible,thank you!

New March 1, 2018

????

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 3, 2018

We're not support, we're a community of end-users who try to help each other.

(and even if we were "support", what you're doing is not something support would cover - the APIs are available, it's up to you how you use them)

Also, I apologise for the slow response.  Something has gone wrong with the Community's email and I've only just been notified of your question.

The way to "batch" your queries depends on what you're using to make them.  Your code or script should issue a call to get the list, then iterate over the response, using whatever iteration methods it supports.

New March 5, 2018

It seems that it did't respond the questions.

Mayar Sahab Mohamed December 28, 2018

Please have you found any solution for this ?

Like Ramy Osama likes this
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 28, 2018

We haven't, because there was no response to the point that "The way to "batch" your queries depends on what you're using to make them.  Your code or script should issue a call to get the list, then iterate over the response, using whatever iteration methods it supports."

Like Nikita likes this
Mayar Sahab Mohamed December 28, 2018

what i actually need is to send an email to certain jira admins with the trial license status of sme plugins .

Please support and thank you for your help .Thank you

Suggest an answer

Log in or Sign up to answer