Documentation

23. Unified Job Template List API Endpoint

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

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

The resulting data structure contains:

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

The count field indicates the total number of unified job templates 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 template records.

23.1. Results

Each unified job template data structure includes the following fields:

  • id: Database ID for this unified job template. (integer)
  • type: Data type for this unified job template. (multiple choice)
    • project: Project
    • inventory_source: Inventory Source
    • job_template: Job Template
    • system_job_template: System Job Template
  • url: URL for this unified job template. (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 template was created. (datetime)
  • modified: Timestamp when this unified job template was last modified. (datetime)
  • name: (string)
  • description: (string)
  • last_job_run: (datetime)
  • last_job_failed: (boolean)
  • has_schedules: (boolean)
  • next_job_run: (datetime)
  • status: (multiple choice)
    • new: New
    • pending: Pending
    • waiting: Waiting
    • running: Running
    • successful: Successful
    • failed: Failed
    • error: Error
    • canceled: Canceled
    • never updated: Never Updated
    • ok: OK
    • missing: Missing
    • none: No External Source
    • updating: Updating

23.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 Template List
description # List Unified Job Templates: Make a GET request to this resource to retrieve the list of unified job templates.
renders
0 application/json
1 text/html
parses
0 application/json
added_in_version 1.4.8
types
0 project
1 inventory_source
2 job_template
3 system_job_template
actions
GET
id
type integer
label ID
help_text Database ID for this unified job template.
type
type multiple choice
help_text Data type for this unified job template.
choices
0
0 project
1 Project
1
0 inventory_source
1 Inventory Source
2
0 job_template
1 Job Template
3
0 system_job_template
1 System Job Template
url
type string
help_text URL for this unified job template.
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 template was created.
modified
type datetime
help_text Timestamp when this unified job template was last modified.
name
type string
label name
description
type string
label description
last_job_run
type datetime
label last job run
last_job_failed
type boolean
label last job failed
has_schedules
type boolean
label has schedules
next_job_run
type datetime
label next job run
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
8
0 never updated
1 Never Updated
9
0 ok
1 OK
10
0 missing
1 Missing
11
0 none
1 No External Source
12
0 updating
1 Updating
search_fields
0 description
1 name