Documentation

24. Unified Job List API Endpoint

Make a GET request to this resource to retrieve the list of unified jobs.

GET /api/v1/unified_jobs/
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, HEAD, OPTIONS
X-API-Time: 0.063s

The resulting data structure contains:

{
    "count": 99,
    "next": null,
    "previous": null,
    "results": [
        ...
    ]
}

The count field indicates the total number of unified jobs found for the given query. The next and previous fields provides links to additional results if there are more than will fit on a single page. The results list contains zero or more unified job records.

Note

The rules of encryption and decryption for Ansible Tower also apply to one field outside of credentials, the Unified Job start_args field, which is used through the job, ad_hoc_command, and system_job data types. Refer to Understanding How Credentials Work in the Ansible Tower User Guide for more information.

24.1. Results

Each unified job data structure includes the following fields:

  • id: Database ID for this unified job. (integer)
  • type: Data type for this unified job. (multiple choice)
    • project_update: SCM Update
    • inventory_update: Inventory Sync
    • job: Playbook Run
    • ad_hoc_command: Command
    • system_job: Management Job
  • url: URL for this unified job. (string)
  • related: Data structure with URLs of related resources. (object)
  • summary_fields: Data structure with name/description for related resources. (object)
  • created: Timestamp when this unified job was created. (datetime)
  • modified: Timestamp when this unified job was last modified. (datetime)
  • name: (string)
  • description: (string)
  • unified_job_template: (field)
  • launch_type: (multiple choice)
    • manual: Manual
    • callback: Callback
    • scheduled: Scheduled
    • dependency: Dependency
  • status: (multiple choice)
    • new: New
    • pending: Pending
    • waiting: Waiting
    • running: Running
    • successful: Successful
    • failed: Failed
    • error: Error
    • canceled: Canceled
  • failed: (boolean)
  • started: (datetime)
  • finished: (datetime)
  • elapsed: (decimal)
  • job_explanation: (string)

24.2. Reviewing the Options Endpoint

The Options Endpoint table offers a view of the Options for this endpoint. When viewing the endpoint in the browsable API, clicking the “Options” button gives you the raw JSON for the following:

name Unified Job List
description # List Unified Jobs: Make a GET request to this resource to retrieve the list of unified jobs.
renders
0 application/json
1 text/html
parses
0 application/json
added_in_version 1.4.8
types
0 project_update
1 inventory_update
2 job
3 ad_hoc_command
4 system_job
actions
GET
id
type integer
label ID
help_text Database ID for this unified job.
type
type multiple choice
help_text Data type for this unified job.
choices
0
0 project_update
1 SCM Update
1
0 inventory_update
1 Inventory Sync
2
0 job
1 Playbook Run
3
0 ad_hoc_command
1 Command
4
0 system_job
1 Management Job
url
type string
help_text URL for this unified job.
related
type object
help_text Data structure with URLs of related resources.
summary_fields
type object
help_text Data structure with name/description for related resources.
created
type datetime
help_text Timestamp when this unified job was created.
modified
type datetime
help_text Timestamp when this unified job was last modified.
name
type string
label name
description
type string
label description
unified_job_template
type field
label unified job template
launch_type
type multiple choice
label launch type
choices
0
0 manual
1 Manual
1
0 callback
1 Callback
2
0 scheduled
1 Scheduled
3
0 dependency
1 Dependency
status
type multiple choice
label status
choices
0
0 new
1 New
1
0 pending
1 Pending
2
0 waiting
1 Waiting
3
0 running
1 Running
4
0 successful
1 Successful
5
0 failed
1 Failed
6
0 error
1 Error
7
0 canceled
1 Canceled
failed
type boolean
label failed
started
type datetime
label started
finished
type datetime
label finished
elapsed
type decimal
label elapsed
job_explanation
type string
label job explanation
search_fields
0 description
1 name