Documentation

20. System Job Template List API Endpoint

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

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

The resulting data structure contains:

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

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

20.1. Results

Each system job template data structure includes the following fields:

  • id: Database ID for this system job template. (integer)
  • type: Data type for this system job template. (multiple choice)
    • system_job_template: System Job Template
  • url: URL for this system 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 system job template was created. (datetime)
  • modified: Timestamp when this system 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
  • job_type: (multiple choice)
    • "": ———
    • cleanup_jobs: Remove jobs older than a certain number of days
    • cleanup_activitystream: Remove activity stream entries older than a certain number of days
    • cleanup_deleted: Purge previously deleted items from the database
    • cleanup_facts: Purge and/or reduce the granularity of system tracking data

20.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 System Job Template List
description # List System Job Templates: Make a GET request to this resource to retrieve the list of system job templates.
renders
0 application/json
1 text/html
parses
0 application/json
added_in_version 1.2
types
0 system_job_template
actions
GET
id
type integer
label ID
help_text Database ID for this system job template.
type
type multiple choice
help_text Data type for this system job template.
choices
0
0 system_job_template
1 System Job Template
url
type string
help_text URL for this system 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 system job template was created.
modified
type datetime
help_text Timestamp when this system 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
job_type
type multiple choice
label job type
choices
0
0 (Empty Text)
1 ---------
1
0 cleanup_jobs
1 Remove jobs older than a certain number of days
2
0 cleanup_activitystream
1 Remove activity stream entries older than a certain number of days
3
0 cleanup_deleted
1 Purge previously deleted items from the database
4
0 cleanup_facts
1 Purge and/or reduce the granularity of system tracking data
search_fields
0 description
1 name