Note: The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.inertia-preview+json
Note: The Nested Teams API is currently available for developers to preview. See the blog post for full details. To access the API, you must provide a custom media type in the Accept header:
application/vnd.github.hellcat-preview+json
Warning: The API may change without advance notice during the preview period. Preview features are not supported for production use. If you experience any issues, contact your GitHub Enterprise site administrator.
Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have admin permissions for the project. The project and team must be part of the same organization.
PUT /teams/:team_id/projects/:project_id
| Name | Type | Description |
|---|---|---|
permission |
string |
The permission to grant to the team for this project. Can be one of: * read - team members can read, but not write to or administer this project.* write - team members can read and write, but not administer this project.* admin - team members can read, write and administer this project.Default: the team's permission attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs." Note: If you pass the hellcat-preview media type, you can promote—but not demote—a permission attribute inherited from a parent team. |
Status: 204 No Content
Status: 403 Forbidden
{
"message": "Must have admin rights to Repository.",
"documentation_url": "https://developer.github.com/enterprise/2.18/v3/teams/#add-or-update-team-project"
}