GitHub v3 REST API

Remove a repository from a team (Legacy)

DEPRECATED

Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Remove a repository from a team endpoint.

If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.

delete
{protocol}://{hostname}/api/v3/teams/{team_id}/repos/{owner}/{repo}

Path Parameters

team_idintegerrequired
ownerstringrequired
repostringrequired

Response

204

Response

delete/teams/{team_id}/repos/{owner}/{repo}
 
204

List child teams (Legacy)

DEPRECATED

Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List child teams endpoint.

get
{protocol}://{hostname}/api/v3/teams/{team_id}/teams

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

team_idintegerrequired

Response

application/json

if child teams exist

Groups of organization members that gives permissions on specified repositories.

idintegerrequired
node_idstringrequired
namestringrequired
slugstringrequired
descriptionstring | nullrequired
privacystring
permissionstringrequired
permissionsobject
Show Child Parameters
urlstring(uri)required
html_urlstring(uri)required

Example:https://github.com/orgs/rails/teams/core

members_urlstringrequired
repositories_urlstring(uri)required
parentobject | nullrequired

Groups of organization members that gives permissions on specified repositories.

Show Child Parameters
get/teams/{team_id}/teams
 
application/json

List teams for the authenticated user

List all of the teams across all of the organizations to which the authenticated user belongs. This method requires user, repo, or read:org scope when authenticating via OAuth.

get
{protocol}://{hostname}/api/v3/user/teams

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Response

application/json

Response

Groups of organization members that gives permissions on specified repositories.

idintegerrequired

Unique identifier of the team

Example:42

node_idstringrequired

Example:MDQ6VGVhbTE=

urlstring(uri)required

URL for the team

Example:https://api.github.com/organizations/1/team/1

html_urlstring(uri)required

Example:https://github.com/orgs/rails/teams/core

namestringrequired

Name of the team

Example:Developers

slugstringrequired

Example:justice-league

descriptionstring | nullrequired

Example:A great team.

privacystring

The level of privacy this team should have

Allowed values:closedsecret

Example:closed

permissionstringrequired

Permission that the team will have for its repositories

Example:push

members_urlstringrequired

Example:https://api.github.com/organizations/1/team/1/members{/member}

repositories_urlstring(uri)required

Example:https://api.github.com/organizations/1/team/1/repos

parentobject | null

Groups of organization members that gives permissions on specified repositories.

Show Child Parameters
members_countintegerrequired

Example:3

repos_countintegerrequired

Example:10

created_atstring(date-time)required

Example:2017-07-14T16:53:42Z

updated_atstring(date-time)required

Example:2017-08-17T12:37:15Z

organizationobjectrequired

Organization Full

Show Child Parameters
ldap_dnstring

Distinguished Name (DN) that team maps to within LDAP environment

Example:uid=example,ou=users,dc=github,dc=com

get/user/teams
 
application/json

Get the authenticated user

If the authenticated user is authenticated through basic authentication or OAuth with the user scope, then the response lists public and private profile information.

If the authenticated user is authenticated through OAuth without the user scope, then the response lists only public profile information.

get
{protocol}://{hostname}/api/v3/user

Response

application/json

Response

One Of
loginstringrequired

Example:octocat

idintegerrequired

Example:1

node_idstringrequired

Example:MDQ6VXNlcjE=

avatar_urlstring(uri)required

Example:https://github.com/images/error/octocat_happy.gif

gravatar_idstring | nullrequired

Example:41d064eb2195891e12d0413f63227ea7

urlstring(uri)required

Example:https://api.github.com/users/octocat

html_urlstring(uri)required

Example:https://github.com/octocat

followers_urlstring(uri)required

Example:https://api.github.com/users/octocat/followers

following_urlstringrequired

Example:https://api.github.com/users/octocat/following{/other_user}

gists_urlstringrequired

Example:https://api.github.com/users/octocat/gists{/gist_id}

starred_urlstringrequired

Example:https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_urlstring(uri)required

Example:https://api.github.com/users/octocat/subscriptions

organizations_urlstring(uri)required

Example:https://api.github.com/users/octocat/orgs

repos_urlstring(uri)required

Example:https://api.github.com/users/octocat/repos

events_urlstringrequired

Example:https://api.github.com/users/octocat/events{/privacy}

received_events_urlstring(uri)required

Example:https://api.github.com/users/octocat/received_events

typestringrequired

Example:User

site_adminbooleanrequired
namestring | nullrequired

Example:monalisa octocat

companystring | nullrequired

Example:GitHub

blogstring | nullrequired

Example:https://github.com/blog

locationstring | nullrequired

Example:San Francisco

emailstring | null(email)required

Example:octocat@github.com

hireableboolean | nullrequired
biostring | nullrequired

Example:There once was...

public_reposintegerrequired

Example:2

public_gistsintegerrequired

Example:1

followersintegerrequired

Example:20

followingintegerrequired

Example:0

created_atstring(date-time)required

Example:2008-01-14T04:33:35Z

updated_atstring(date-time)required

Example:2008-01-14T04:33:35Z

private_gistsintegerrequired

Example:81

total_private_reposintegerrequired

Example:100

owned_private_reposintegerrequired

Example:100

disk_usageintegerrequired

Example:10000

collaboratorsintegerrequired

Example:8

two_factor_authenticationbooleanrequired

Example:true

planobject
Show Child Parameters
suspended_atstring | null(date-time)
business_plusboolean
ldap_dnstring
get/user
 
application/json

Update the authenticated user

Note: If your email is set to private and you send an email parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.

patch
{protocol}://{hostname}/api/v3/user

Body

application/json
namestring

The new name of the user.

Example:Omar Jahandar

emailstring

The publicly visible email address of the user.

Example:omar@example.com

blogstring

The new blog URL of the user.

Example:blog.example.com

twitter_usernamestring | null

The new Twitter username of the user.

Example:therealomarj

companystring

The new company of the user.

Example:Acme corporation

locationstring

The new location of the user.

Example:Berlin, Germany

hireableboolean

The new hiring availability of the user.

biostring

The new short biography of the user.

Response

application/json

Response

Private User

Private User

loginstringrequired

Example:octocat

idintegerrequired

Example:1

node_idstringrequired

Example:MDQ6VXNlcjE=

avatar_urlstring(uri)required

Example:https://github.com/images/error/octocat_happy.gif

gravatar_idstring | nullrequired

Example:41d064eb2195891e12d0413f63227ea7

urlstring(uri)required

Example:https://api.github.com/users/octocat

html_urlstring(uri)required

Example:https://github.com/octocat

followers_urlstring(uri)required

Example:https://api.github.com/users/octocat/followers

following_urlstringrequired

Example:https://api.github.com/users/octocat/following{/other_user}

gists_urlstringrequired

Example:https://api.github.com/users/octocat/gists{/gist_id}

starred_urlstringrequired

Example:https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_urlstring(uri)required

Example:https://api.github.com/users/octocat/subscriptions

organizations_urlstring(uri)required

Example:https://api.github.com/users/octocat/orgs

repos_urlstring(uri)required

Example:https://api.github.com/users/octocat/repos

events_urlstringrequired

Example:https://api.github.com/users/octocat/events{/privacy}

received_events_urlstring(uri)required

Example:https://api.github.com/users/octocat/received_events

typestringrequired

Example:User

site_adminbooleanrequired
namestring | nullrequired

Example:monalisa octocat

companystring | nullrequired

Example:GitHub

blogstring | nullrequired

Example:https://github.com/blog

locationstring | nullrequired

Example:San Francisco

emailstring | null(email)required

Example:octocat@github.com

hireableboolean | nullrequired
biostring | nullrequired

Example:There once was...

public_reposintegerrequired

Example:2

public_gistsintegerrequired

Example:1

followersintegerrequired

Example:20

followingintegerrequired

Example:0

created_atstring(date-time)required

Example:2008-01-14T04:33:35Z

updated_atstring(date-time)required

Example:2008-01-14T04:33:35Z

private_gistsintegerrequired

Example:81

total_private_reposintegerrequired

Example:100

owned_private_reposintegerrequired

Example:100

disk_usageintegerrequired

Example:10000

collaboratorsintegerrequired

Example:8

two_factor_authenticationbooleanrequired

Example:true

planobject
Show Child Parameters
suspended_atstring | null(date-time)
business_plusboolean
ldap_dnstring
patch/user

Body

{}
 
application/json