GitHub v3 REST API

Check team permissions for a project

Checks whether a team has read, write, or admin permissions for an organization project. The response includes projects inherited from a parent team.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/projects/{project_id}.

get
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/projects/{project_id}

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

project_idintegerrequired

Response

application/json

Response

Team Project

A team’s access to a project.

owner_urlstringrequired
urlstringrequired
html_urlstringrequired
columns_urlstringrequired
idintegerrequired
node_idstringrequired
namestringrequired
bodystring | nullrequired
numberintegerrequired
statestringrequired
creatorobjectrequired

Simple User

Show Child Parameters
created_atstringrequired
updated_atstringrequired
organization_permissionstring

The organization permission for this project. Only present when owner is an organization.

privateboolean

Whether the project is private or not. Only present when owner is an organization.

permissionsobjectrequired
Show Child Parameters
get/orgs/{org}/teams/{team_slug}/projects/{project_id}
 
application/json

Add or update team project permissions

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.

Note: You can also specify a team by org_id and team_id using the route PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}.

put
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/projects/{project_id}

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

project_idintegerrequired

Body

application/json
permissionstring

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.”

Allowed values:readwriteadmin

Response

Response

put/orgs/{org}/teams/{team_slug}/projects/{project_id}

Body

{}
 

Remove a project from a team

Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have read access to both the team and project, or admin access to the team or project. This endpoint removes the project from the team, but does not delete the project.

Note: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}.

delete
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/projects/{project_id}

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

project_idintegerrequired

Response

204

Response

delete/orgs/{org}/teams/{team_slug}/projects/{project_id}
 
204

List team repositories

Lists a team’s repositories visible to the authenticated user.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/repos.

get
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/repos

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

Response

200 application/json

Response

Minimal Repository

idintegerrequired

Example:1296269

node_idstringrequired

Example:MDEwOlJlcG9zaXRvcnkxMjk2MjY5

namestringrequired

Example:Hello-World

full_namestringrequired

Example:octocat/Hello-World

ownerobjectrequired

Simple User

Show Child Parameters
privatebooleanrequired
html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World

descriptionstring | nullrequired

Example:This your first repo!

forkbooleanrequired
urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World

archive_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}

assignees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/assignees{/user}

blobs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}

branches_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/branches{/branch}

collaborators_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}

comments_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/comments{/number}

commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/commits{/sha}

compare_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}

contents_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/contents/{+path}

contributors_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/contributors

deployments_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/deployments

downloads_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/downloads

events_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/events

forks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/forks

git_commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}

git_refs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}

git_tags_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}

git_urlstring
issue_comment_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}

issue_events_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/events{/number}

issues_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues{/number}

keys_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/keys{/key_id}

labels_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/labels{/name}

languages_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/languages

merges_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/merges

milestones_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/milestones{/number}

notifications_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}

pulls_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/pulls{/number}

releases_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/releases{/id}

ssh_urlstring
stargazers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/stargazers

statuses_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/statuses/{sha}

subscribers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscribers

subscription_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscription

tags_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/tags

teams_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/teams

trees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}

clone_urlstring
mirror_urlstring | null
hooks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/hooks

svn_urlstring
homepagestring | null
languagestring | null
forks_countinteger
stargazers_countinteger
watchers_countinteger
sizeinteger
default_branchstring
open_issues_countinteger
is_templateboolean
topicsarray[string]
has_issuesboolean
has_projectsboolean
has_wikiboolean
has_pagesboolean
has_downloadsboolean
archivedboolean
disabledboolean
visibilitystring
pushed_atstring | null(date-time)

Example:2011-01-26T19:06:43Z

created_atstring | null(date-time)

Example:2011-01-26T19:01:12Z

updated_atstring | null(date-time)

Example:2011-01-26T19:14:43Z

permissionsobject
Show Child Parameters
template_repositoryobject | null

A git repository

Show Child Parameters
temp_clone_tokenstring
delete_branch_on_mergeboolean
subscribers_countinteger
network_countinteger
code_of_conductobject

Code Of Conduct

Show Child Parameters
licenseobject | null
Show Child Parameters
forksinteger

Example:0

open_issuesinteger

Example:0

watchersinteger

Example:0

allow_forkingboolean
get/orgs/{org}/teams/{team_slug}/repos
 
200 application/json

Check team permissions for a repository

