jenkins_url
+ /api/json?tree=jobs[name,color]
jenkins_url
+ /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]
- all build info:
jenkins_url
+ /job/${job_name}/lastBuild/api/json
- build progress:
jenkins_url
+ /job/${job_name}/lastBuild/api/json?tree=result,timestamp,estimatedDuration
timestamp = start time
estimatedDuration = duration
jenkins_url
+ /job/${job_name}/build
Sample
curl -X POST JENKINS_URL/job/JOB_NAME/build \ --user USER:TOKEN \ --data-urlencode json='{"parameter": [{"name":"id", "value":"123"}, {"name":"verbosity", "value":"high"}]}'
Reference - https://wiki.jenkins.io/display/JENKINS/Remote+access+API