Forked from dasgoll/gist:455522f09cb963872f64e23bb58804b2
Created
April 3, 2018 20:51
-
-
Save parallaxisjones/b97144652405af078c35b40228b6e992 to your computer and use it in GitHub Desktop.
Jenkins REST API example using crumb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Each Jenkins page has a REST API hyperlink at the bottom, this is because each page has its own endpoint. | |
http://localhost:8080/me | |
configure | |
Click 'Show API Token' | |
78e21f82a9e137614fef5b9593bcf827 = API Token | |
curl -s -u goll:78e21f82a9e137614fef5b9593bcf827 http://localhost:8080/crumbIssuer/api/json | |
curl -s -u goll:78e21f82a9e137614fef5b9593bcf827 -H 'Jenkins-Crumb:0f23a062e0b9b9d13295e26bc8c8e206' http://localhost:8080/job/foo2/buildWithParameters -d 'directoryName=zaid222' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment