Update a Project
patch
/api/v2/projects/{id}/
Make a PUT or PATCH request to this resource to update this project. The following fields may be modified:
name
: Name of this project. (string, required)description
: Optional description of this project. (string, default=""
)local_path
: Local path (relative to PROJECTS_ROOT) containing playbooks and related files for this project. (string, default=""
)scm_type
: Specifies the source control system used to store the project. (choice)""
: Manual (default)git
: Gitsvn
: Subversioninsights
: Red Hat Insightsarchive
: Remote Archive
scm_url
: The location where the project is stored. (string, default=""
)scm_branch
: Specific branch, tag or commit to checkout. (string, default=""
)scm_refspec
: For git projects, an additional refspec to fetch. (string, default=""
)scm_clean
: Discard any local changes before syncing the project. (boolean, default=False
)scm_track_submodules
: Track submodules latest commits on defined branch. (boolean, default=False
)scm_delete_on_update
: Delete the project before syncing. (boolean, default=False
)credential
: (id, default=``)-
timeout
: The amount of time (in seconds) to run before the task is canceled. (integer, default=0
) -
organization
: The organization used to determine access to this template. (id, default=``) scm_update_on_launch
: Update the project when a job is launched that uses the project. (boolean, default=False
)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, default=0
)-
allow_override
: Allow changing the SCM branch or revision in a job template that uses this project. (boolean, default=False
) -
default_environment
: The default execution environment for jobs run using this project. (id, default=``)
For a PATCH request, include only the fields that are being modified.
Request
Supported Media Types
- application/json
Path Parameters
Query Parameters
-
search: string
A search term.
Root Schema : schema
Example:
{
"name":"foooooo"
}
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,
"default_environment":null,
"description":"",
"id":"1",
"last_job_failed":false,
"last_job_run":null,
"last_update_failed":false,
"last_updated":null,
"local_path":"",
"modified":"2018-02-01T08:00:00.000000Z",
"name":"foooooo",
"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_track_submodules":false,
"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":"16",
"name":"Admin"
},
"read_role":{
"description":"May view settings for the project",
"id":"19",
"name":"Read"
},
"update_role":{
"description":"May update the project",
"id":"18",
"name":"Update"
},
"use_role":{
"description":"Can use the project in a job template",
"id":"17",
"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/"
}
400 Response
Example Response (application/json)
{
"local_path":[
"Cannot change local_path for git-based projects"
]
}