Checks whether a team has admin, push, maintain, triage, or pull permission for a repository. Repositories inherited through a parent team will also be checked.

You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom media type via the application/vnd.github.v3.repository+json accept header.

If a team doesn’t have permission for the repository, you will receive a 404 Not Found response status.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}.

get
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

ownerstringrequired
repostringrequired

Response

application/json

Alternative response with repository permissions

Team Repository

A team’s access to a repository.

idintegerrequired

Unique identifier of the repository

Example:42

node_idstringrequired

Example:MDEwOlJlcG9zaXRvcnkxMjk2MjY5

namestringrequired

The name of the repository.

Example:Team Environment

full_namestringrequired

Example:octocat/Hello-World

licenseobject | nullrequired

License Simple

Show Child Parameters
forksintegerrequired
permissionsobject
Show Child Parameters
ownerobject | nullrequired

Simple User

Show Child Parameters
privatebooleanrequired

Whether the repository is private or public.

Default:false

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World

descriptionstring | nullrequired

Example:This your first repo!

forkbooleanrequired
urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World

archive_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}

assignees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/assignees{/user}

blobs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}

branches_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/branches{/branch}

collaborators_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}

comments_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/comments{/number}

commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/commits{/sha}

compare_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}

contents_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/contents/{+path}

contributors_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/contributors

deployments_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/deployments

downloads_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/downloads

events_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/events

forks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/forks

git_commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}

git_refs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}

git_tags_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}

git_urlstringrequired

Example:git:github.com/octocat/Hello-World.git

issue_comment_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}

issue_events_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/events{/number}

issues_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues{/number}

keys_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/keys{/key_id}

labels_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/labels{/name}

languages_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/languages

merges_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/merges

milestones_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/milestones{/number}

notifications_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}

pulls_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/pulls{/number}

releases_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/releases{/id}

ssh_urlstringrequired

Example:git@github.com:octocat/Hello-World.git

stargazers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/stargazers

statuses_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/statuses/{sha}

subscribers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscribers

subscription_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscription

tags_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/tags

teams_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/teams

trees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}

clone_urlstringrequired

Example:https://github.com/octocat/Hello-World.git

mirror_urlstring | null(uri)required

Example:git:git.example.com/octocat/Hello-World

hooks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/hooks

svn_urlstring(uri)required

Example:https://svn.github.com/octocat/Hello-World

homepagestring | null(uri)required

Example:https://github.com

languagestring | nullrequired
forks_countintegerrequired

Example:9

stargazers_countintegerrequired

Example:80

watchers_countintegerrequired

Example:80

sizeintegerrequired

Example:108

default_branchstringrequired

The default branch of the repository.

Example:master

open_issues_countintegerrequired

Example:0

is_templateboolean

Whether this repository acts as a template that can be used to generate new repositories.

Default:false

Example:true

topicsarray[string]
has_issuesbooleanrequired

Whether issues are enabled.

Default:true

Example:true

has_projectsbooleanrequired

Whether projects are enabled.

Default:true

Example:true

has_wikibooleanrequired

Whether the wiki is enabled.

Default:true

Example:true

has_pagesbooleanrequired
has_downloadsbooleanrequired

Whether downloads are enabled.

Default:true

Example:true

archivedbooleanrequired

Whether the repository is archived.

Default:false

disabledbooleanrequired

Returns whether or not this repository disabled.

visibilitystring

The repository visibility: public, private, or internal.

Default:public

pushed_atstring | null(date-time)required

Example:2011-01-26T19:06:43Z

created_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

updated_atstring | null(date-time)required

Example:2011-01-26T19:14:43Z

allow_rebase_mergeboolean

Whether to allow rebase merges for pull requests.

Default:true

Example:true

template_repositoryobject | null

A git repository

Show Child Parameters
temp_clone_tokenstring
allow_squash_mergeboolean

Whether to allow squash merges for pull requests.

Default:true

Example:true

delete_branch_on_mergeboolean

Whether to delete head branches when pull requests are merged

Default:false

Example:false

allow_merge_commitboolean

Whether to allow merge commits for pull requests.

Default:true

Example:true

allow_forkingboolean

Whether to allow forking this repo

Default:false

Example:false

subscribers_countinteger
network_countinteger
open_issuesintegerrequired
watchersintegerrequired
master_branchstring
get/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}
 
application/json