Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50639

access WorkFlowRun status through the regular REST API

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              svanoort Sam Van Oort
              Reporter:
              jpraet Jimmy Praet
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: