UPM REST API does not list forge apps

Hi , I’m trying get all installed plugins in jira cloud instance using UPM Rest API , based on this doc: https://ecosystem.atlassian.net/wiki/spaces/UPM/pages/6094960/UPM+REST+API

In my jira cloud instance I have two forge plugins installed and I noted that this addons dosen’t appear in the JSON retrieved from API.

There is any parameter that can I pass to get all installed apps include forge apps? or another endpoint that can I call?

2 Likes

Hi @FelipeCauFragaCarnei. Welcome to the developer community forums. Unfortunately, the UPM REST endpoint that you’re referring does not provide installation information for Forge apps.

That being said, there is another way, using GraphQL. Behind the page that lists all installed apps on an instance is a GraphQL query. You can see it for yourself if you inspect the page. Below is an example query that you can try in the GraphQL explorer.

query jira_manageApps_getEcosystemInstalledApps {
  extensionContexts(
    contextIds: ["ari:cloud:jira::site/your-site-cloud-id-here"]
  ) {
    installations(after: "") {
      nodes {
        id
        createdAt
        license {
          active
          type
          supportEntitlementNumber
          trialEndDate
          isEvaluation
          subscriptionEndDate
          billingPeriod
        }
        app {
          contactLink
          createdBy {
            name
          }
          description
          id
          marketplaceApp {
            appKey
            name
            tagline
            logo {
              scaled {
                id
              }
            }
            versions(filter: {productHostingOptions: CLOUD, visibility: PUBLIC}) {
              edges {
                node {
                  paymentModel
                  deployment {
                    ... on MarketplaceCloudAppDeployment {
                      cloudAppVersionId
                      scopes {
                        id
                        capability
                      }
                    }
                  }
                }
              }
            }
          }
          name
          privacyPolicy
          termsOfService
          vendorName
        }
        appEnvironment {
          key
          type
        }
        appEnvironmentVersion {
          id
          version
          requiresLicense
          isLatest
          permissions {
            scopes {
              key
            }
          }
        }
      }
      pageInfo {
        endCursor
        hasNextPage
      }
    }
    extensionsByType(type: "jira:adminPage") {
      id
      environmentId
      environmentType
      properties
      type
      appVersion
      installationId
    }
  }
}

If you’re making a call to your own client (or tool like Postman), you’d make the call against your-domain.atlassian.net, and authenticate using an API token (via basic auth).

NOTE: I would classify the above as experimental.

2 Likes

Hi @nmansilla this query works perfectly.
Thanks! :smiley: