99

I am trying to integrate an external system with jenkins by REST API.

Although I have done lots of google search on its API reference, I still cannot get a full list of jenkins REST API reference.

Anybody knows about this?

Chuck
  • 1,508
  • 4
  • 15
  • 19

2 Answers2

120

Jenkins has a link to their REST API in the bottom right of each page. This link appears on every page of Jenkins and points you to an API output for the exact page you are browsing. That should provide some understanding into how to build the API URls.

You can additionally use some wrapper, like I do, in Python, using http://jenkinsapi.readthedocs.io/en/latest/

Here is their website: https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API

James McMahon
  • 48,506
  • 64
  • 207
  • 283
Lovato
  • 2,250
  • 1
  • 16
  • 22
  • 1
    The URLs you can copy are mainly read only, since they were used to generate data for HTML display. But if you follow the documentation on their website, the first example is how to trigger a build. – Lovato Oct 18 '17 at 15:47
  • 2
    There is a Java/Groovy library at https://github.com/cdancy/jenkins-rest – user1241663 Jun 30 '18 at 00:45
  • Node.js APIs also available, Python APIs taken as reference. https://www.npmjs.com/package/jenkins – Siddharth Kumar Jul 04 '18 at 08:39
1

Additional Solution: use Restul api wrapper libraries written in Java / python / Ruby - An object oriented wrappers which aim to provide a more conventionally way of controlling a Jenkins server.

For documentation and links: Remote Access API

avivamg
  • 12,197
  • 3
  • 67
  • 61