Skip to end of banner
Go to start of banner

How to get all jobs for the chosen repository

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

If you want to get all Jenkins jobs for the chosen repository, you can use the following REST endpoint:

<BB_URL>/rest/jenkins/latest/pipelines/jobs?repositoryId=<REPO_ID>&filter=<FILTERS>&order=<ORDER>

Where:

  • REPO_ID - the id of your repository for which you want to get jobs

  • FILTERS - this part must contain all titles of the returned jobs

  • ORDER - can be name_asc, name_desc, date_asc or date_desc

The response body looks like this:

{
  "numInstances": <Number of Jenkins instances for this repo>,
  "jobs": {
    "<URL of the first instance>": [
      {
        "jobId": "<Job name>",
        "instanceId": <Instance id>,
        "jobUrl": "<Relative path to the job>"
      },
      ...
    ],
    ...
  }
}

  • No labels