Skip to main content

Overview

Jobs are instances of job templates that have been launched. They represent the execution of an Ansible playbook with specific parameters. Jobs are read-only except for cancellation.

Endpoints

List Jobs

string
Filter by status: new, pending, waiting, running, successful, failed, error, canceled
string
Filter by type: run or check

Retrieve Job

Response Schema

integer
Job ID
string
Job name (from template)
string
Job description
string
Job type: run or check
string
Current status: new, pending, waiting, running, successful, failed, error, canceled
boolean
Whether job failed
string
Start timestamp
string
Completion timestamp
string
Cancellation timestamp
number
Elapsed time in seconds
string
Explanation for job status
string
Node where job executed
string
Controller node
string
How job was launched: manual, relaunch, callback, scheduled, dependency, workflow, webhook, sync, scm
string
Playbook that was executed
string
SCM revision used
string
SCM branch used
integer
Inventory ID
integer
Project ID
integer
Job template ID
string
Host limit
string
Extra variables (displayed, sensitive values hidden)
object
Artifacts set by the job
integer
Number of forks used
integer
Verbosity level
string
Tags applied
string
Tags skipped
integer
Job timeout
boolean
Whether diff mode was enabled
boolean
Whether fact cache was used
boolean
Whether simultaneous execution is allowed
integer
Slice number (for distributed jobs)
integer
Total number of slices
string
Webhook service that triggered job
string
Webhook GUID
Links to related resources:
  • job_template - Source template
  • inventory - Job inventory
  • project - Source project
  • execution_environment - Execution environment
  • credentials - Credentials used
  • labels - Job labels
  • job_events - Playbook events
  • job_host_summaries - Host summaries
  • activity_stream - Activity log
  • notifications - Notifications sent
  • cancel - Cancel endpoint
  • relaunch - Relaunch endpoint
  • create_schedule - Create schedule from job

Job Output

Get Standard Output

Returns full Ansible playbook output.

Get Formatted Output

string
default:"html"
Output format: html, txt, ansi, json
boolean
Download as file attachment

Job Events

List detailed playbook events:
Events include:
  • playbook_on_start
  • playbook_on_play_start
  • playbook_on_task_start
  • runner_on_ok
  • runner_on_failed
  • runner_on_skipped
  • runner_on_unreachable
  • playbook_on_stats
  • And many more…

Children Summary

Job Host Summaries

Get per-host execution summary:
Response includes per-host:
  • ok - Successful tasks
  • changed - Tasks that made changes
  • dark - Unreachable hosts
  • failures - Failed tasks
  • skipped - Skipped tasks

Cancel Job

Cancel a running or pending job:
Only jobs in new, pending, waiting, or running status can be canceled.

Relaunch Job

Relaunch a job with the same parameters:
Returns a new job object.

Create Schedule from Job

Job Labels

Job Notifications

Activity Stream

Filtering Jobs

Ordering

Monitoring Running Jobs

Poll Job Status

Stream Job Events

Job Statistics

Jobs track execution statistics:
These are available in the job detail response and in job_host_summaries.

Complete Example