ジョブテンプレートリストの API エンドポイント
このリソースに GET リクエストを実行して、ジョブテンプレートリストを取得します。
GET /api/v1/job_templates/
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, POST, HEAD, OPTIONS
X-API-Time: 0.051s
 
 
返されるデータ構造には以下のものが含まれます。
{
    "count": 99,
    "next": null,
    "previous": null,
    "results": [
        ...
    ]
}
 
 
count フィールドはクエリーで見つかったジョブテンプレートの合計数を示します。next および previous フィールドは、単一ページに収まらない結果がある場合に、それらの結果へのリンクを提供します。results にはジョブテンプレートレコードが一覧表示されますが、ゼロの場合もあります。
結果
各ジョブテンプレートのデータ構造には以下のフィールドが含まれます。
id: ジョブテンプレートのデータベース ID (整数) 
type: ジョブテンプレートのデータタイプ (複数選択) 
- 
 
 
url: ジョブテンプレートの URL (文字列) 
related: 関連リソースの URL のあるデータ構造 (オブジェクト) 
summary_fields: 関連リソースの名前/説明のあるデータ構造 (オブジェクト) 
created: ジョブテンプレート作成時のタイムスタンプ (日時) 
modified: ジョブテンプレートの最終更新時のタイムスタンプ (日時) 
name: (文字列) 
description: (文字列) 
job_type: (複数選択) 
run: 実行 
check: チェック 
scan: スキャン 
 
 
inventory: (フィールド) 
project: (フィールド) 
playbook: (文字列) 
credential: (フィールド) 
cloud_credential: (フィールド) 
forks: (整数) 
limit: (文字列) 
verbosity: (複数選択) 
0: 0 (正常) 
1: 1 (詳細) 
2: 2 (より詳細) 
3: 3 (デバッグ) 
4: 4 (接続デバッグ) 
5: 5 (WinRM デバッグ) 
 
 
extra_vars: (文字列) 
job_tags: (文字列) 
force_handlers: (ブール値) 
skip_tags: (文字列) 
start_at_task: (文字列) 
last_job_run: (日時) 
last_job_failed: (ブール値) 
has_schedules: (ブール値) 
next_job_run: (日時) 
status: (複数選択) 
new: 新規 
pending: 保留中 
waiting: 待機中 
running: 実行中 
successful: 成功 
failed: 失敗 
error: エラー 
canceled: キャンセル済み 
never updated: 更新されていません 
 
 
host_config_key: (文字列) 
ask_variables_on_launch: (ブール値) 
survey_enabled: (ブール値) 
become_enabled: (ブール値) 
 
ジョブテンプレートの作成
新規ジョブテンプレートを作成するには、以下のジョブテンプレートフィールドを使ってリソースに POST リクエストを実行します。
name: (文字列。必須) 
description: (文字列。デフォルトは "") 
job_type: (複数選択。必須) 
run: 実行 (デフォルト) 
check: チェック 
scan: スキャン 
 
 
inventory: (フィールド。デフォルトは None) 
project: (フィールド。デフォルトは None) 
playbook: (文字列。デフォルトは "") 
credential: (フィールド。デフォルトは None) 
cloud_credential: (フィールド。デフォルトは None) 
forks: (整数。デフォルトは 0) 
limit: (文字列。デフォルトは "") 
verbosity: (複数選択) 
0: 0 (正常。これがデフォルト) 
1: 1 (詳細) 
2: 2 (より詳細) 
3: 3 (デバッグ) 
4: 4 (接続デバッグ) 
5: 5 (WinRM デバッグ) 
 
 
extra_vars: (文字列。デフォルトは "") 
job_tags: (文字列。デフォルトは "") 
force_handlers: (ブール値。デフォルトは False) 
skip_tags: (文字列。デフォルトは "") 
start_at_task: (文字列。デフォルトは "") 
host_config_key: (文字列。デフォルトは "") 
ask_variables_on_launch: (ブール値。デフォルトは False) 
survey_enabled: (ブール値。デフォルトは False) 
become_enabled: (ブール値。デフォルトは False) 
 
オプションエンドポイントの確認
オプションエンドポイント テーブルでは、このエンドポイントのオプションを確認できます。ブラウザー表示が可能な API でエンドポイントを表示している場合は、「オプション」ボタンをクリックすると以下の raw JSON が表示されます。
    
        | name | 
        
            Job Template List
         | 
    
    
        | description | 
        
            # List Job Templates: Make a GET request to this resource to retrieve the list of
