プロジェクトリストの API エンドポイント
このリソースに GET リクエストを実行して、プロジェクトリストを取得します。
GET /api/v1/projects/
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, POST, HEAD, OPTIONS
X-API-Time: 0.053s
 
 
返されるデータ構造には以下のものが含まれます。
{
    "count": 99,
    "next": null,
    "previous": null,
    "results": [
        ...
    ]
}
 
 
count フィールドはクエリーで見つかったプロジェクトの合計数を示します。next および previous フィールドは、単一ページに収まらない結果がある場合に、それらの結果へのリンクを提供します。results にはプロジェクトレコードが一覧表示されますが、ゼロの場合もあります。
結果
各プロジェクトデータ構造には以下のフィールドが含まれます。
id: プロジェクトのデータベース ID (整数) 
type: プロジェクトのデータタイプ (複数選択) 
- 
 
 
url: プロジェクトの URL (文字列) 
related: 関連リソースの URL のあるデータ構造 (オブジェクト) 
summary_fields: 関連リソースの名前/説明のあるデータ構造 (オブジェクト) 
created: プロジェクト作成時のタイムスタンプ (日時) 
modified: プロジェクトの最終更新時のタイムスタンプ (日時) 
name: (文字列) 
description: (文字列) 
local_path: このプロジェクトの Playbook および関連するファイルを含むローカルパス (PROJECTS_ROOT との相対) (文字列) 
scm_type: (複数選択) 
"": 手動 
git: Git 
hg: Mercurial 
svn: Subversion 
 
 
scm_url: (文字列) 
scm_branch: チェックアウトする特定のブランチ、タグまたはコミット (文字列) 
scm_clean: (ブール値) 
scm_delete_on_update: (ブール値) 
credential: (フィールド) 
last_job_run: (日時) 
last_job_failed: (ブール値) 
has_schedules: (ブール値) 
next_job_run: (日時) 
status: (複数選択) 
new: 新規 
pending: 保留中 
waiting: 待機中 
running: 実行中 
successful: 成功 
failed: 失敗 
error: エラー 
canceled: キャンセル済み 
never updated: 更新されていません 
ok: OK 
missing: 不明 
 
 
scm_delete_on_next_update: (ブール値) 
scm_update_on_launch: (ブール値) 
scm_update_cache_timeout: (整数) 
last_update_failed: (ブール値) 
last_updated: (日時) 
 
プロジェクトの作成
新規プロジェクトを作成するには、以下のプロジェクトフィールドを使ってリソースに POST リクエストを実行します。
name: (文字列。必須) 
description: (文字列。デフォルトは "") 
local_path: このプロジェクトの Playbook および関連するファイルを含むローカルパス (PROJECTS_ROOT との相対) (文字列。デフォルトは "") 
scm_type: (複数選択) 
"": 手動 (デフォルト) 
git: Git 
hg: Mercurial 
svn: Subversion 
 
 
scm_url: (文字列。デフォルトは "") 
scm_branch: チェックアウトする特定のブランチ、タグまたはコミット (文字列。デフォルトは "") 
scm_clean: (ブール値。デフォルトは False) 
scm_delete_on_update: (ブール値。デフォルトは False) 
credential: (フィールド。デフォルトは None) 
scm_update_on_launch: (ブール値。デフォルトは False) 
scm_update_cache_timeout: (整数。デフォルトは 0) 
 
オプションエンドポイントの確認
オプションエンドポイント テーブルでは、このエンドポイントのオプションを確認できます。ブラウザー表示が可能な API でエンドポイントを表示している場合は、「オプション」ボタンをクリックすると以下の raw JSON が表示されます。
    
        | name | 
        
            Project List
         | 
    
    
        | description | 
        
            # List Projects: Make a GET request to this resource to retrieve the list of
projects.
         | 
    
    
        | 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)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | local_path | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                local path
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                1024
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_type | 
                                
                                    
                                        
                                            | type | 
                                            
                                                multiple choice
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                SCM Type
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                        
                                            | choices | 
                                            
                                                
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_url | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                SCM URL
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                1024
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_branch | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                SCM Branch
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Specific branch, tag or commit to checkout.
                                             | 
                                         
                                        
                                            | max_length | 
                                            
                                                256
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                (Empty Text)
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_clean | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                scm clean
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_delete_on_update | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                scm delete on update
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | credential | 
                                
                                    
                                        
                                            | type | 
                                            
                                                field
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                null
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_update_on_launch | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                scm update on launch
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_update_cache_timeout | 
                                
                                    
                                        
                                            | type | 
                                            
                                                integer
                                             | 
                                         
                                        
                                            | required | 
                                            
                                                 
                                                    false
                                                 
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                scm update cache timeout
                                             | 
                                         
                                        
                                            | default | 
                                            
                                                0
                                             | 
                                         
                                     
                                 | 
                             
                         
                     | 
                 
                
                    | GET | 
                    
                        
                            
                                | id | 
                                
                                    
                                        
                                            | type | 
                                            
                                                integer
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                ID
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Database ID for this project.
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | type | 
                                
                                    
                                        
                                            | type | 
                                            
                                                multiple choice
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Data type for this project.
                                             | 
                                         
                                        
                                            | choices | 
                                            
                                                
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | url | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                URL for this project.
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | 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 project was created.
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | modified | 
                                
                                    
                                        
                                            | type | 
                                            
                                                datetime
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Timestamp when this project was last modified.
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | name | 
                                
                                    
                                 | 
                             
                            
                                | description | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                description
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | local_path | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                local path
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project.
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_type | 
                                
                                    
                                        
                                            | type | 
                                            
                                                multiple choice
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                SCM Type
                                             | 
                                         
                                        
                                            | choices | 
                                            
                                                
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_url | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                SCM URL
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_branch | 
                                
                                    
                                        
                                            | type | 
                                            
                                                string
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                SCM Branch
                                             | 
                                         
                                        
                                            | help_text | 
                                            
                                                Specific branch, tag or commit to checkout.
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_clean | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                scm clean
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_delete_on_update | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                scm delete on update
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | credential | 
                                
                                    
                                 | 
                             
                            
                                | 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
                                                                     | 
                                                                 
                                                             
                                                         | 
                                                     
                                                    
                                                        | 9 | 
                                                        
                                                            
                                                         | 
                                                     
                                                    
                                                        | 10 | 
                                                        
                                                            
                                                         | 
                                                     
                                                 
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_delete_on_next_update | 
                                
                                    
                                 | 
                             
                            
                                | scm_update_on_launch | 
                                
                                    
                                        
                                            | type | 
                                            
                                                boolean
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                scm update on launch
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | scm_update_cache_timeout | 
                                
                                    
                                        
                                            | type | 
                                            
                                                integer
                                             | 
                                         
                                        
                                            | label | 
                                            
                                                scm update cache timeout
                                             | 
                                         
                                     
                                 | 
                             
                            
                                | last_update_failed | 
                                
                                    
                                 | 
                             
                            
                                | last_updated | 
                                
                                    
                                 | 
                             
                         
                     | 
                 
             
         | 
    
    
        | types | 
        
            
         | 
    
    
        | search_fields | 
        
            
         |