Jenkins

App · 11 actions

Run and watch Jenkins builds: start a job with its parameters, wait for it to finish, read results and console logs, stop builds, enable or disable jobs and check agents. Start a workflow when a build finishes.

Actions

ActionWhat it does
Enable or disable jobDisable a job so it cannot be built, or enable it again.
Get buildGet a build's result, timing, what started it, its parameters and its artifacts.
Get build logGet the last lines of a build's console output, such as where it failed.
Get jobGet a job's status, health, latest build numbers and the parameters it takes.
Get queued buildFind out whether a queued build has started, and its number when it has.
List buildsList a job's latest builds with their results, newest first.
List jobsList every job, in folders too, with its last build's status.
List nodesList the built-in node and the agents: whether each is online, idle, and why it is offline.
Start buildStart a build of a job, with its parameters.
Stop buildAbort a running build.
Wait for buildWait until a build finishes, then return its result.

Enable or disable job

Disable a job so it cannot be built, or enable it again.

Inputs

JobjobtextRequired
The job. Pick one, type its name (folder/job), or paste its address.
StatestatetextRequired
Whether the job can be built.One of: enabled, disabled.

Outputs

buildabletrue/false
False when the job is disabled
buildingtrue/false
True while a build runs
descriptiontext
The job's description
display_nametext
The job's display name
healthtext
Jenkins's health report, such as 'Build stability: 1 out of the last 5 builds failed.'
health_scorenumber
The health score, 0 to 100
in_queuetrue/false
True when a build is waiting in the queue
last_buildnumber
The latest build's number
last_failed_buildnumber
The latest failed build's number
last_successful_buildnumber
The latest successful build's number
nametext
The job's full name, with its folders
next_build_numbernumber
The number the next build will get
parameterslist
The parameters the job takes
statustext
The last build's status: success, failure, unstable, aborted, not built or disabled
urltext
The job's page
Example output
{
  "buildable": false,
  "building": false,
  "description": "Deploy the app",
  "display_name": "deploy",
  "health": "Build stability: No recent builds failed.",
  "health_score": 100,
  "in_queue": false,
  "last_build": 42,
  "last_failed_build": 40,
  "last_successful_build": 42,
  "name": "team/deploy",
  "next_build_number": 43,
  "parameters": [
    {
      "choices": [
        "staging",
        "production"
      ],
      "default": "staging",
      "description": "Where to deploy",
      "name": "ENVIRONMENT",
      "type": "choice"
    }
  ],
  "status": "disabled",
  "url": "https://jenkins.example.com/job/team/job/deploy/"
}

Get build

Get a build's result, timing, what started it, its parameters and its artifacts.

Inputs

JobjobtextRequired
The job. Pick one, type its name (folder/job), or paste its address.
Build numberbuild_numbertext
The build's number, such as 42. Leave empty to use 'Which build'.
Which buildwhichtext
When no number is given. Defaults to the latest build.One of: lastBuild (The latest build), lastCompletedBuild (The latest finished build), lastSuccessfulBuild (The latest successful build), lastFailedBuild (The latest failed build), lastStableBuild (The latest stable build). Default: lastBuild.

Outputs

artifactslist
Files the build archived
buildingtrue/false
True while it runs
causeslist
Why it ran, such as 'Started by user Jo'
descriptiontext
The build's description
display_nametext
The build's name, such as #42
duration_secondsnumber
How long it took; empty while it runs
estimated_secondsnumber
How long Jenkins expects it to take
jobtext
The job's full name
numbernumber
The build's number
parametersobject
The parameters it ran with
resulttext
SUCCESS, FAILURE, UNSTABLE, ABORTED or NOT_BUILT; empty while it runs
started_attext
When it started, in UTC (ISO 8601)
urltext
The build's page
Example output
{
  "artifacts": [
    {
      "file_name": "app.zip",
      "path": "dist/app.zip",
      "url": "https://jenkins.example.com/job/team/job/deploy/42/artifact/dist/app.zip"
    }
  ],
  "building": false,
  "causes": [
    "Started by user Jo Bloggs"
  ],
  "description": "",
  "display_name": "#42",
  "duration_seconds": 93.4,
  "estimated_seconds": 90.0,
  "job": "team/deploy",
  "number": 42,
  "parameters": {
    "ENVIRONMENT": "staging"
  },
  "result": "SUCCESS",
  "started_at": "2026-10-27T10:00:00Z",
  "url": "https://jenkins.example.com/job/team/job/deploy/42/"
}

Get build log

Get the last lines of a build's console output, such as where it failed.

Inputs