job templates.
         | 
    
    
        | renders | 
        
            
                
                    | 0 | 
                    
                        application/json
                     | 
                 
                
                    | 1 | 
                    
                        text/html
                     | 
                 
             
         | 
    
    
        | parses | 
        
            
         | 
    
    
        | added_in_version | 
        
            1.2
         | 
    
    
        | actions | 
        
            
                
                    | POST | 
                    
                        
                            
                                | name | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    true
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                name
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                512
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | description | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                description
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | job_type | 
                                
                                    
                                        
                                            | type | 
                                            
                                                multiple choice
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    true
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                job type
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                run
                                             | 
                                         
                                        
                                            | choices | 
                                            
                                                
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | inventory | 
                                
                                    
                                        
                                            | type | 
                                            
                                                field
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                null
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | project | 
                                
                                    
                                        
                                            | type | 
                                            
                                                field
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                null
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | playbook | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                playbook
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                1024
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | credential | 
                                
                                    
                                        
                                            | type | 
                                            
                                                field
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                null
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | cloud_credential | 
                                
                                    
                                        
                                            | type | 
                                            
                                                field
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                null
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | forks | 
                                
                                    
                                        
                                            | type | 
                                            
                                                integer
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                forks
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                0
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | limit | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                limit
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                1024
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | verbosity | 
                                
                                    
                                        
                                            | type | 
                                            
                                                multiple choice
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                verbosity
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                0
                                             | 
                                         
                                        
                                            | choices | 
                                            
                                                
                                                    
                                                        | 0 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 1 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 2 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 3 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 4 | 
                                                        
                                                            
                                                                
                                                                    | 0 | 
                                                                    
                                                                        4
                                                                     | 
                                                                 
                                                                
                                                                    | 1 | 
                                                                    
                                                                        4 (Connection Debug)
                                                                     | 
                                                                 
                                                             
                                                         | 
                                                     
                                                    
                                                        | 5 | 
                                                        
                                                            
                                                         | 
                                                     
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | extra_vars | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                extra vars
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | job_tags | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                job tags
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                1024
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | force_handlers | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                force handlers
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | skip_tags | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                skip tags
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                1024
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | start_at_task | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                start at task
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                1024
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | host_config_key | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                host config key
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                1024
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | ask_variables_on_launch | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                ask variables on launch
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | survey_enabled | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                survey enabled
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | become_enabled | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                become enabled
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                         
                     | 
                 
                
                    | GET | 
                    
                        
                            
                                | id | 
                                
                                    
                                        
                                            | type | 
                                            
                                                integer
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                ID
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Database ID for this job template.
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | type | 
                                
                                    
                                        
                                            | type | 
                                            
                                                multiple choice
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Data type for this job template.
                                             | 
                                         
                                        
                                            | choices | 
                                            
                                                
                                                    
                                                        | 0 | 
                                                        
                                                            
                                                                
                                                                    | 0 | 
                                                                    
                                                                        job_template
                                                                     | 
                                                                 
                                                                
                                                                    | 1 | 
                                                                    
                                                                        Job Template
                                                                     | 
                                                                 
                                                             
                                                         | 
                                                     
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | url | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                URL for this 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 job template was created.
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | modified | 
                                
                                    
                                        
                                            | type | 
                                            
                                                datetime
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Timestamp when this job template was last modified.
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | name | 
                                
                                    
                                 | 
                             
                            
                                | description | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                description
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | job_type | 
                                
                                    
                                        
                                            | type | 
                                            
                                                multiple choice
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                job type
                                             | 
                                         
                                        
                                            | choices | 
                                            
                                                
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | inventory | 
                                
                                    
                                 | 
                             
                            
                                | project | 
                                
                                    
                                 | 
                             
                            
                                | playbook | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                playbook
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | credential | 
                                
                                    
                                 | 
                             
                            
                                | cloud_credential | 
                                
                                    
                                 | 
                             
                            
                                | forks | 
                                
                                    
                                 | 
                             
                            
                                | limit | 
                                
                                    
                                 | 
                             
                            
                                | verbosity | 
                                
                                    
                                        
                                            | type | 
                                            
                                                multiple choice
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                verbosity
                                             | 
                                         
                                        
                                            | choices | 
                                            
                                                
                                                    
                                                        | 0 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 1 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 2 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 3 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 4 | 
                                                        
                                                            
                                                                
                                                                    | 0 | 
                                                                    
                                                                        4
                                                                     | 
                                                                 
                                                                
                                                                    | 1 | 
                                                                    
                                                                        4 (Connection Debug)
                                                                     | 
                                                                 
                                                             
                                                         | 
                                                     
                                                    
                                                        | 5 | 
                                                        
                                                            
                                                         | 
                                                     
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | extra_vars | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                extra vars
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | job_tags | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                job tags
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | force_handlers | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                force handlers
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | skip_tags | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                skip tags
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | start_at_task | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                start at task
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | 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
                                             | 
                                         
                                        
                                            | choices | 
                                            
                                                
                                                    
                                                        | 0 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 1 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 2 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 3 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 4 | 
                                                        
                                                            
                                                                
                                                                    | 0 | 
                                                                    
                                                                        successful
                                                                     | 
                                                                 
                                                                
                                                                    | 1 | 
                                                                    
                                                                        Successful
                                                                     | 
                                                                 
                                                             
                                                         | 
                                                     
                                                    
                                                        | 5 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 6 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 7 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 8 | 
                                                        
                                                            
                                                                
                                                                    | 0 | 
                                                                    
                                                                        never updated
                                                                     | 
                                                                 
                                                                
                                                                    | 1 | 
                                                                    
                                                                        Never Updated
                                                                     | 
                                                                 
                                                             
                                                         | 
                                                     
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | host_config_key | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                host config key
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | ask_variables_on_launch | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                ask variables on launch
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | survey_enabled | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                survey enabled
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | become_enabled | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                become enabled
                                             | 
                                         
                                     
                                 | 
                             
                         
                     | 
                 
             
         | 
    
    
        | types | 
        
            
         | 
    
    
        | search_fields | 
        
            
         |