UPM REST API

At the moment this is a HOWTO rather than formal API documentation.


How do I get a list of installed plugins?

Using sysadmin credentials:

1 GET /rest/plugins/1.0/

 

1 2 3 4 # sample curl request for localhost curl http://localhost:8090/jira/rest/plugins/1.0/ --header 'Authorization: Basic changeme' # or curl -u user:password http://localhost:8090/jira/rest/plugins/1.0/

Note the trailing /. Each element in the plugins array will contain a name and key, among other attributes. You can use the plugin's self link for retrieving detailed information about the plugin or modifying the plugin itself.

How do I enable or disable a plugin?

  1. Retrieve the plugin's JSON representation (with sysadmin credentials):

     

    1 GET /rest/plugins/1.0/${plugin.key}-key
    1 2 # eg curl -u user:password http://localhost:8090/jira/rest/plugins/1.0/tac.jira%20software.languages.ja_JP-key

 

  1. Set the enabled field in the JSON representation to true or false

  2. Put the updated representation on the application (with sysadmin credentials):

    1 2 3 4 5 6 7 8 9 10 11 12 PUT /rest/plugins/1.0/${plugin.key}-key Content-Type: application/vnd.atl.plugins.plugin+json [JSON representation in BODY] # eg curl --request PUT 'http://localhost:8090/jira/rest/plugins/1.0/tac.jira%20software.languages.ja_JP-key' \ -u user:password \ --header 'Content-Type: application/vnd.atl.plugins.plugin+json' \ --header 'Authorization: Basic YWRtaW46dGVzdA==' \ --data-raw '{ "enabled": false }'

How do I enable or disable a single module?

  1. Retrieve the module's JSON representation (with sysadmin credentials):

    1 GET /rest/plugins/1.0/${plugin.key}-key/modules/${module.key}-key
  2. Set the enabled field in the JSON representation to true or false

  3. Put the updated representation on the application (with sysadmin credentials):

    1 2 3 4 PUT /rest/plugins/1.0/${plugin.key}-key/modules/${module.key}-key Content-Type: application/vnd.atl.plugins.plugin.module+json [JSON representation in BODY]

How do I uninstall a plugin?

  1. Make a DELETE request (with sysadmin credentials):

    1 DELETE /rest/plugins/1.0/${plugin.key}-key

    A 204 "no content" response indicates a successful uninstallation.

How do I install a plugin?

See Installing an app using the REST API section from Registering apps page.