JobjobtextRequired
The job. Pick one, type its name (folder/job), or paste its address.
Build numberbuild_numbertext
The build's number, such as 42. Leave empty to use 'Which build'.
Which buildwhichtext
When no number is given. Defaults to the latest build.One of: lastBuild (The latest build), lastCompletedBuild (The latest finished build), lastSuccessfulBuild (The latest successful build), lastFailedBuild (The latest failed build), lastStableBuild (The latest stable build). Default: lastBuild.
Last lineslast_linesnumber
How many lines from the end, up to 5000. Defaults to 200.From 1 to 5000.

Outputs

buildtext
The build's number, or which latest build
jobtext
The job's full name
line_countnumber
How many lines were returned
logtext
The lines, oldest first
truncatedtrue/false
True when earlier lines were left out
Example output
{
  "build": "42",
  "job": "team/deploy",
  "line_count": 1,
  "log": "Finished: SUCCESS",
  "truncated": true
}

Get job

Get a job's status, health, latest build numbers and the parameters it takes.

Inputs

JobjobtextRequired
The job. Pick one, type its name (folder/job), or paste its address.

Outputs

buildabletrue/false
False when the job is disabled
buildingtrue/false
True while a build runs
descriptiontext
The job's description
display_nametext
The job's display name
healthtext
Jenkins's health report, such as 'Build stability: 1 out of the last 5 builds failed.'
health_scorenumber
The health score, 0 to 100
in_queuetrue/false
True when a build is waiting in the queue
last_buildnumber
The latest build's number
last_failed_buildnumber
The latest failed build's number
last_successful_buildnumber
The latest successful build's number
nametext
The job's full name, with its folders
next_build_numbernumber
The number the next build will get
parameterslist
The parameters the job takes
statustext
The last build's status: success, failure, unstable, aborted, not built or disabled
urltext
The job's page
Example output
{
  "buildable": true,
  "building": false,
  "description": "Deploy the app",
  "display_name": "deploy",
  "health": "Build stability: No recent builds failed.",
  "health_score": 100,
  "in_queue": false,
  "last_build": 42,
  "last_failed_build": 40,
  "last_successful_build": 42,
  "name": "team/deploy",
  "next_build_number": 43,
  "parameters": [
    {
      "choices": [
        "staging",
        "production"
      ],
      "default": "staging",
      "description": "Where to deploy",
      "name": "ENVIRONMENT",
      "type": "choice"
    }
  ],
  "status": "success",
  "url": "https://jenkins.example.com/job/team/job/deploy/"
}

Get queued build

Find out whether a queued build has started, and its number when it has.

Inputs

Queue itemqueue_item_idtextRequired
The queue item's number, from 'Start build'.

Outputs

build_numbernumber
The build's number, once it has started
build_urltext
The build's page, once it has started
cancelledtrue/false
True when it was cancelled before starting
job_urltext
The job's page
queue_item_idnumber
The queue item's number
queued_attext
When it was queued, in UTC (ISO 8601)
waitingtrue/false
True while the build waits to start
whytext
Why it is waiting, in Jenkins's words
Example output
{
  "build_number": 43,
  "build_url": "https://jenkins.example.com/job/team/job/deploy/43/",
  "cancelled": false,
  "job_url": "https://jenkins.example.com/job/team/job/deploy/",
  "queue_item_id": 512,
  "queued_at": "2026-10-27T10:00:00Z",
  "waiting": false,
  "why": ""
}

List builds

List a job's latest builds with their results, newest first.

Inputs

JobjobtextRequired
The job. Pick one, type its name (folder/job), or paste its address.
How manylimitnumber
How many builds, up to 100. Defaults to 20.From 1 to 100.

Outputs

buildslist
The builds, newest first
countnumber
How many builds
jobtext
The job's full name
Example output
{
  "builds": [
    {
      "artifacts": [
        {
          "file_name": "app.zip",
          "path": "dist/app.zip",
          "url": "https://jenkins.example.com/job/team/job/deploy/42/artifact/dist/app.zip"
        }
      ],
      "building": false,
      "causes": [
        "Started by user Jo Bloggs"
      ],
      "description": "",
      "display_name": "#42",
      "duration_seconds": 93.4,
      "estimated_seconds": 90.0,
      "job": "team/deploy",
      "number": 42,
      "parameters": {
        "ENVIRONMENT": "staging"
      },
      "result": "SUCCESS",
      "started_at": "2026-10-27T10:00:00Z",
      "url": "https://jenkins.example.com/job/team/job/deploy/42/"
    }
  ],
  "count": 1,
  "job": "team/deploy"
}

List jobs

List every job, in folders too, with its last build's status.

Inputs

Folderfoldertext
Only jobs in this folder. Leave empty for every job.
Name containssearchtext
Only jobs whose name contains this text.

Outputs

countnumber
How many jobs
jobslist
The jobs
Example output
{
  "count": 1,
  "jobs": [
    {
      "building": false,
      "name": "team/deploy",
      "status": "success",
      "url": "https://jenkins.example.com/job/team/job/deploy/"
    }
  ]
}

