Retrieve a Project
get
/api/v2/projects/{id}/
Make GET request to this resource to retrieve a single project record containing the following fields:
id
: Database ID for this project. (integer)type
: Data type for this project. (choice)url
: URL for this project. (string)related
: Data structure with URLs of related resources. (object)summary_fields
: Data structure with name/description for related resources. The output for some objects may be limited for performance reasons. (object)created
: Timestamp when this project was created. (datetime)modified
: Timestamp when this project was last modified. (datetime)name
: Name of this project. (string)description
: Optional description of this project. (string)local_path
: Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project. (string)scm_type
: Specifies the source control system used to store the project. (choice)""
: Manualgit
: Githg
: Mercurialsvn
: Subversioninsights
: Red Hat Insightsarchive
: Remote Archive
scm_url
: The location where the project is stored. (string)scm_branch
: Specific branch, tag or commit to checkout. (string)scm_refspec
: For git projects, an additional refspec to fetch. (string)scm_clean
: Discard any local changes before syncing the project. (boolean)scm_delete_on_update
: Delete the project before syncing. (boolean)credential
: (id)timeout
: The amount of time (in seconds) to run before the task is canceled. (integer)scm_revision
: The last revision fetched by a project update (string)last_job_run
: (datetime)last_job_failed
: (boolean)next_job_run
: (datetime)status
: (choice)new
: Newpending
: Pendingwaiting
: Waitingrunning
: Runningsuccessful
: Successfulfailed
: Failederror
: Errorcanceled
: Cancelednever updated
: Never Updatedok
: OKmissing
: Missing
organization
: The organization used to determine access to this template. (id)scm_update_on_launch
: Update the project when a job is launched that uses the project. (boolean)scm_update_cache_timeout
: The number of seconds after the last project update ran that a new project update will be launched as a job dependency. (integer)allow_override
: Allow changing the SCM branch or revision in a job template that uses this project. (boolean)custom_virtualenv
: Local absolute file path containing a custom Python virtualenv to use (string)last_update_failed
: (boolean)last_updated
: (datetime)
Request
Supported Media Types
- application/json
Path Parameters
Query Parameters
-
search(optional): string
A search term.
Response
Supported Media Types
- application/json
200 Response
Example Response (application/json)
{
"allow_override":false,
"created":"2018-02-01T08:00:00.000000Z",
"credential":null,
"custom_virtualenv":null,
"description":"manual-proj-desc",
"id":1,
"last_job_failed":false,
"last_job_run":null,
"last_update_failed":false,
"last_updated":null,
"local_path":"_92__test_proj",
"modified":"2018-02-01T08:00:00.000000Z",
"name":"test-manual-proj",
"next_job_run":null,
"organization":1,
"related":{
"access_list":"/api/v2/projects/1/access_list/",
"activity_stream":"/api/v2/projects/1/activity_stream/",
"copy":"/api/v2/projects/1/copy/",
"inventory_files":"/api/v2/projects/1/inventories/",
"notification_templates_error":"/api/v2/projects/1/notification_templates_error/",
"notification_templates_started":"/api/v2/projects/1/notification_templates_started/",
"notification_templates_success":"/api/v2/projects/1/notification_templates_success/",
"object_roles":"/api/v2/projects/1/object_roles/",
"organization":"/api/v2/organizations/1/",
"playbooks":"/api/v2/projects/1/playbooks/",
"project_updates":"/api/v2/projects/1/project_updates/",
"schedules":"/api/v2/projects/1/schedules/",
"scm_inventory_sources":"/api/v2/projects/1/scm_inventory_sources/",
"teams":"/api/v2/projects/1/teams/",
"update":"/api/v2/projects/1/update/"
},
"scm_branch":"",
"scm_clean":false,
"scm_delete_on_update":false,
"scm_refspec":"",
"scm_revision":"",
"scm_type":"",
"scm_update_cache_timeout":0,
"scm_update_on_launch":false,
"scm_url":"",
"status":"missing",
"summary_fields":{
"object_roles":{
"admin_role":{
"description":"Can manage all aspects of the project",
"id":15,
"name":"Admin"
},
"read_role":{
"description":"May view settings for the project",
"id":18,
"name":"Read"
},
"update_role":{
"description":"May update the project",
"id":17,
"name":"Update"
},
"use_role":{
"description":"Can use the project in a job template",
"id":16,
"name":"Use"
}
},
"organization":{
"description":"test-org-desc",
"id":1,
"name":"test-org"
},
"user_capabilities":{
"copy":false,
"delete":true,
"edit":true,
"schedule":false,
"start":false
}
},
"timeout":0,
"type":"project",
"url":"/api/v2/projects/1/"
}