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!
You can try to use this Rest Api
https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-licenseValidator-post
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.