Last active
August 29, 2015 14:21
-
-
Save yuuichi-fujioka/f112a9f76651b6a76533 to your computer and use it in GitHub Desktop.
Jenkins REST? API
This file contains hidden or 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
# Get jobs | |
curl http://192.168.0.1:8080/api/json | |
# Get job config | |
curl http://192.168.0.1:8080/job/${JOB_NAME}/config.xml | |
# Create a job | |
curl http://192.168.0.1:8080/createItem -d "name=${new_job_name}&mode=hudson.model.FreeStyleProject" | |
# Delete a job | |
curl http://192.168.0.1:8080/job/${JOB_NAME}/doDelete -X POST | |
# Update a job config | |
curl http://192.168.0.1:8080/job/${JOB_NAME}/config.xml -d @new_config.xml | |
# with Authentication | |
curl --user ${USERNAME}:${PASSWORD} http://192.168.0.1:8080/foo/bar | |
curl --data ${TOKEN} http://192.168.0.1:8080/foo/bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment