How to Access UPM REST API for License Details

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Purpose

This document is for System Administrators who would like to use the UPM API to monitor license details of Add-Ons of their JIRA Server.  

Solution

There is some documentation in: UPM REST API may assist you with this process.

Call the UPM REST API:

To get a JSON document for tall the Add-ons from the UPM:

GET <BASE-URL>/rest/plugins/1.0/

This will return a response with the content similar to the following:

 ...{
      "enabled": true,
      "links": {
        "self": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key",
        "plugin-summary": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key\/summary",
        "modify": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key",
        "plugin-icon": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key\/media\/plugin-icon",
        "plugin-logo": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key\/media\/plugin-logo",
        "manage": "http:\/\/example:18000\/jiralatest\/plugins\/servlet\/upm?fragment=manage%2Fcom.atlassian.servicedesk",
        "delete": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key"
      },
      "name": "JIRA Service Desk",
      "version": "2.5.4",
      "userInstalled": true,
      "optional": true,
      "static": false,
      "unloadable": false,
      "description": "Service and support for teams. Put the power of JIRA into the hands of your service desk team. JIRA Service Desk combines an intuitive, user-friendly experience with powerful SLA management and real-time reporting.",
      "key": "com.atlassian.servicedesk",
      "usesLicensing": true,
      "remotable": false,
      "vendor": {
        "name": "Atlassian",
        "link": "http:\/\/www.atlassian.com"
      }
    }...


Use the results to query specific Add-ons:

Add "license' to a specific License query:

GET <BASE-URL>/rest/plugins/1.0/com.atlassian.servicedesk-key/license


This will return results similar to the following:

{
  "links": {
    "self": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key\/license",
    "alternate": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key",
    "license": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key\/license",
    "update-license": "\/jiralatest\/rest\/plugins\/1.0\/com.atlassian.servicedesk-key\/license",
    "license-callback": "http:\/\/example:18000\/jiralatest\/plugins\/servlet\/upm\/license\/com.atlassian.servicedesk"
  },
  "pluginKey": "com.atlassian.servicedesk",
  "valid": true,
  "evaluation": false,
  "nearlyExpired": false,
  "maximumNumberOfUsers": 5000,
  "maintenanceExpiryDate": 3012645600000,
  "licenseType": "COMMERCIAL",
  "licenseTypeDescriptionKey": "COMMERCIAL",
  "creationDateString": "20\/Jun\/14",
  "rawLicense": "removed",
  "maintenanceExpiryDateString": "20\/Jun\/15",
  "organizationName": "example@example.com",
  "contactEmail": "example@example.com",
  "enterprise": true,
  "dataCenter": false,
  "subscription": false,
  "active": true,
  "autoRenewal": false,
  "currentRoleCount": 1,
  "roleManagementUri": "\/jiralatest\/secure\/admin\/AgentAllocation.jspa",
  "typeI18nSingular": "agent",
  "typeI18nPlural": "agents",
  "supportEntitlementNumber": "SEN-000000"


If you are looking to complete more integrations with JIRA through the REST API, you might like to look at: the Atlassian REST API Browser and it will help you uncover the Public (and private) API's and call these. Please keep in mind that accessing these private API's is not supported by Atlassian, and may be harmful if used in an unintentional manner.

Last modified on Sep 6, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.