Skip to content

Instantly share code, notes, and snippets.

@nickname55
Created February 6, 2026 15:54
Show Gist options
  • Select an option

  • Save nickname55/e33946b35a53e22250a80b4dab66d923 to your computer and use it in GitHub Desktop.

Select an option

Save nickname55/e33946b35a53e22250a80b4dab66d923 to your computer and use it in GitHub Desktop.
Jira Server/Data Center — Download Plugin JARs via UPM REST API

Jira Server/Data Center — Download Plugin JARs via REST API

Prerequisites

  • Jira admin account (or Personal Access Token)
  • curl, python3 (or jq)

1. List all plugins

curl -s -u 'admin:password' \
  "https://your-jira.com/rest/plugins/1.0/" \
  -o plugins.json

Or with a Personal Access Token (PAT):

curl -s -H "Authorization: Bearer YOUR_PAT_TOKEN" \
  "https://your-jira.com/rest/plugins/1.0/" \
  -o plugins.json

Note: Do NOT set an Accept header — the default response is JSON. Setting Accept: application/json returns 406.

2. List user-installed plugins

python3 -c "
import json
data = json.load(open('plugins.json'))
plugins = data.get('plugins', [])
user_installed = [p for p in plugins if p.get('userInstalled')]
print(f'Total: {len(plugins)}, User-installed: {len(user_installed)}')
print()
for p in user_installed:
    print(f\"  {p['key']}  v{p.get('version', '-')}\")
"

Or with jq:

jq -r '.plugins[] | select(.userInstalled) | "\(.key)  v\(.version)"' plugins.json

3. Download a plugin JAR

PLUGIN_KEY="com.example.my-plugin"

curl -s -u 'admin:password' \
  "https://your-jira.com/rest/plugins/1.0/${PLUGIN_KEY}-key/binary" \
  -o "${PLUGIN_KEY}.jar"

With PAT:

curl -s -H "Authorization: Bearer YOUR_PAT_TOKEN" \
  "https://your-jira.com/rest/plugins/1.0/${PLUGIN_KEY}-key/binary" \
  -o "${PLUGIN_KEY}.jar"

4. Download ALL user-installed plugin JARs

mkdir -p jars

python3 -c "
import json
data = json.load(open('plugins.json'))
for p in data.get('plugins', []):
    if p.get('userInstalled'):
        print(p['key'])
" | while read key; do
  echo "Downloading ${key}..."
  curl -s -u 'admin:password' \
    "https://your-jira.com/rest/plugins/1.0/${key}-key/binary" \
    -o "jars/${key}.jar"
done

5. Install a plugin JAR to another Jira instance

# Get UPM token first
UPM_TOKEN=$(curl -sI -u 'admin:password' \
  "https://target-jira.com/rest/plugins/1.0/" \
  -H "Accept: application/vnd.atl.plugins+json" \
  | grep -i 'upm-token' | awk '{print $2}' | tr -d '\r')

# Upload JAR
curl -u 'admin:password' \
  "https://target-jira.com/rest/plugins/1.0/?token=${UPM_TOKEN}" \
  -F "plugin=@my-plugin.jar"

API Reference

Endpoint Method Description
/rest/plugins/1.0/ GET List all plugins
/rest/plugins/1.0/{key}-key GET Plugin details
/rest/plugins/1.0/{key}-key/binary GET Download plugin JAR
/rest/plugins/1.0/?token={upm} POST Upload/install plugin JAR
/rest/plugins/1.0/{key}-key DELETE Uninstall plugin

Works on Jira Server and Data Center (7.x — 9.x). Not applicable to Jira Cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment