-
Improvement
-
Resolution: Unresolved
-
Major
-
None
It is currently possible to obtain the status (e.g. PAUSED_PENDING_INPUT) of a org.jenkinsci.plugins.workflow.job.WorkflowRun via the new wfapi (https://github.com/jenkinsci/pipeline-stage-view-plugin/tree/master/rest-api).
It would be nice if this could also be accessed through the regular jenkins REST API.
So
http://jenkins.io/job/my-pipeline/job/trunk/15/api/json
instead of
http://jenkins.io/job/my-pipeline/job/trunk/15/wfapi/
My use case is to get a global overview of all build statuses for a dashboard:
http://jenkins.io/api/json?tree=views[name,url],jobs[name,url,buildable,scm[locations[remote]],builds[result,building,timestamp],jobs[name,url,buildable,description,builds[url,result,building,timestamp]]]
The build result of a running pipeline job is null. So instead of the result, I would like to obtain the status of the workflow job then. At the moment I need to do a seperate API call for that. So potentially this means N+1 API calls instead of just 1.
Alternatively, a new global endpoint in https://github.com/jenkinsci/pipeline-stage-view-plugin/tree/master/rest-api to obtain ALL pipeline jobs would work too.