How can I get a list of installed Jenkins plugins?
I searched the Jenkins Remote Access API document, but it was not found. Should I use Jenkins' CLI? Is there a document or example?
How can I get a list of installed Jenkins plugins?
I searched the Jenkins Remote Access API document, but it was not found. Should I use Jenkins' CLI? Is there a document or example?
Sharing another option found here with credentials
These days I use the same approach as the answer described by @Behe below instead https://stackoverflow.com/a/35292719/1597808
You can use the API in combination with depth, XPath, and wrapper arguments.
The following will query the API of the pluginManager to list all plugins installed, but only to return their shortName and version attributes. You can of course retrieve additional fields by adding '|' to the end of the XPath parameter and specifying the pattern to identify the node.
The wrapper argument is required in this case, because it's returning more than one node as part of the result, both in that it is matching multiple fields with the XPath and multiple plugin nodes.
It's probably useful to use the following URL in a browser to see what information on the plugins is available and then decide what you want to limit using XPath:
The Jenkins CLI supports listing all installed plugins:
java -jar jenkins-cli.jar -s http://localhost:8080/ list-plugins