scmmanager

Cannot install plugins via API


I am trying to install scm-activity-plugin & scm-webhook-plugin via API and is not working. I try all possible options without success:

curl -k -s -u "user:pass" -X POST "https://my_custom_address/scm/api/rest/plugins/install/scm-activity-plugin/" -H "Content-Type: application/json"

curl -k -s -u "user:pass" -X POST "https://my_custom_address/scm/api/rest/plugins/install/scm-activity-plugin/" -H "Accept: application/json"

curl -k -s -u "user:pass" -X POST "https://my_custom_address/scm/api/rest/plugins/install/scm-activity-plugin"

The GET is working ok: { "artifactId": "scm-activity-plugin", "author": "Sebastian Sdorra", "category": null, "condition": { "arch": null, "min-version": "1.32" }, "description": "Shows the latest activity from your repositories.", "groupId": "sonia.scm.plugins", "name": "scm-activity-plugin", "screenshots": [ "http://download.scm-manager.org/images/scm-activity-plugin/screenshot-1.png" ], "state": "INSTALLED", "url": "https://bitbucket.org/sdorra/scm-activity-plugin", "version": "1.12", "wiki": null },

Can somebody help me ? I am using version 1.6


Solution

  • You have to specify the groupid and the version in the URL, too. Something like this should be working with version 1.60:

    curl -u "user:pass" \
        http://localhost:8080/scm/api/rest/plugins/install/sonia.scm.plugins:scm-activity-plugin:1.12 \
        -H "Accept: application/json" \
        -X POST