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.
4 Likes
Hi @nmansilla this query works perfectly.
Thanks!
Hi @nmansilla ,
I hope you’re doing well. I have a question regarding a GraphQL call. Currently, when I make the call, the result is as follows:
{
"data": {
"extensionContexts": [
{
"extensionsByType": [],
"installations": {
"nodes": [],
"pageInfo": {
"endCursor": null,
"hasNextPage": false
}
}
}
]
},
"extensions": {
"gateway": {
"request_id": "f5c1815eacaf4304991a87ea041bfa5f",
"crossRegion": false,
"edgeCrossRegion": false,
"deprecatedFieldsUsed": [
"ExtensionContext.installations: Use `appInstallationsByApp` or `appInstallationsByContext` queries instead (extensionContexts/installations)"
]
}
}
}
I noticed a deprecated warning regarding the use of ExtensionContext.installations
, suggesting to use appInstallationsByApp or appInstallationsByContext
queries instead.
However I can’t find instructions on how to use appInstallationsByApp
or appInstallationsByContext
queries.
Can you please confirm if this method is still functional or if there are alternative approaches I should consider?
Your assistance is greatly appreciated. Thank you!