How do you find out if an add-on is incompatible or has an available update via the REST API?

Logan Hawkes
Contributor
September 9, 2020

I'm writing a tool to analyze installed add-ons in Jira instances and I've hit a wall. How do you determine through the REST API if an add-on is incompatible or has an available update? In the GUI, If I generate a link to the add-on's entry in the Atlassian Marketplace and pull that data, I get a ton more information, but nothing to indicate that an update is available.

For example, in the GUI, the entry for "SSO for Atlassian Data Center" says there's an update available. I have v 4.0.1 installed. The latest is 4.1.0. I don't see anything in the output from a REST call to indicate this. 

GET http://localhost:8080/rest/plugins/1.0/

{'description': 'Provides Single Sign-on capabilities',
'enabled': True,
'key': 'com.atlassian.plugins.authentication.atlassian-authentication-plugin',
'links': {'manage': 'http://localhost:8080/plugins/servlet/upm?fragment=manage%2Fcom.atlassian.plugins.authentication.atlassian-authentication-plugin',
'modify': '/rest/plugins/1.0/com.atlassian.plugins.authentication.atlassian-authentication-plugin-key',
'plugin-icon': '/rest/plugins/1.0/com.atlassian.plugins.authentication.atlassian-authentication-plugin-key/media/plugin-icon',
'plugin-logo': '/rest/plugins/1.0/com.atlassian.plugins.authentication.atlassian-authentication-plugin-key/media/plugin-logo',
'plugin-summary': '/rest/plugins/1.0/com.atlassian.plugins.authentication.atlassian-authentication-plugin-key/summary',
'self': '/rest/plugins/1.0/com.atlassian.plugins.authentication.atlassian-authentication-plugin-key'},
'name': 'SSO for Atlassian Data Center',
'optional': True,
'remotable': False,
'static': False,
'unloadable': False,
'userInstalled': False,
'usesLicensing': False,
'vendor': {'link': 'https://www.atlassian.com/',
'marketplaceLink': 'https://www.atlassian.com/',
'name': 'Atlassian'}



If I generate a link to the add-on's entry in the Atlassian Marketplace and pull that data, I get a ton more information, but nothing to indicate that an update is available.



GET /rest/plugins/1.0/com.atlassian.plugins.authentication.atlassian-authentication-plugin-key/license


'marketplaceData': {'_embedded': {'categories': [{'_links': {'self': {'href': '/rest/2/addonCategories/4'}},
'name': 'Integrations'}],
'distribution': {'bundled': True,
'bundledCloud': False,
'downloads': 0,
'totalInstalls': 0,
'totalUsers': 0},
'logo': {'_links': {'highRes': {'href': 'https://marketplace-cdn.atlassian.com/files/images/ab436e9b-c6ac-437d-86b8-c23d1307d503.png',
'type': 'image/png'},
'image': {'href': 'https://marketplace-cdn.atlassian.com/files/images/0583178d-bf61-47f5-9b6f-24816e7c97cd.png',
'type': 'image/png'},
'self': {'href': '/rest/2/assets/images%2Fab436e9b-c6ac-437d-86b8-c23d1307d503.png'},
'smallHighResImage': {'href': 'https://marketplace-cdn.atlassian.com/files/images/ef4f474b-3c89-434f-860b-c032e436ccb2.png',
'type': 'image/png'},
'smallImage': {'href': 'https://marketplace-cdn.atlassian.com/files/images/1bf92bb2-7834-4247-8185-ef2beafe2c23.png',
'type': 'image/png'},
'unscaled': {'href': 'https://marketplace-cdn.atlassian.com/files/images/ab436e9b-c6ac-437d-86b8-c23d1307d503.png',
'type': 'image/png'}}},
'reviews': {'averageStars': 2.4285714626312256,
'count': 7},
'vendor': {'_embedded': {'logo': {'_links': {'highRes': {'href': 'https://marketplace-cdn.atlassian.com/files/images/9af2fc0b-763b-4799-bf9d-31de32c16d25.png',
'type': 'image/png'},
'image': {'href': 'https://marketplace-cdn.atlassian.com/files/images/728962a8-1879-4c5d-bb4d-274c6d79c5be.png',
'type': 'image/png'},
'self': {'href': '/rest/2/assets/images%2F2ff71efc-1929-4452-b124-dab6bb0524ac.png'},
'smallHighResImage': {'href': 'https://marketplace-cdn.atlassian.com/files/images/89119777-d9d0-4d58-a226-896ff219104d.png',
'type': 'image/png'},
'smallImage': {'href': 'https://marketplace-cdn.atlassian.com/files/images/ffcba82f-8691-41fe-b037-a4bce85fd0e4.png',
'type': 'image/png'},
'unscaled': {'href': 'https://marketplace-cdn.atlassian.com/files/images/2ff71efc-1929-4452-b124-dab6bb0524ac.png',
'type': 'image/png'}}}},
'_links': {'alternate': {'href': '/vendors/85/atlassian',
'type': 'text/html'},
'logo': {'href': '/rest/2/assets/images%2F2ff71efc-1929-4452-b124-dab6bb0524ac.png'},
'self': {'href': '/rest/2/vendors/85'}},
'isAtlassian': True,
'name': 'Atlassian',
'programs': {'topVendor': {'status': 'not-requested'}}}},
'_links': {'alternate': {'href': '/apps/1216096/sso-for-atlassian-server-and-data-center?tab=overview',
'type': 'text/html'},
'categories': [{'href': '/rest/2/addonCategories/4'}],
'distribution': {'href': '/rest/2/addons/com.atlassian.plugins.authentication.atlassian-authentication-plugin/distribution'},
'logo': {'href': '/rest/2/assets/images%2Fab436e9b-c6ac-437d-86b8-c23d1307d503.png'},
'recommendations': {'href': '/rest/2/addons/com.atlassian.plugins.authentication.atlassian-authentication-plugin/recommendations{?application,applicationBuild,category*,cost,filter,forThisUser,hosting*,includeHidden,includePrivate,marketingLabel*,text,withVersion,storesPersonalData,offset,limit}',
'templated': True},
'reviews': [{'href': '/rest/2/addons/com.atlassian.plugins.authentication.atlassian-authentication-plugin/reviews{?sort,offset,limit}',
'templated': True},
{'href': '/apps/1216096/sso-for-atlassian-server-and-data-center?tab=reviews',
'type': 'text/html'}],
'self': {'href': '/rest/2/addons/com.atlassian.plugins.authentication.atlassian-authentication-plugin'},
'support': {'href': '/apps/1216096/sso-for-atlassian-server-and-data-center?tab=support',
'type': 'text/html'},
'vendor': {'href': '/rest/2/vendors/85'},
'versions': {'href': '/rest/2/addons/com.atlassian.plugins.authentication.atlassian-authentication-plugin/versions'},
'watch': {'href': '/rest/2/addons/com.atlassian.plugins.authentication.atlassian-authentication-plugin/watch'}},
'communityEnabled': True,
'key': 'com.atlassian.plugins.authentication.atlassian-authentication-plugin',
'lastModified': '2020-08-19T01:42:24.047Z',
'name': 'SSO for Atlassian Server and Data Center',
'status': 'public',
'storesPersonalData': False,
'summary': 'Enable SSO through Crowd as your identity '
'provider for the Atlassian Server suite. For '
'Data Center suite, you can additionally use '
'SAML and OpenID Connect.',
'tagLine': 'Enable SSO for your Atlassian Server and Data '
'Center products, with SAML, and OpenID '
'Connect available for DC',
'vendorLinks': {'issueTracker': 'https://confluence.atlassian.com/enterprise/submitting-feedback-about-sso-for-atlassian-products-application-990551767.html',
'privacy': 'https://www.atlassian.com/legal/privacy-policy'}},




 
By the same token, I have Workflow Enhancer for JIRA v3.9 installed. The GUI reports that it's incompatible and an update is available. There's nothing about this in the output from the REST calls:

{'description': 'Adds a validator and a condition that depend on the '
'evaluation of a boolean expression.',
'enabled': True,
'key': 'com.tng.jira.plugins.workflowenhancer',
'licenseData': {'active': False,
'links': {'alternate': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key',
'license': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key/license',
'license-callback': 'http://localhost:8080/plugins/servlet/upm/license/com.tng.jira.plugins.workflowenhancer',
'new': 'https://my.atlassian.com/addon/new/com.tng.jira.plugins.workflowenhancer',
'self': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key/license',
'try': 'https://my.atlassian.com/addon/try/com.tng.jira.plugins.workflowenhancer',
'update-license': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key/license',
'validate-downgrade': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key/license/validate-downgrade'},
'pluginKey': 'com.tng.jira.plugins.workflowenhancer',
'valid': False},
'links': {'delete': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key',
'manage': 'http://localhost:8080/plugins/servlet/upm?fragment=manage%2Fcom.tng.jira.plugins.workflowenhancer',
'modify': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key',
'plugin-icon': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key/media/plugin-icon',
'plugin-logo': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key/media/plugin-logo',
'plugin-summary': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key/summary',
'self': '/rest/plugins/1.0/com.tng.jira.plugins.workflowenhancer-key'},
'marketplaceData': {'_embedded': {'categories': [{'_links': {'self': {'href': '/rest/2/addonCategories/11'}},
'name': 'Workflow'}],
'distribution': {'bundled': False,
'bundledCloud': False,
'downloads': 41074,
'totalInstalls': 3952,
'totalUsers': 2258341},
'logo': {'_links': {'highRes': {'href': 'https://marketplace-cdn.atlassian.com/files/images/8aed2864-8742-45e1-9534-9e9e59fa851b.png',
'type': 'image/png'},
'image': {'href': 'https://marketplace-cdn.atlassian.com/files/images/e2eb9eeb-6a44-4550-b0c2-f0ba98e9908d.png',
'type': 'image/png'},
'self': {'href': '/rest/2/assets/images%2F8aed2864-8742-45e1-9534-9e9e59fa851b.png'},
'smallHighResImage': {'href': 'https://marketplace-cdn.atlassian.com/files/images/f630645c-da8b-4237-bd52-f1ad7b588e6e.png',
'type': 'image/png'},
'smallImage': {'href': 'https://marketplace-cdn.atlassian.com/files/images/41548c71-abca-4002-9b3b-96590ccae8c4.png',
'type': 'image/png'},
'unscaled': {'href': 'https://marketplace-cdn.atlassian.com/files/images/8aed2864-8742-45e1-9534-9e9e59fa851b.png',
'type': 'image/png'}}},
'reviews': {'averageStars': 3.6578948497772217,
'count': 38},
'vendor': {'_embedded': {'logo': {'_links': {'image': {'href': 'https://marketplace-cdn.atlassian.com/files/vendors/114/logo/995aa547-3177-4836-b4fd-582adb119d53_scaled.png',
'type': 'image/png'},
'self': {'href': '/rest/2/assets/vendors%2F114%2Flogo%2F995aa547-3177-4836-b4fd-582adb119d53.png'},
'smallHighResImage': {'href': 'https://marketplace-cdn.atlassian.com/files/vendors/114/icon/bf5393e4-eb4e-465a-b92c-a9900183c996_high.png',
'type': 'image/png'},
'smallImage': {'href': 'https://marketplace-cdn.atlassian.com/files/vendors/114/icon/bf5393e4-eb4e-465a-b92c-a9900183c996_scaled.png',
'type': 'image/png'},
'unscaled': {'href': 'https://marketplace-cdn.atlassian.com/files/vendors/114/logo/995aa547-3177-4836-b4fd-582adb119d53.png',
'type': 'image/png'}}}},
'_links': {'alternate': {'href': '/vendors/114/tng-technology-consulting-gmbh',
'type': 'text/html'},
'logo': {'href': '/rest/2/assets/vendors%2F114%2Flogo%2F995aa547-3177-4836-b4fd-582adb119d53.png'},
'self': {'href': '/rest/2/vendors/114'}},
'name': 'TNG Technology '
'Consulting GmbH',
'programs': {'topVendor': {'status': 'not-requested'}}}},
'_links': {'alternate': {'href': '/apps/575829/workflow-enhancer-for-jira?tab=overview',
'type': 'text/html'},
'categories': [{'href': '/rest/2/addonCategories/11'}],
'distribution': {'href': '/rest/2/addons/com.tng.jira.plugins.workflowenhancer/distribution'},
'logo': {'href': '/rest/2/assets/images%2F8aed2864-8742-45e1-9534-9e9e59fa851b.png'},
'recommendations': {'href': '/rest/2/addons/com.tng.jira.plugins.workflowenhancer/recommendations{?application,applicationBuild,category*,cost,filter,forThisUser,hosting*,includeHidden,includePrivate,marketingLabel*,text,withVersion,storesPersonalData,offset,limit}',
'templated': True},
'reviews': [{'href': '/rest/2/addons/com.tng.jira.plugins.workflowenhancer/reviews{?sort,offset,limit}',
'templated': True},
{'href': '/apps/575829/workflow-enhancer-for-jira?tab=reviews',
'type': 'text/html'}],
'self': {'href': '/rest/2/addons/com.tng.jira.plugins.workflowenhancer'},
'support': {'href': '/apps/575829/workflow-enhancer-for-jira?tab=support',
'type': 'text/html'},
'vendor': {'href': '/rest/2/vendors/114'},
'versions': {'href': '/rest/2/addons/com.tng.jira.plugins.workflowenhancer/versions'},
'watch': {'href': '/rest/2/addons/com.tng.jira.plugins.workflowenhancer/watch'}},
'communityEnabled': True,
'key': 'com.tng.jira.plugins.workflowenhancer',
'lastModified': '2020-08-28T09:49:42.374Z',
'legacy': {'description': '<p> This '
'plug-in enhances workflow '
'validators and conditions as '
'well as postfunctions in Jira. '
'It allows comparisons of the '
'value of a field with another '
'field or a value, and also '
'makes a wide range of '
'additional comparisons '
'possible. The key features '
'are: </p> <ul> <li>Ability to '
'enter full boolean '
'expressions '
'<li>String equality and '
'regular expression '
'matching '
'<li>Ordering and equality of '
'dates (with an optional time '
'of day) '
'<li>Ordering and equality of '
'numeric '
'fields '
'<li>Ordering and equality of '
'time '
'spans '
'<li>Dynamic addition and '
'subtraction with sensible '
'semantics depending on the '
'context '
'<li>Macros for the logged in '
'user and the date at '
'runtime '
'<li>Custom error messages for '
'the validator </ul>',
'vendorLinks': {'source': 'https://bitbucket.org/tngtech-atlassian-add-ons/workflow-enhancer-for-jira',
'wiki': 'https://tngtech-oss.atlassian.net/wiki/display/JWFE'}},
'name': 'Workflow Enhancer for Jira',
'status': 'public',
'storesPersonalData': False,
'summary': 'This plug-in provides workflow validators, '
'conditions and postfunctions to allow '
'comparisons with field values. This includes '
'full boolean expressions, regular expression '
'matching, date and time comparisons, custom '
'field support and more!',
'tagLine': 'Enhances the workflow validators, conditions '
'and post functions in Jira, allowing a wide '
'range of comparisons with field values',
'vendorLinks': {'issueTracker': 'https://tngtech-oss.atlassian.net/browse/JWFE',
'privacy': 'https://tngtech-oss.atlassian.net/wiki/x/AYDCH'}},
'name': 'Workflow Enhancer for JIRA',
'optional': True,
'remotable': False,
'static': False,
'unloadable': False,
'userInstalled': True,
'usesLicensing': False,
'vendor': {'link': 'http://www.tngtech.com/',
'marketplaceLink': 'http://www.tngtech.com/',
'name': 'TNG Technology Consulting GmbH'},

 

Any ideas?

0 answers

Suggest an answer

Log in or Sign up to answer