List nodes

List the built-in node and the agents: whether each is online, idle, and why it is offline.

Inputs

Only offlineonly_offlinetrue/false
Only nodes that are offline. Off by default.Default: false.

Outputs

countnumber
How many nodes
nodeslist
The nodes
offline_countnumber
How many are offline
Example output
{
  "count": 1,
  "nodes": [
    {
      "executors": 2,
      "idle": true,
      "labels": [
        "linux"
      ],
      "name": "linux-agent-1",
      "offline_reason": "Disk full",
      "online": false
    }
  ],
  "offline_count": 1
}

Start build

Start a build of a job, with its parameters. Returns the build's number once Jenkins starts it, or its queue item while it waits.

Inputs

JobjobtextRequired
The job. Pick one, type its name (folder/job), or paste its address.
Parametersparametersobject
A value for each of the job's parameters. Empty ones keep their defaults.

Outputs

build_numbernumber
The build's number, once it has started
build_urltext
The build's page, once it has started
jobtext
The job's full name
queue_item_idnumber
The queue item, to follow with 'Wait for build'
queuedtrue/false
True while it still waits in the queue
whytext
Why it is still waiting, in Jenkins's words
Example output
{
  "build_number": 43,
  "build_url": "https://jenkins.example.com/job/team/job/deploy/43/",
  "job": "team/deploy",
  "queue_item_id": 512,
  "queued": false,
  "why": ""
}

Stop build

Abort a running build.

Inputs

JobjobtextRequired
The job. Pick one, type its name (folder/job), or paste its address.
Build numberbuild_numbertextRequired
The running build's number.

Outputs

artifactslist
Files the build archived
buildingtrue/false
True while it runs
causeslist
Why it ran, such as 'Started by user Jo'
descriptiontext
The build's description
display_nametext
The build's name, such as #42
duration_secondsnumber
How long it took; empty while it runs
estimated_secondsnumber
How long Jenkins expects it to take
jobtext
The job's full name
numbernumber
The build's number
parametersobject
The parameters it ran with
resulttext
SUCCESS, FAILURE, UNSTABLE, ABORTED or NOT_BUILT; empty while it runs
started_attext
When it started, in UTC (ISO 8601)
urltext
The build's page
Example output
{
  "artifacts": [
    {
      "file_name": "app.zip",
      "path": "dist/app.zip",
      "url": "https://jenkins.example.com/job/team/job/deploy/42/artifact/dist/app.zip"
    }
  ],
  "building": false,
  "causes": [
    "Started by user Jo Bloggs"
  ],
  "description": "",
  "display_name": "#42",
  "duration_seconds": 93.4,
  "estimated_seconds": 90.0,
  "job": "team/deploy",
  "number": 42,
  "parameters": {
    "ENVIRONMENT": "staging"
  },
  "result": "ABORTED",
  "started_at": "2026-10-27T10:00:00Z",
  "url": "https://jenkins.example.com/job/team/job/deploy/42/"
}

Wait for build

Wait until a build finishes, then return its result. The run waits without holding anything up, checking every minute.

Inputs

JobjobtextRequired
The job. Pick one, type its name (folder/job), or paste its address.
Build numberbuild_numbertext
The build's number. Or give its queue item instead.
Queue itemqueue_item_idtext
The queue item from 'Start build', for a build that had not started yet.
Wait at most (minutes)max_wait_minutesnumber
Fail if it is still running after this long. Defaults to 60.From 1 to 1440.

Outputs

artifactslist
Files the build archived
buildingtrue/false
True while it runs
causeslist
Why it ran, such as 'Started by user Jo'
descriptiontext
The build's description
display_nametext
The build's name, such as #42
duration_secondsnumber
How long it took; empty while it runs
estimated_secondsnumber
How long Jenkins expects it to take
jobtext
The job's full name
numbernumber
The build's number
parametersobject
The parameters it ran with
resulttext
SUCCESS, FAILURE, UNSTABLE, ABORTED or NOT_BUILT; empty while it runs
started_attext
When it started, in UTC (ISO 8601)
urltext
The build's page
Example output
{
  "artifacts": [
    {
      "file_name": "app.zip",
      "path": "dist/app.zip",
      "url": "https://jenkins.example.com/job/team/job/deploy/42/artifact/dist/app.zip"
    }
  ],
  "building": false,
  "causes": [
    "Started by user Jo Bloggs"
  ],
  "description": "",
  "display_name": "#42",
  "duration_seconds": 93.4,
  "estimated_seconds": 90.0,
  "job": "team/deploy",
  "number": 42,
  "parameters": {
    "ENVIRONMENT": "staging"
  },
  "result": "SUCCESS",
  "started_at": "2026-10-27T10:00:00Z",
  "url": "https://jenkins.example.com/job/team/job/deploy/42/"
}

On this page