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

Jenkins Remote API does not show details for pipeline jobs

    Details

    • Similar Issues:

      Description

      Problem description:

      We use the Jenkins remote REST API for example /api/json?tree=views[name,jobs[name,description,color,url,lastBuild[number,duration,timestamp,result]]] to get metadata of all existing jobs. Now we start using the Pipeline features only the folder of GIT organization of the pipeline is listed as job in the response

      { "description" : "", "name" : "squad-example", "url" : "http://hostname:portl/job/squad-example/" }

      ,

      but not the nested jobs of each folder. Our assumption was that the jobs are listed as other jobs because in the UI it show the fullname squad-example/gitrepo/master.

      We found a REST api from the plugin Pipeline+Stage+View+Plugin to get metadata for each pipeline nested job if the name is known but there is not the detailed entry in the usual remote api. The plugin rest api we can only use when we know the specific path to the job and the usual remote api does give a link to it.

      How we can proceed the get the data?

        Attachments

          Activity

          Hide
          abayer Andrew Bayer added a comment -

          You can find jobs in folders by adding ?depth=1 (or higher for deeper nesting of folders).

          Show
          abayer Andrew Bayer added a comment - You can find jobs in folders by adding ?depth=1 (or higher for deeper nesting of folders).

            People

            • Assignee:
              Unassigned
              Reporter:
              jimjaeger jim jaeger
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: