Teams
Download SpecInteract with GitHub Teams.
Get an external group
Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to.
You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "GitHub's products" in the GitHub Help documentation.
org
string
required
The organization name. The name is not case sensitive.
group_id
int
required
The unique identifier of the group.
Response
Response
{
"group_id": "123",
"group_name": "Octocat admins",
"updated_at": "2021-01-24T11:31:04-06:00",
"teams": [
{
"team_id": 1,
"team_name": "team-test"
},
{
"team_id": 2,
"team_name": "team-test2"
}
],
"members": [
{
"member_id": 1,
"member_login": "mona-lisa_eocsaxrs",
"member_name": "Mona Lisa",
"member_email": "mona_lisa@github.com"
},
{
"member_id": 2,
"member_login": "octo-lisa_eocsaxrs",
"member_name": "Octo Lisa",
"member_email": "octo_lisa@github.com"
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
group_id
int
required
The internal ID of the group
- Example
- 1
group_name
string
required
The display name for the group
- Example
- "group-azuread-test"
updated_at
string
The date when the group was last updated_at
- Example
- "2021-01-03 22:27:15:000 -700"
teams
array[object]
required
An array of teams linked to this group
- Example
- [ { "team_id": 1, "team_name": "team-test" }, { "team_id": 2, "team_name": "team-test2" } ]
object
team_id
int
required
The id for a team
- Example
- 1
team_name
string
required
The name of the team
- Example
- "team-test"
members
array[object]
required
An array of external members linked to this group
- Example
- [ { "member_id": 1, "member_login": "mona-lisa_eocsaxrs", "member_name": "Mona Lisa", "member_email": "mona_lisa@github.com" }, { "member_id": 2, "member_login": "octo-lisa_eocsaxrs", "member_name": "Octo Lisa", "member_email": "octo_lisa@github.com" } ]
object
member_id
int
required
The internal user ID of the identity
- Example
- 1
member_login
string
required
The handle/login for the user
- Example
- "mona-lisa_eocsaxrs"
member_name
string
required
The user display name/profile name
- Example
- "Mona Lisa"
member_email
string
required
An email attached to a user
- Example
- "mona_lisa@github.com"
List external groups in an organization
Lists external groups available in an organization. You can query the groups using the display_name
parameter, only groups with a group_name
containing the text provided in the display_name
parameter will be returned. You can also limit your page results using the per_page
parameter. GitHub Enterprise Server generates a url-encoded page
token using a cursor value for where the next page begins. For more information on cursor pagination, see "Offset and Cursor Pagination explained."
You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "GitHub's products" in the GitHub Help documentation.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page token
display_name
string
Limits the list to groups containing the text in the group name
org
string
required
The organization name. The name is not case sensitive.
Response
Response
{
"groups": [
{
"group_id": "123",
"group_name": "Octocat admins",
"updated_at": "2021-01-24T11:31:04-06:00"
},
{
"group_id": "456",
"group_name": "Octocat docs members",
"updated_at": "2021-03-24T11:31:04-06:00"
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
groups
array[object]
An array of external groups available to be mapped to a team
- Example
- [ { "group_id": 1, "group_name": "group-azuread-test", "updated_at": "2021-01-03 22:27:15:000 -700" }, { "group_id": 2, "group_name": "group-azuread-test2", "updated_at": "2021-06-03 22:27:15:000 -700" } ]
object
group_id
int
required
The internal ID of the group
- Example
- 1
group_name
string
required
The display name of the group
- Example
- "group-azuread-test"
updated_at
string
required
The time of the last update for this group
- Example
- "2019-06-03 22:27:15:000 -700"
Link
string
List teams
Lists all teams in an organization that are visible to the authenticated user.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
org
string
required
The organization name. The name is not case sensitive.
Response
Response
[
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"parent": null
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Team)]
- Content Type
- application/json
Team
object (Team)
Groups of organization members that gives permissions on specified repositories.
id
int
required
node_id
string
required
name
string
required
slug
string
required
description
string or null
required
privacy
string
permission
string
required
permissions
object (permissions)
pull
boolean
required
triage
boolean
required
push
boolean
required
maintain
boolean
required
admin
boolean
required
url
string
uri
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
members_url
string
required
repositories_url
string
uri
required
parent
object (parent) or null
required
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
Link
string
Create a team
To create a team, the authenticated user must be a member or owner of {org}
. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "Setting team creation permissions."
When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of maintainers
. For more information, see "About teams".
name
string
required
The name of the team.
description
string
The description of the team.
maintainers
array[string]
List GitHub IDs for organization members who will become team maintainers.
string
repo_names
array[string]
The full name (e.g., "organization-name/repository-name") of repositories to add the team to.
string
privacy
string
The level of privacy this team should have. The options are:
For a non-nested team:
secret
- only visible to organization owners and members of this team.closed
- visible to all members of this organization.
Default:secret
For a parent or child team:closed
- visible to all members of this organization.
Default for child team:closed
- Enum
-
- secret
- closed
permission
string
Deprecated. The permission that new repositories will be added to the team with when none is specified.
- Default
- "pull"
- Enum
-
- pull
- push
parent_team_id
int
The ID of a team to set as the parent team.
ldap_dn
string
The distinguished name (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the "Update LDAP mapping for a team" endpoint to change the LDAP DN. For more information, see "Using LDAP."
org
string
required
The organization name. The name is not case sensitive.
Request
{
"name": "Justice League",
"description": "A great team",
"permission": "push",
"privacy": "closed"
}
Response
Response
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"members_count": 3,
"repos_count": 10,
"created_at": "2017-07-14T16:53:42Z",
"updated_at": "2017-08-17T12:37:15Z",
"organization": {
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"ldap_dn": "uid=asdf,ou=users,dc=github,dc=com"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
id
int
required
Unique identifier of the team
- Example
- 42
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
name
string
required
Name of the team
- Example
- "Developers"
slug
string
required
- Example
- "justice-league"
description
string or null
required
- Example
- "A great team."
privacy
string
The level of privacy this team should have
- Enum
-
- closed
- secret
- Example
- "closed"
permission
string
required
Permission that the team will have for its repositories
- Example
- "push"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
parent
object (parent) or null
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
members_count
int
required
- Example
- 3
repos_count
int
required
- Example
- 10
created_at
string
date-time
required
- Example
- "2017-07-14T16:53:42Z"
updated_at
string
date-time
required
- Example
- "2017-08-17T12:37:15Z"
organization
object (organization)
required
Team Organization
login
string
required
- Example
- "github"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDEyOk9yZ2FuaXphdGlvbjE="
url
string
uri
required
- Example
- "https://api.github.com/orgs/github"
repos_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/repos"
events_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/events"
hooks_url
string
required
- Example
- "https://api.github.com/orgs/github/hooks"
issues_url
string
required
- Example
- "https://api.github.com/orgs/github/issues"
members_url
string
required
- Example
- "https://api.github.com/orgs/github/members{/member}"
public_members_url
string
required
- Example
- "https://api.github.com/orgs/github/public_members{/member}"
avatar_url
string
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
description
string or null
required
- Example
- "A great organization"
name
string
- Example
- "github"
company
string
- Example
- "GitHub"
blog
string
uri
- Example
- "https://github.com/blog"
location
string
- Example
- "San Francisco"
string
- Example
- "octocat@github.com"
twitter_username
string or null
- Example
- "github"
is_verified
boolean
- Example
- true
has_organization_projects
boolean
required
- Example
- true
has_repository_projects
boolean
required
- Example
- true
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
html_url
string
uri
required
- Example
- "https://github.com/octocat"
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
type
string
required
- Example
- "Organization"
total_private_repos
int
- Example
- 100
owned_private_repos
int
- Example
- 100
private_gists
int or null
- Example
- 81
disk_usage
int or null
- Example
- 10000
collaborators
int or null
- Example
- 8
billing_email
string or null
- Example
- "org@example.com"
plan
object (plan)
name
string
required
space
int
required
private_repos
int
required
filled_seats
int
seats
int
default_repository_permission
string or null
members_can_create_repositories
boolean or null
- Example
- true
two_factor_requirement_enabled
boolean or null
- Example
- true
members_allowed_repository_creation_type
string
- Example
- "all"
members_can_create_public_repositories
boolean
- Example
- true
members_can_create_private_repositories
boolean
- Example
- true
members_can_create_internal_repositories
boolean
- Example
- true
members_can_create_pages
boolean
- Example
- true
members_can_create_public_pages
boolean
- Example
- true
members_can_create_private_pages
boolean
- Example
- true
members_can_fork_private_repositories
boolean or null
- Example
- false
web_commit_signoff_required
boolean
- Example
- false
updated_at
string
date-time
required
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
Get a team by name
Gets a team using the team's slug
. To create the slug
, GitHub Enterprise Server replaces special characters in the name
string, changes all words to lowercase, and replaces spaces with a -
separator. For example, "My TEam Näme"
would become my-team-name
.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Response
Response
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"members_count": 3,
"repos_count": 10,
"created_at": "2017-07-14T16:53:42Z",
"updated_at": "2017-08-17T12:37:15Z",
"organization": {
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"ldap_dn": "uid=asdf,ou=users,dc=github,dc=com"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
id
int
required
Unique identifier of the team
- Example
- 42
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
name
string
required
Name of the team
- Example
- "Developers"
slug
string
required
- Example
- "justice-league"
description
string or null
required
- Example
- "A great team."
privacy
string
The level of privacy this team should have
- Enum
-
- closed
- secret
- Example
- "closed"
permission
string
required
Permission that the team will have for its repositories
- Example
- "push"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
parent
object (parent) or null
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
members_count
int
required
- Example
- 3
repos_count
int
required
- Example
- 10
created_at
string
date-time
required
- Example
- "2017-07-14T16:53:42Z"
updated_at
string
date-time
required
- Example
- "2017-08-17T12:37:15Z"
organization
object (organization)
required
Team Organization
login
string
required
- Example
- "github"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDEyOk9yZ2FuaXphdGlvbjE="
url
string
uri
required
- Example
- "https://api.github.com/orgs/github"
repos_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/repos"
events_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/events"
hooks_url
string
required
- Example
- "https://api.github.com/orgs/github/hooks"
issues_url
string
required
- Example
- "https://api.github.com/orgs/github/issues"
members_url
string
required
- Example
- "https://api.github.com/orgs/github/members{/member}"
public_members_url
string
required
- Example
- "https://api.github.com/orgs/github/public_members{/member}"
avatar_url
string
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
description
string or null
required
- Example
- "A great organization"
name
string
- Example
- "github"
company
string
- Example
- "GitHub"
blog
string
uri
- Example
- "https://github.com/blog"
location
string
- Example
- "San Francisco"
string
- Example
- "octocat@github.com"
twitter_username
string or null
- Example
- "github"
is_verified
boolean
- Example
- true
has_organization_projects
boolean
required
- Example
- true
has_repository_projects
boolean
required
- Example
- true
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
html_url
string
uri
required
- Example
- "https://github.com/octocat"
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
type
string
required
- Example
- "Organization"
total_private_repos
int
- Example
- 100
owned_private_repos
int
- Example
- 100
private_gists
int or null
- Example
- 81
disk_usage
int or null
- Example
- 10000
collaborators
int or null
- Example
- 8
billing_email
string or null
- Example
- "org@example.com"
plan
object (plan)
name
string
required
space
int
required
private_repos
int
required
filled_seats
int
seats
int
default_repository_permission
string or null
members_can_create_repositories
boolean or null
- Example
- true
two_factor_requirement_enabled
boolean or null
- Example
- true
members_allowed_repository_creation_type
string
- Example
- "all"
members_can_create_public_repositories
boolean
- Example
- true
members_can_create_private_repositories
boolean
- Example
- true
members_can_create_internal_repositories
boolean
- Example
- true
members_can_create_pages
boolean
- Example
- true
members_can_create_public_pages
boolean
- Example
- true
members_can_create_private_pages
boolean
- Example
- true
members_can_fork_private_repositories
boolean or null
- Example
- false
web_commit_signoff_required
boolean
- Example
- false
updated_at
string
date-time
required
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
Delete a team
To delete a team, the authenticated user must be an organization owner or team maintainer.
If you are an organization owner, deleting a parent team will delete all of its child teams as well.
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Update a team
To edit a team, the authenticated user must either be an organization owner or a team maintainer.
Note: You can also specify a team by org_id
and team_id
using the route PATCH /organizations/{org_id}/team/{team_id}
.
name
string
The name of the team.
description
string
The description of the team.
privacy
string
The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy
intact. When a team is nested, the privacy
for parent teams cannot be secret
. The options are:
For a non-nested team:
secret
- only visible to organization owners and members of this team.closed
- visible to all members of this organization.
For a parent or child team:closed
- visible to all members of this organization.
- Enum
-
- secret
- closed
permission
string
Deprecated. The permission that new repositories will be added to the team with when none is specified.
- Default
- "pull"
- Enum
-
- pull
- push
- admin
parent_team_id
int or null
The ID of a team to set as the parent team.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Request
{
"name": "new team name",
"description": "new team description",
"privacy": "closed"
}
Response
Response when the updated information already exists
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"members_count": 3,
"repos_count": 10,
"created_at": "2017-07-14T16:53:42Z",
"updated_at": "2017-08-17T12:37:15Z",
"organization": {
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"ldap_dn": "uid=asdf,ou=users,dc=github,dc=com"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Response
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"members_count": 3,
"repos_count": 10,
"created_at": "2017-07-14T16:53:42Z",
"updated_at": "2017-08-17T12:37:15Z",
"organization": {
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"ldap_dn": "uid=asdf,ou=users,dc=github,dc=com"
}
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
id
int
required
Unique identifier of the team
- Example
- 42
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
name
string
required
Name of the team
- Example
- "Developers"
slug
string
required
- Example
- "justice-league"
description
string or null
required
- Example
- "A great team."
privacy
string
The level of privacy this team should have
- Enum
-
- closed
- secret
- Example
- "closed"
permission
string
required
Permission that the team will have for its repositories
- Example
- "push"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
parent
object (parent) or null
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
members_count
int
required
- Example
- 3
repos_count
int
required
- Example
- 10
created_at
string
date-time
required
- Example
- "2017-07-14T16:53:42Z"
updated_at
string
date-time
required
- Example
- "2017-08-17T12:37:15Z"
organization
object (organization)
required
Team Organization
login
string
required
- Example
- "github"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDEyOk9yZ2FuaXphdGlvbjE="
url
string
uri
required
- Example
- "https://api.github.com/orgs/github"
repos_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/repos"
events_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/events"
hooks_url
string
required
- Example
- "https://api.github.com/orgs/github/hooks"
issues_url
string
required
- Example
- "https://api.github.com/orgs/github/issues"
members_url
string
required
- Example
- "https://api.github.com/orgs/github/members{/member}"
public_members_url
string
required
- Example
- "https://api.github.com/orgs/github/public_members{/member}"
avatar_url
string
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
description
string or null
required
- Example
- "A great organization"
name
string
- Example
- "github"
company
string
- Example
- "GitHub"
blog
string
uri
- Example
- "https://github.com/blog"
location
string
- Example
- "San Francisco"
string
- Example
- "octocat@github.com"
twitter_username
string or null
- Example
- "github"
is_verified
boolean
- Example
- true
has_organization_projects
boolean
required
- Example
- true
has_repository_projects
boolean
required
- Example
- true
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
html_url
string
uri
required
- Example
- "https://github.com/octocat"
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
type
string
required
- Example
- "Organization"
total_private_repos
int
- Example
- 100
owned_private_repos
int
- Example
- 100
private_gists
int or null
- Example
- 81
disk_usage
int or null
- Example
- 10000
collaborators
int or null
- Example
- 8
billing_email
string or null
- Example
- "org@example.com"
plan
object (plan)
name
string
required
space
int
required
private_repos
int
required
filled_seats
int
seats
int
default_repository_permission
string or null
members_can_create_repositories
boolean or null
- Example
- true
two_factor_requirement_enabled
boolean or null
- Example
- true
members_allowed_repository_creation_type
string
- Example
- "all"
members_can_create_public_repositories
boolean
- Example
- true
members_can_create_private_repositories
boolean
- Example
- true
members_can_create_internal_repositories
boolean
- Example
- true
members_can_create_pages
boolean
- Example
- true
members_can_create_public_pages
boolean
- Example
- true
members_can_create_private_pages
boolean
- Example
- true
members_can_fork_private_repositories
boolean or null
- Example
- false
web_commit_signoff_required
boolean
- Example
- false
updated_at
string
date-time
required
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
id
int
required
Unique identifier of the team
- Example
- 42
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
name
string
required
Name of the team
- Example
- "Developers"
slug
string
required
- Example
- "justice-league"
description
string or null
required
- Example
- "A great team."
privacy
string
The level of privacy this team should have
- Enum
-
- closed
- secret
- Example
- "closed"
permission
string
required
Permission that the team will have for its repositories
- Example
- "push"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
parent
object (parent) or null
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
members_count
int
required
- Example
- 3
repos_count
int
required
- Example
- 10
created_at
string
date-time
required
- Example
- "2017-07-14T16:53:42Z"
updated_at
string
date-time
required
- Example
- "2017-08-17T12:37:15Z"
organization
object (organization)
required
Team Organization
login
string
required
- Example
- "github"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDEyOk9yZ2FuaXphdGlvbjE="
url
string
uri
required
- Example
- "https://api.github.com/orgs/github"
repos_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/repos"
events_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/events"
hooks_url
string
required
- Example
- "https://api.github.com/orgs/github/hooks"
issues_url
string
required
- Example
- "https://api.github.com/orgs/github/issues"
members_url
string
required
- Example
- "https://api.github.com/orgs/github/members{/member}"
public_members_url
string
required
- Example
- "https://api.github.com/orgs/github/public_members{/member}"
avatar_url
string
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
description
string or null
required
- Example
- "A great organization"
name
string
- Example
- "github"
company
string
- Example
- "GitHub"
blog
string
uri
- Example
- "https://github.com/blog"
location
string
- Example
- "San Francisco"
string
- Example
- "octocat@github.com"
twitter_username
string or null
- Example
- "github"
is_verified
boolean
- Example
- true
has_organization_projects
boolean
required
- Example
- true
has_repository_projects
boolean
required
- Example
- true
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
html_url
string
uri
required
- Example
- "https://github.com/octocat"
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
type
string
required
- Example
- "Organization"
total_private_repos
int
- Example
- 100
owned_private_repos
int
- Example
- 100
private_gists
int or null
- Example
- 81
disk_usage
int or null
- Example
- 10000
collaborators
int or null
- Example
- 8
billing_email
string or null
- Example
- "org@example.com"
plan
object (plan)
name
string
required
space
int
required
private_repos
int
required
filled_seats
int
seats
int
default_repository_permission
string or null
members_can_create_repositories
boolean or null
- Example
- true
two_factor_requirement_enabled
boolean or null
- Example
- true
members_allowed_repository_creation_type
string
- Example
- "all"
members_can_create_public_repositories
boolean
- Example
- true
members_can_create_private_repositories
boolean
- Example
- true
members_can_create_internal_repositories
boolean
- Example
- true
members_can_create_pages
boolean
- Example
- true
members_can_create_public_pages
boolean
- Example
- true
members_can_create_private_pages
boolean
- Example
- true
members_can_fork_private_repositories
boolean or null
- Example
- false
web_commit_signoff_required
boolean
- Example
- false
updated_at
string
date-time
required
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
List discussions
List all discussions on a team's page. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/discussions
.
direction
string
The direction to sort the results by.
- Default
- "desc"
- Enum
-
- asc
- desc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
pinned
string
Pinned discussions only filter
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Response
Response
[
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Hi! This is an area for us to collaborate as a team.",
"body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
"body_version": "0d495416a700fb06133c612575d92bfb",
"comments_count": 0,
"comments_url": "https://api.github.com/teams/2343027/discussions/1/comments",
"created_at": "2018-01-25T18:56:31Z",
"last_edited_at": null,
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
"node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
"number": 1,
"pinned": false,
"private": false,
"team_url": "https://api.github.com/teams/2343027",
"title": "Our first team post",
"updated_at": "2018-01-25T18:56:31Z",
"url": "https://api.github.com/teams/2343027/discussions/1",
"reactions": {
"url": "https://api.github.com/teams/2343027/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Team Discussion)]
- Content Type
- application/json
Team Discussion
object (Team Discussion)
A team discussion is a persistent record of a free-form conversation within a team.
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the discussion.
- Example
- "Please suggest improvements to our workflow in comments."
body_html
string
required
- Example
- "<p>Hi! This is an area for us to collaborate as a team</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
comments_count
int
required
- Example
- 0
comments_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1/comments"
created_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
last_edited_at
string or null
date-time
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1"
node_id
string
required
- Example
- "MDE0OlRlYW1EaXNjdXNzaW9uMQ=="
number
int
required
The unique sequence number of a team discussion.
- Example
- 42
pinned
boolean
required
Whether or not this discussion should be pinned for easy retrieval.
- Example
- true
private
boolean
required
Whether or not this discussion should be restricted to team members and organization administrators.
- Example
- true
team_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027"
title
string
required
The title of the discussion.
- Example
- "How can we improve our workflow?"
updated_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Link
string
Create a discussion
Creates a new discussion post on a team's page. OAuth access tokens require the write:discussion
scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
Note: You can also specify a team by org_id
and team_id
using the route POST /organizations/{org_id}/team/{team_id}/discussions
.
title
string
required
The discussion post's title.
body
string
required
The discussion post's body text.
private
boolean
Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true
to create a private post.
- Default
- false
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Request
{
"title": "Our first team post",
"body": "Hi! This is an area for us to collaborate as a team."
}
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Hi! This is an area for us to collaborate as a team.",
"body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
"body_version": "0d495416a700fb06133c612575d92bfb",
"comments_count": 0,
"comments_url": "https://api.github.com/teams/2343027/discussions/1/comments",
"created_at": "2018-01-25T18:56:31Z",
"last_edited_at": null,
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
"node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
"number": 1,
"pinned": false,
"private": false,
"team_url": "https://api.github.com/teams/2343027",
"title": "Our first team post",
"updated_at": "2018-01-25T18:56:31Z",
"url": "https://api.github.com/teams/2343027/discussions/1",
"reactions": {
"url": "https://api.github.com/teams/2343027/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the discussion.
- Example
- "Please suggest improvements to our workflow in comments."
body_html
string
required
- Example
- "<p>Hi! This is an area for us to collaborate as a team</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
comments_count
int
required
- Example
- 0
comments_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1/comments"
created_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
last_edited_at
string or null
date-time
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1"
node_id
string
required
- Example
- "MDE0OlRlYW1EaXNjdXNzaW9uMQ=="
number
int
required
The unique sequence number of a team discussion.
- Example
- 42
pinned
boolean
required
Whether or not this discussion should be pinned for easy retrieval.
- Example
- true
private
boolean
required
Whether or not this discussion should be restricted to team members and organization administrators.
- Example
- true
team_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027"
title
string
required
The title of the discussion.
- Example
- "How can we improve our workflow?"
updated_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Get a discussion
Get a specific discussion on a team's page. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
discussion_number
int
required
The number that identifies the discussion.
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Hi! This is an area for us to collaborate as a team.",
"body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
"body_version": "0d495416a700fb06133c612575d92bfb",
"comments_count": 0,
"comments_url": "https://api.github.com/teams/2343027/discussions/1/comments",
"created_at": "2018-01-25T18:56:31Z",
"last_edited_at": null,
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
"node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
"number": 1,
"pinned": false,
"private": false,
"team_url": "https://api.github.com/teams/2343027",
"title": "Our first team post",
"updated_at": "2018-01-25T18:56:31Z",
"url": "https://api.github.com/teams/2343027/discussions/1",
"reactions": {
"url": "https://api.github.com/teams/2343027/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the discussion.
- Example
- "Please suggest improvements to our workflow in comments."
body_html
string
required
- Example
- "<p>Hi! This is an area for us to collaborate as a team</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
comments_count
int
required
- Example
- 0
comments_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1/comments"
created_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
last_edited_at
string or null
date-time
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1"
node_id
string
required
- Example
- "MDE0OlRlYW1EaXNjdXNzaW9uMQ=="
number
int
required
The unique sequence number of a team discussion.
- Example
- 42
pinned
boolean
required
Whether or not this discussion should be pinned for easy retrieval.
- Example
- true
private
boolean
required
Whether or not this discussion should be restricted to team members and organization administrators.
- Example
- true
team_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027"
title
string
required
The title of the discussion.
- Example
- "How can we improve our workflow?"
updated_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Delete a discussion
Delete a discussion from a team's page. OAuth access tokens require the write:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
discussion_number
int
required
The number that identifies the discussion.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Update a discussion
Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the write:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}
.
title
string
The discussion post's title.
body
string
The discussion post's body text.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
discussion_number
int
required
The number that identifies the discussion.
Request
{
"title": "Welcome to our first team post"
}
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Hi! This is an area for us to collaborate as a team.",
"body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
"body_version": "0d495416a700fb06133c612575d92bfb",
"comments_count": 1,
"comments_url": "https://api.github.com/teams/2343027/discussions/1/comments",
"created_at": "2018-01-25T18:56:31Z",
"last_edited_at": "2018-01-26T18:22:20Z",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
"node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
"number": 1,
"pinned": false,
"private": false,
"team_url": "https://api.github.com/teams/2343027",
"title": "Welcome to our first team post",
"updated_at": "2018-01-26T18:22:20Z",
"url": "https://api.github.com/teams/2343027/discussions/1",
"reactions": {
"url": "https://api.github.com/teams/2343027/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the discussion.
- Example
- "Please suggest improvements to our workflow in comments."
body_html
string
required
- Example
- "<p>Hi! This is an area for us to collaborate as a team</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
comments_count
int
required
- Example
- 0
comments_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1/comments"
created_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
last_edited_at
string or null
date-time
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1"
node_id
string
required
- Example
- "MDE0OlRlYW1EaXNjdXNzaW9uMQ=="
number
int
required
The unique sequence number of a team discussion.
- Example
- 42
pinned
boolean
required
Whether or not this discussion should be pinned for easy retrieval.
- Example
- true
private
boolean
required
Whether or not this discussion should be restricted to team members and organization administrators.
- Example
- true
team_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027"
title
string
required
The title of the discussion.
- Example
- "How can we improve our workflow?"
updated_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
List discussion comments
List all comments on a team discussion. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments
.
direction
string
The direction to sort the results by.
- Default
- "desc"
- Enum
-
- asc
- desc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
discussion_number
int
required
The number that identifies the discussion.
Response
Response
[
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Do you like apples?",
"body_html": "<p>Do you like apples?</p>",
"body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51",
"created_at": "2018-01-15T23:53:58Z",
"last_edited_at": null,
"discussion_url": "https://api.github.com/teams/2403582/discussions/1",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
"node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
"number": 1,
"updated_at": "2018-01-15T23:53:58Z",
"url": "https://api.github.com/teams/2403582/discussions/1/comments/1",
"reactions": {
"url": "https://api.github.com/teams/2403582/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Team Discussion Comment)]
- Content Type
- application/json
Team Discussion Comment
object (Team Discussion Comment)
A reply to a discussion within a team.
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the comment.
- Example
- "I agree with this suggestion."
body_html
string
required
- Example
- "<p>Do you like apples?</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
created_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
last_edited_at
string or null
date-time
required
discussion_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1"
node_id
string
required
- Example
- "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE="
number
int
required
The unique sequence number of a team discussion comment.
- Example
- 42
updated_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Link
string
Create a discussion comment
Creates a new comment on a team discussion. OAuth access tokens require the write:discussion
scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
Note: You can also specify a team by org_id
and team_id
using the route POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments
.
body
string
required
The discussion comment's body text.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
discussion_number
int
required
The number that identifies the discussion.
Request
{
"body": "Do you like apples?"
}
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Do you like apples?",
"body_html": "<p>Do you like apples?</p>",
"body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51",
"created_at": "2018-01-15T23:53:58Z",
"last_edited_at": null,
"discussion_url": "https://api.github.com/teams/2403582/discussions/1",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
"node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
"number": 1,
"updated_at": "2018-01-15T23:53:58Z",
"url": "https://api.github.com/teams/2403582/discussions/1/comments/1",
"reactions": {
"url": "https://api.github.com/teams/2403582/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the comment.
- Example
- "I agree with this suggestion."
body_html
string
required
- Example
- "<p>Do you like apples?</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
created_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
last_edited_at
string or null
date-time
required
discussion_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1"
node_id
string
required
- Example
- "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE="
number
int
required
The unique sequence number of a team discussion comment.
- Example
- 42
updated_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Get a discussion comment
Get a specific comment on a team discussion. OAuth access tokens require the read:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
discussion_number
int
required
The number that identifies the discussion.
comment_number
int
required
The number that identifies the comment.
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Do you like apples?",
"body_html": "<p>Do you like apples?</p>",
"body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51",
"created_at": "2018-01-15T23:53:58Z",
"last_edited_at": null,
"discussion_url": "https://api.github.com/teams/2403582/discussions/1",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
"node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
"number": 1,
"updated_at": "2018-01-15T23:53:58Z",
"url": "https://api.github.com/teams/2403582/discussions/1/comments/1",
"reactions": {
"url": "https://api.github.com/teams/2403582/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the comment.
- Example
- "I agree with this suggestion."
body_html
string
required
- Example
- "<p>Do you like apples?</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
created_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
last_edited_at
string or null
date-time
required
discussion_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1"
node_id
string
required
- Example
- "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE="
number
int
required
The unique sequence number of a team discussion comment.
- Example
- 42
updated_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Delete a discussion comment
Deletes a comment on a team discussion. OAuth access tokens require the write:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
discussion_number
int
required
The number that identifies the discussion.
comment_number
int
required
The number that identifies the comment.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Update a discussion comment
Edits the body text of a discussion comment. OAuth access tokens require the write:discussion
scope.
Note: You can also specify a team by org_id
and team_id
using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}
.
body
string
required
The discussion comment's body text.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
discussion_number
int
required
The number that identifies the discussion.
comment_number
int
required
The number that identifies the comment.
Request
{
"body": "Do you like pineapples?"
}
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Do you like pineapples?",
"body_html": "<p>Do you like pineapples?</p>",
"body_version": "e6907b24d9c93cc0c5024a7af5888116",
"created_at": "2018-01-15T23:53:58Z",
"last_edited_at": "2018-01-26T18:22:20Z",
"discussion_url": "https://api.github.com/teams/2403582/discussions/1",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
"node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
"number": 1,
"updated_at": "2018-01-26T18:22:20Z",
"url": "https://api.github.com/teams/2403582/discussions/1/comments/1",
"reactions": {
"url": "https://api.github.com/teams/2403582/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the comment.
- Example
- "I agree with this suggestion."
body_html
string
required
- Example
- "<p>Do you like apples?</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
created_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
last_edited_at
string or null
date-time
required
discussion_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1"
node_id
string
required
- Example
- "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE="
number
int
required
The unique sequence number of a team discussion comment.
- Example
- 42
updated_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
List a connection between an external group and a team
Lists a connection between a team and an external group.
You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "GitHub's products" in the GitHub Help documentation.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Response
Response
{
"groups": [
{
"group_id": "123",
"group_name": "Octocat admins",
"updated_at": "2021-01-24T11:31:04-06:00"
},
{
"group_id": "456",
"group_name": "Octocat docs members",
"updated_at": "2021-03-24T11:31:04-06:00"
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
groups
array[object]
An array of external groups available to be mapped to a team
- Example
- [ { "group_id": 1, "group_name": "group-azuread-test", "updated_at": "2021-01-03 22:27:15:000 -700" }, { "group_id": 2, "group_name": "group-azuread-test2", "updated_at": "2021-06-03 22:27:15:000 -700" } ]
object
group_id
int
required
The internal ID of the group
- Example
- 1
group_name
string
required
The display name of the group
- Example
- "group-azuread-test"
updated_at
string
required
The time of the last update for this group
- Example
- "2019-06-03 22:27:15:000 -700"
Remove the connection between an external group and a team
Deletes a connection between a team and an external group.
You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Update the connection between an external group and a team
Creates a connection between a team and an external group. Only one external group can be linked to a team.
You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "GitHub's products" in the GitHub Help documentation.
group_id
int
required
External Group Id
- Example
- 1
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Request
{
"group_id": 123
}
Response
Response
{
"group_id": "123",
"group_name": "Octocat admins",
"updated_at": "2021-01-24T11:31:04-06:00",
"teams": [
{
"team_id": 1,
"team_name": "team-test"
},
{
"team_id": 2,
"team_name": "team-test2"
}
],
"members": [
{
"member_id": 1,
"member_login": "mona-lisa_eocsaxrs",
"member_name": "Mona Lisa",
"member_email": "mona_lisa@github.com"
},
{
"member_id": 2,
"member_login": "octo-lisa_eocsaxrs",
"member_name": "Octo Lisa",
"member_email": "octo_lisa@github.com"
}
]
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
group_id
int
required
The internal ID of the group
- Example
- 1
group_name
string
required
The display name for the group
- Example
- "group-azuread-test"
updated_at
string
The date when the group was last updated_at
- Example
- "2021-01-03 22:27:15:000 -700"
teams
array[object]
required
An array of teams linked to this group
- Example
- [ { "team_id": 1, "team_name": "team-test" }, { "team_id": 2, "team_name": "team-test2" } ]
object
team_id
int
required
The id for a team
- Example
- 1
team_name
string
required
The name of the team
- Example
- "team-test"
members
array[object]
required
An array of external members linked to this group
- Example
- [ { "member_id": 1, "member_login": "mona-lisa_eocsaxrs", "member_name": "Mona Lisa", "member_email": "mona_lisa@github.com" }, { "member_id": 2, "member_login": "octo-lisa_eocsaxrs", "member_name": "Octo Lisa", "member_email": "octo_lisa@github.com" } ]
object
member_id
int
required
The internal user ID of the identity
- Example
- 1
member_login
string
required
The handle/login for the user
- Example
- "mona-lisa_eocsaxrs"
member_name
string
required
The user display name/profile name
- Example
- "Mona Lisa"
member_email
string
required
An email attached to a user
- Example
- "mona_lisa@github.com"
List team members
Team members will include the members of child teams.
To list members in a team, the team must be visible to the authenticated user.
role
string
Filters members returned by their role in the team.
- Default
- "all"
- Enum
-
- member
- maintainer
- all
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Response
Response
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Simple User)]
- Content Type
- application/json
Simple User
object (Simple User)
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
Link
string
Get team membership for a user
Team members will include the members of child teams.
To get a user's membership with a team, the team must be 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}/memberships/{username}
.
Note:
The response contains the state
of the membership and the member's role
.
The role
for organization owners is set to maintainer
. For more information about maintainer
roles, see see Create a team.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
username
string
required
The handle for the GitHub user account.
Response
Response
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "maintainer",
"state": "active"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
if user has no team membership
Empty response
url
string
uri
required
role
string
required
The role of the user in the team.
- Default
- "member"
- Enum
-
- member
- maintainer
- Example
- "member"
state
string
required
The state of the user's membership in the team.
- Enum
-
- active
- pending
Add or update team membership for a user
Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub Enterprise Server."
An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team.
If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
Note: You can also specify a team by org_id
and team_id
using the route PUT /organizations/{org_id}/team/{team_id}/memberships/{username}
.
role
string
The role that this user should have in the team.
- Default
- "member"
- Enum
-
- member
- maintainer
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
username
string
required
The handle for the GitHub user account.
Request
{
"role": "maintainer"
}
Response
Response
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "member",
"state": "pending"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
Forbidden if team synchronization is set up
Empty response
Unprocessable Entity if you attempt to add an organization to a team
Empty response
url
string
uri
required
role
string
required
The role of the user in the team.
- Default
- "member"
- Enum
-
- member
- maintainer
- Example
- "member"
state
string
required
The state of the user's membership in the team.
- Enum
-
- active
- pending
Remove team membership for a user
To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub Enterprise Server."
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
username
string
required
The handle for the GitHub user account.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
Forbidden if team synchronization is set up
Empty response
List team projects
Lists the organization projects for a 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
.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Response
Response
[
{
"owner_url": "https://api.github.com/orgs/octocat",
"url": "https://api.github.com/projects/1002605",
"html_url": "https://github.com/orgs/api-playground/projects/1",
"columns_url": "https://api.github.com/projects/1002605/columns",
"id": 1002605,
"node_id": "MDc6UHJvamVjdDEwMDI2MDU=",
"name": "Organization Roadmap",
"body": "High-level roadmap for the upcoming year.",
"number": 1,
"state": "open",
"creator": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"created_at": "2011-04-11T20:09:31Z",
"updated_at": "2014-03-04T18:58:10Z",
"organization_permission": "write",
"private": false,
"permissions": {
"read": true,
"write": true,
"admin": false
}
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Team Project)]
- Content Type
- application/json
Team Project
object (Team Project)
A team's access to a project.
owner_url
string
required
url
string
required
html_url
string
required
columns_url
string
required
id
int
required
node_id
string
required
name
string
required
body
string or null
required
number
int
required
state
string
required
creator
object (creator)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
created_at
string
required
updated_at
string
required
organization_permission
string
The organization permission for this project. Only present when owner is an organization.
private
boolean
Whether the project is private or not. Only present when owner is an organization.
permissions
object (permissions)
required
read
boolean
required
write
boolean
required
admin
boolean
required
Link
string
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}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
project_id
int
required
The unique identifier of the project.
Response
Response
{
"owner_url": "https://api.github.com/orgs/octocat",
"url": "https://api.github.com/projects/1002605",
"html_url": "https://github.com/orgs/api-playground/projects/1",
"columns_url": "https://api.github.com/projects/1002605/columns",
"id": 1002605,
"node_id": "MDc6UHJvamVjdDEwMDI2MDU=",
"name": "Organization Roadmap",
"body": "High-level roadmap for the upcoming year.",
"number": 1,
"state": "open",
"creator": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"created_at": "2011-04-11T20:09:31Z",
"updated_at": "2014-03-04T18:58:10Z",
"organization_permission": "write",
"private": false,
"permissions": {
"read": true,
"write": true,
"admin": false
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Not Found if project is not managed by this team
Empty response
owner_url
string
required
url
string
required
html_url
string
required
columns_url
string
required
id
int
required
node_id
string
required
name
string
required
body
string or null
required
number
int
required
state
string
required
creator
object (creator)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
created_at
string
required
updated_at
string
required
organization_permission
string
The organization permission for this project. Only present when owner is an organization.
private
boolean
Whether the project is private or not. Only present when owner is an organization.
permissions
object (permissions)
required
read
boolean
required
write
boolean
required
admin
boolean
required
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}
.
permission
string
The permission to grant to the team for 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 this endpoint. For more information, see "HTTP verbs."
- Enum
-
- read
- write
- admin
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
project_id
int
required
The unique identifier of the project.
Request
{
"permission": "write"
}
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
Forbidden if the project is not owned by the organization
{
"message": "Must have admin rights to Repository.",
"documentation_url": "https://docs.github.com/enterprise-server@3.9/rest/reference/teams#add-or-update-team-project-permissions"
}
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}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
project_id
int
required
The unique identifier of the project.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
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
.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Response
Response
[
{
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "https://api.github.com/repos/octocat/Hello-World/events",
"forks_url": "https://api.github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "https://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription",
"tags_url": "https://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "https://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "https://api.github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": false,
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"has_discussions": false,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": false,
"push": false,
"pull": true
},
"security_and_analysis": {
"advanced_security": {
"status": "enabled"
},
"secret_scanning": {
"status": "enabled"
},
"secret_scanning_push_protection": {
"status": "disabled"
}
}
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Minimal Repository)]
- Content Type
- application/json
Minimal Repository
object (Minimal Repository)
Minimal Repository
id
int
required
- Example
- 1296269
node_id
string
required
- Example
- "MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
name
string
required
- Example
- "Hello-World"
full_name
string
required
- Example
- "octocat/Hello-World"
owner
object (owner)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World"
description
string or null
required
- Example
- "This your first repo!"
fork
boolean
required
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World"
archive_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
assignees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
blobs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
branches_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
collaborators_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
comments_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/comments{/number}"
commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
compare_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
contents_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
contributors_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contributors"
deployments_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/deployments"
downloads_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/downloads"
events_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/events"
forks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/forks"
git_commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
git_refs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
git_tags_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
git_url
string
issue_comment_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
issue_events_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
issues_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues{/number}"
keys_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
labels_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/labels{/name}"
languages_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/languages"
merges_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/merges"
milestones_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
notifications_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
pulls_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
releases_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
ssh_url
string
stargazers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/stargazers"
statuses_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
subscribers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscribers"
subscription_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscription"
tags_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/tags"
teams_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/teams"
trees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
clone_url
string
mirror_url
string or null
hooks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/hooks"
svn_url
string
homepage
string or null
language
string or null
forks_count
int
stargazers_count
int
watchers_count
int
size
int
The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.
default_branch
string
open_issues_count
int
is_template
boolean
topics
array[string]
string
has_issues
boolean
has_projects
boolean
has_wiki
boolean
has_pages
boolean
has_downloads
boolean
has_discussions
boolean
archived
boolean
disabled
boolean
visibility
string
pushed_at
string or null
date-time
- Example
- "2011-01-26T19:06:43Z"
created_at
string or null
date-time
- Example
- "2011-01-26T19:01:12Z"
updated_at
string or null
date-time
- Example
- "2011-01-26T19:14:43Z"
permissions
object (permissions)
admin
boolean
maintain
boolean
push
boolean
triage
boolean
pull
boolean
role_name
string
- Example
- "admin"
temp_clone_token
string
delete_branch_on_merge
boolean
subscribers_count
int
network_count
int
code_of_conduct
object (code_of_conduct)
Code Of Conduct
key
string
required
- Example
- "contributor_covenant"
name
string
required
- Example
- "Contributor Covenant"
url
string
uri
required
- Example
- "https://api.github.com/codes_of_conduct/contributor_covenant"
body
string
- Example
- "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
html_url
string or null
uri
required
license
object (license) or null
key
string
name
string
spdx_id
string
url
string
node_id
string
forks
int
- Example
- 0
open_issues
int
- Example
- 0
watchers
int
- Example
- 0
allow_forking
boolean
web_commit_signoff_required
boolean
- Example
- false
security_and_analysis
object (security_and_analysis) or null
advanced_security
object (advanced_security)
status
string
- Enum
-
- enabled
- disabled
secret_scanning
object (secret_scanning)
status
string
- Enum
-
- enabled
- disabled
secret_scanning_push_protection
object (secret_scanning_push_protection)
status
string
- Enum
-
- enabled
- disabled
Link
string
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}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
owner
string
required
The account owner of the repository. The name is not case sensitive.
repo
string
required
The name of the repository. The name is not case sensitive.
Response
Alternative response with repository permissions
{
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "https://api.github.com/repos/octocat/Hello-World/events",
"forks_url": "https://api.github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "https://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription",
"tags_url": "https://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "https://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "https://api.github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": false,
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": false,
"maintain": false,
"push": false,
"triage": false,
"pull": true
},
"role_name": "read",
"allow_rebase_merge": true,
"template_repository": {
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World-Template",
"full_name": "octocat/Hello-World-Template",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World-Template",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World-Template",
"archive_url": "https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}",
"blobs_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}",
"commits_url": "https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}",
"compare_url": "https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}",
"contributors_url": "https://api.github.com/repos/octocat/Hello-World-Template/contributors",
"deployments_url": "https://api.github.com/repos/octocat/Hello-World-Template/deployments",
"downloads_url": "https://api.github.com/repos/octocat/Hello-World-Template/downloads",
"events_url": "https://api.github.com/repos/octocat/Hello-World-Template/events",
"forks_url": "https://api.github.com/repos/octocat/Hello-World-Template/forks",
"git_commits_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World-Template.git",
"issue_comment_url": "https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}",
"issues_url": "https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}",
"keys_url": "https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}",
"labels_url": "https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}",
"languages_url": "https://api.github.com/repos/octocat/Hello-World-Template/languages",
"merges_url": "https://api.github.com/repos/octocat/Hello-World-Template/merges",
"milestones_url": "https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}",
"releases_url": "https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World-Template.git",
"stargazers_url": "https://api.github.com/repos/octocat/Hello-World-Template/stargazers",
"statuses_url": "https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/octocat/Hello-World-Template/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/Hello-World-Template/subscription",
"tags_url": "https://api.github.com/repos/octocat/Hello-World-Template/tags",
"teams_url": "https://api.github.com/repos/octocat/Hello-World-Template/teams",
"trees_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World-Template.git",
"mirror_url": "git:git.example.com/octocat/Hello-World-Template",
"hooks_url": "https://api.github.com/repos/octocat/Hello-World-Template/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World-Template",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"watchers": 80,
"size": 108,
"default_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"is_template": true,
"license": {
"key": "mit",
"name": "MIT License",
"url": "https://api.github.com/licenses/mit",
"spdx_id": "MIT",
"node_id": "MDc6TGljZW5zZW1pdA==",
"html_url": "https://api.github.com/licenses/mit"
},
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"pull": true,
"triage": false,
"push": false,
"maintain": false,
"admin": false
},
"allow_rebase_merge": true,
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
"allow_squash_merge": true,
"allow_auto_merge": false,
"delete_branch_on_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0
},
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
"allow_squash_merge": true,
"allow_auto_merge": false,
"delete_branch_on_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0,
"license": {
"key": "mit",
"name": "MIT License",
"url": "https://api.github.com/licenses/mit",
"spdx_id": "MIT",
"node_id": "MDc6TGljZW5zZW1pdA==",
"html_url": "https://api.github.com/licenses/mit"
},
"forks": 1,
"open_issues": 1,
"watchers": 1
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header.
Empty response
Not Found if team does not have permission for the repository
Empty response
id
int
required
Unique identifier of the repository
- Example
- 42
node_id
string
required
- Example
- "MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
name
string
required
The name of the repository.
- Example
- "Team Environment"
full_name
string
required
- Example
- "octocat/Hello-World"
license
object (license) or null
required
License Simple
key
string
required
- Example
- "mit"
name
string
required
- Example
- "MIT License"
url
string or null
uri
required
- Example
- "https://api.github.com/licenses/mit"
spdx_id
string or null
required
- Example
- "MIT"
node_id
string
required
- Example
- "MDc6TGljZW5zZW1pdA=="
html_url
string
uri
forks
int
required
permissions
object (permissions)
admin
boolean
required
pull
boolean
required
triage
boolean
push
boolean
required
maintain
boolean
role_name
string
- Example
- "admin"
owner
object (owner) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
Whether the repository is private or public.
- Default
- false
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World"
description
string or null
required
- Example
- "This your first repo!"
fork
boolean
required
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World"
archive_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
assignees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
blobs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
branches_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
collaborators_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
comments_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/comments{/number}"
commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
compare_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
contents_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
contributors_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contributors"
deployments_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/deployments"
downloads_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/downloads"
events_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/events"
forks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/forks"
git_commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
git_refs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
git_tags_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
git_url
string
required
- Example
- "git:github.com/octocat/Hello-World.git"
issue_comment_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
issue_events_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
issues_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues{/number}"
keys_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
labels_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/labels{/name}"
languages_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/languages"
merges_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/merges"
milestones_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
notifications_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
pulls_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
releases_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
ssh_url
string
required
- Example
- "git@github.com:octocat/Hello-World.git"
stargazers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/stargazers"
statuses_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
subscribers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscribers"
subscription_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscription"
tags_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/tags"
teams_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/teams"
trees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
clone_url
string
required
- Example
- "https://github.com/octocat/Hello-World.git"
mirror_url
string or null
uri
required
- Example
- "git:git.example.com/octocat/Hello-World"
hooks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/hooks"
svn_url
string
uri
required
- Example
- "https://svn.github.com/octocat/Hello-World"
homepage
string or null
uri
required
- Example
- "https://github.com"
language
string or null
required
forks_count
int
required
- Example
- 9
stargazers_count
int
required
- Example
- 80
watchers_count
int
required
- Example
- 80
size
int
required
- Example
- 108
default_branch
string
required
The default branch of the repository.
- Example
- "master"
open_issues_count
int
required
- Example
- 0
is_template
boolean
Whether this repository acts as a template that can be used to generate new repositories.
- Default
- false
- Example
- true
topics
array[string]
string
has_issues
boolean
required
Whether issues are enabled.
- Default
- true
- Example
- true
has_projects
boolean
required
Whether projects are enabled.
- Default
- true
- Example
- true
has_wiki
boolean
required
Whether the wiki is enabled.
- Default
- true
- Example
- true
has_pages
boolean
required
has_downloads
boolean
required
Whether downloads are enabled.
- Default
- true
- Example
- true
archived
boolean
required
Whether the repository is archived.
- Default
- false
disabled
boolean
required
Returns whether or not this repository disabled.
visibility
string
The repository visibility: public, private, or internal.
- Default
- "public"
pushed_at
string or null
date-time
required
- Example
- "2011-01-26T19:06:43Z"
created_at
string or null
date-time
required
- Example
- "2011-01-26T19:01:12Z"
updated_at
string or null
date-time
required
- Example
- "2011-01-26T19:14:43Z"
allow_rebase_merge
boolean
Whether to allow rebase merges for pull requests.
- Default
- true
- Example
- true
template_repository
object (template_repository) or null
A repository on GitHub.
id
int
required
Unique identifier of the repository
- Example
- 42
node_id
string
required
- Example
- "MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
name
string
required
The name of the repository.
- Example
- "Team Environment"
full_name
string
required
- Example
- "octocat/Hello-World"
license
object (license) or null
required
License Simple
key
string
required
- Example
- "mit"
name
string
required
- Example
- "MIT License"
url
string or null
uri
required
- Example
- "https://api.github.com/licenses/mit"
spdx_id
string or null
required
- Example
- "MIT"
node_id
string
required
- Example
- "MDc6TGljZW5zZW1pdA=="
html_url
string
uri
organization
object (organization) or null
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
forks
int
required
permissions
object (permissions)
admin
boolean
required
pull
boolean
required
triage
boolean
push
boolean
required
maintain
boolean
owner
object (owner)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
Whether the repository is private or public.
- Default
- false
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World"
description
string or null
required
- Example
- "This your first repo!"
fork
boolean
required
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World"
archive_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
assignees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
blobs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
branches_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
collaborators_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
comments_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/comments{/number}"
commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
compare_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
contents_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
contributors_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contributors"
deployments_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/deployments"
downloads_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/downloads"
events_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/events"
forks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/forks"
git_commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
git_refs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
git_tags_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
git_url
string
required
- Example
- "git:github.com/octocat/Hello-World.git"
issue_comment_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
issue_events_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
issues_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues{/number}"
keys_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
labels_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/labels{/name}"
languages_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/languages"
merges_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/merges"
milestones_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
notifications_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
pulls_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
releases_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
ssh_url
string
required
- Example
- "git@github.com:octocat/Hello-World.git"
stargazers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/stargazers"
statuses_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
subscribers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscribers"
subscription_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscription"
tags_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/tags"
teams_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/teams"
trees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
clone_url
string
required
- Example
- "https://github.com/octocat/Hello-World.git"
mirror_url
string or null
uri
required
- Example
- "git:git.example.com/octocat/Hello-World"
hooks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/hooks"
svn_url
string
uri
required
- Example
- "https://svn.github.com/octocat/Hello-World"
homepage
string or null
uri
required
- Example
- "https://github.com"
language
string or null
required
forks_count
int
required
- Example
- 9
stargazers_count
int
required
- Example
- 80
watchers_count
int
required
- Example
- 80
size
int
required
The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.
- Example
- 108
default_branch
string
required
The default branch of the repository.
- Example
- "master"
open_issues_count
int
required
- Example
- 0
is_template
boolean
Whether this repository acts as a template that can be used to generate new repositories.
- Default
- false
- Example
- true
topics
array[string]
string
has_issues
boolean
required
Whether issues are enabled.
- Default
- true
- Example
- true
has_projects
boolean
required
Whether projects are enabled.
- Default
- true
- Example
- true
has_wiki
boolean
required
Whether the wiki is enabled.
- Default
- true
- Example
- true
has_pages
boolean
required
has_downloads
boolean
required
Whether downloads are enabled.
- Default
- true
- Example
- true
has_discussions
boolean
Whether discussions are enabled.
- Default
- false
- Example
- true
archived
boolean
required
Whether the repository is archived.
- Default
- false
disabled
boolean
required
Returns whether or not this repository disabled.
visibility
string
The repository visibility: public, private, or internal.
- Default
- "public"
pushed_at
string or null
date-time
required
- Example
- "2011-01-26T19:06:43Z"
created_at
string or null
date-time
required
- Example
- "2011-01-26T19:01:12Z"
updated_at
string or null
date-time
required
- Example
- "2011-01-26T19:14:43Z"
allow_rebase_merge
boolean
Whether to allow rebase merges for pull requests.
- Default
- true
- Example
- true
template_repository
object (template_repository) or null
id
int
node_id
string
name
string
full_name
string
owner
object (owner)
login
string
id
int
node_id
string
avatar_url
string
gravatar_id
string
url
string
html_url
string
followers_url
string
following_url
string
gists_url
string
starred_url
string
subscriptions_url
string
organizations_url
string
repos_url
string
events_url
string
received_events_url
string
type
string
site_admin
boolean
private
boolean
html_url
string
description
string
fork
boolean
url
string
archive_url
string
assignees_url
string
blobs_url
string
branches_url
string
collaborators_url
string
comments_url
string
commits_url
string
compare_url
string
contents_url
string
contributors_url
string
deployments_url
string
downloads_url
string
events_url
string
forks_url
string
git_commits_url
string
git_refs_url
string
git_tags_url
string
git_url
string
issue_comment_url
string
issue_events_url
string
issues_url
string
keys_url
string
labels_url
string
languages_url
string
merges_url
string
milestones_url
string
notifications_url
string
pulls_url
string
releases_url
string
ssh_url
string
stargazers_url
string
statuses_url
string
subscribers_url
string
subscription_url
string
tags_url
string
teams_url
string
trees_url
string
clone_url
string
mirror_url
string
hooks_url
string
svn_url
string
homepage
string
language
string
forks_count
int
stargazers_count
int
watchers_count
int
size
int
default_branch
string
open_issues_count
int
is_template
boolean
topics
array[string]
string
has_issues
boolean
has_projects
boolean
has_wiki
boolean
has_pages
boolean
has_downloads
boolean
archived
boolean
disabled
boolean
visibility
string
pushed_at
string
created_at
string
updated_at
string
permissions
object (permissions)
admin
boolean
maintain
boolean
push
boolean
triage
boolean
pull
boolean
allow_rebase_merge
boolean
temp_clone_token
string
allow_squash_merge
boolean
allow_auto_merge
boolean
delete_branch_on_merge
boolean
allow_update_branch
boolean
use_squash_pr_title_as_default
boolean
squash_merge_commit_title
string
The default value for a squash merge commit title:
PR_TITLE
- default to the pull request's title.COMMIT_OR_PR_TITLE
- default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
- Enum
-
- PR_TITLE
- COMMIT_OR_PR_TITLE
squash_merge_commit_message
string
The default value for a squash merge commit message:
PR_BODY
- default to the pull request's body.COMMIT_MESSAGES
- default to the branch's commit messages.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- COMMIT_MESSAGES
- BLANK
merge_commit_title
string
The default value for a merge commit title.
PR_TITLE
- default to the pull request's title.MERGE_MESSAGE
- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
- Enum
-
- PR_TITLE
- MERGE_MESSAGE
merge_commit_message
string
The default value for a merge commit message.
PR_TITLE
- default to the pull request's title.PR_BODY
- default to the pull request's body.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- PR_TITLE
- BLANK
allow_merge_commit
boolean
subscribers_count
int
network_count
int
temp_clone_token
string
allow_squash_merge
boolean
Whether to allow squash merges for pull requests.
- Default
- true
- Example
- true
allow_auto_merge
boolean
Whether to allow Auto-merge to be used on pull requests.
- Default
- false
- Example
- false
delete_branch_on_merge
boolean
Whether to delete head branches when pull requests are merged
- Default
- false
- Example
- false
allow_update_branch
boolean
Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
- Default
- false
- Example
- false
use_squash_pr_title_as_default
boolean
deprecated
Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use squash_merge_commit_title
instead.
- Default
- false
squash_merge_commit_title
string
The default value for a squash merge commit title:
PR_TITLE
- default to the pull request's title.COMMIT_OR_PR_TITLE
- default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
- Enum
-
- PR_TITLE
- COMMIT_OR_PR_TITLE
squash_merge_commit_message
string
The default value for a squash merge commit message:
PR_BODY
- default to the pull request's body.COMMIT_MESSAGES
- default to the branch's commit messages.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- COMMIT_MESSAGES
- BLANK
merge_commit_title
string
The default value for a merge commit title.
PR_TITLE
- default to the pull request's title.MERGE_MESSAGE
- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
- Enum
-
- PR_TITLE
- MERGE_MESSAGE
merge_commit_message
string
The default value for a merge commit message.
PR_TITLE
- default to the pull request's title.PR_BODY
- default to the pull request's body.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- PR_TITLE
- BLANK
allow_merge_commit
boolean
Whether to allow merge commits for pull requests.
- Default
- true
- Example
- true
allow_forking
boolean
Whether to allow forking this repo
web_commit_signoff_required
boolean
Whether to require contributors to sign off on web-based commits
- Default
- false
subscribers_count
int
network_count
int
open_issues
int
required
watchers
int
required
master_branch
string
starred_at
string
- Example
- "\"2020-07-09T00:17:42Z\""
anonymous_access_enabled
boolean
Whether anonymous git access is enabled for this repository
temp_clone_token
string
allow_squash_merge
boolean
Whether to allow squash merges for pull requests.
- Default
- true
- Example
- true
allow_auto_merge
boolean
Whether to allow Auto-merge to be used on pull requests.
- Default
- false
- Example
- false
delete_branch_on_merge
boolean
Whether to delete head branches when pull requests are merged
- Default
- false
- Example
- false
allow_merge_commit
boolean
Whether to allow merge commits for pull requests.
- Default
- true
- Example
- true
allow_forking
boolean
Whether to allow forking this repo
- Default
- false
- Example
- false
web_commit_signoff_required
boolean
Whether to require contributors to sign off on web-based commits
- Default
- false
- Example
- false
subscribers_count
int
network_count
int
open_issues
int
required
watchers
int
required
master_branch
string
Add or update team repository permissions
To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity
status if you attempt to add a repository to a team that is not owned by the organization. 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: You can also specify a team by org_id
and team_id
using the route PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}
.
For more information about the permission levels, see "Repository permission levels for an organization".
permission
string
The permission to grant the team on this repository. We accept the following permissions to be set: pull
, triage
, push
, maintain
, admin
and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's permission
attribute will be used to determine what permission to grant the team on this repository.
- Default
- "push"
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
owner
string
required
The account owner of the repository. The name is not case sensitive.
repo
string
required
The name of the repository. The name is not case sensitive.
Request
{
"permission": "push"
}
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Remove a repository from a team
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. This does not delete the repository, it just removes it from the team.
Note: You can also specify a team by org_id
and team_id
using the route DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}
.
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
owner
string
required
The account owner of the repository. The name is not case sensitive.
repo
string
required
The name of the repository. The name is not case sensitive.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
List child teams
Lists the child teams of the team specified by {team_slug}
.
Note: You can also specify a team by org_id
and team_id
using the route GET /organizations/{org_id}/team/{team_id}/teams
.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
org
string
required
The organization name. The name is not case sensitive.
team_slug
string
required
The slug of the team name.
Response
if child teams exist
[
{
"id": 2,
"node_id": "MDQ6VGVhbTI=",
"url": "https://api.github.com/teams/2",
"name": "Original Roster",
"slug": "original-roster",
"description": "Started it all.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/2/members{/member}",
"repositories_url": "https://api.github.com/teams/2/repos",
"parent": {
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos"
},
"html_url": "https://github.com/orgs/rails/teams/core"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Team)]
- Content Type
- application/json
Team
object (Team)
Groups of organization members that gives permissions on specified repositories.
id
int
required
node_id
string
required
name
string
required
slug
string
required
description
string or null
required
privacy
string
permission
string
required
permissions
object (permissions)
pull
boolean
required
triage
boolean
required
push
boolean
required
maintain
boolean
required
admin
boolean
required
url
string
uri
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
members_url
string
required
repositories_url
string
uri
required
parent
object (parent) or null
required
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
Link
string
Get a team (Legacy)
Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the Get a team by name endpoint.
team_id
int
required
The unique identifier of the team.
Response
Response
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"members_count": 3,
"repos_count": 10,
"created_at": "2017-07-14T16:53:42Z",
"updated_at": "2017-08-17T12:37:15Z",
"organization": {
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"ldap_dn": "uid=asdf,ou=users,dc=github,dc=com"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
id
int
required
Unique identifier of the team
- Example
- 42
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
name
string
required
Name of the team
- Example
- "Developers"
slug
string
required
- Example
- "justice-league"
description
string or null
required
- Example
- "A great team."
privacy
string
The level of privacy this team should have
- Enum
-
- closed
- secret
- Example
- "closed"
permission
string
required
Permission that the team will have for its repositories
- Example
- "push"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
parent
object (parent) or null
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
members_count
int
required
- Example
- 3
repos_count
int
required
- Example
- 10
created_at
string
date-time
required
- Example
- "2017-07-14T16:53:42Z"
updated_at
string
date-time
required
- Example
- "2017-08-17T12:37:15Z"
organization
object (organization)
required
Team Organization
login
string
required
- Example
- "github"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDEyOk9yZ2FuaXphdGlvbjE="
url
string
uri
required
- Example
- "https://api.github.com/orgs/github"
repos_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/repos"
events_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/events"
hooks_url
string
required
- Example
- "https://api.github.com/orgs/github/hooks"
issues_url
string
required
- Example
- "https://api.github.com/orgs/github/issues"
members_url
string
required
- Example
- "https://api.github.com/orgs/github/members{/member}"
public_members_url
string
required
- Example
- "https://api.github.com/orgs/github/public_members{/member}"
avatar_url
string
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
description
string or null
required
- Example
- "A great organization"
name
string
- Example
- "github"
company
string
- Example
- "GitHub"
blog
string
uri
- Example
- "https://github.com/blog"
location
string
- Example
- "San Francisco"
string
- Example
- "octocat@github.com"
twitter_username
string or null
- Example
- "github"
is_verified
boolean
- Example
- true
has_organization_projects
boolean
required
- Example
- true
has_repository_projects
boolean
required
- Example
- true
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
html_url
string
uri
required
- Example
- "https://github.com/octocat"
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
type
string
required
- Example
- "Organization"
total_private_repos
int
- Example
- 100
owned_private_repos
int
- Example
- 100
private_gists
int or null
- Example
- 81
disk_usage
int or null
- Example
- 10000
collaborators
int or null
- Example
- 8
billing_email
string or null
- Example
- "org@example.com"
plan
object (plan)
name
string
required
space
int
required
private_repos
int
required
filled_seats
int
seats
int
default_repository_permission
string or null
members_can_create_repositories
boolean or null
- Example
- true
two_factor_requirement_enabled
boolean or null
- Example
- true
members_allowed_repository_creation_type
string
- Example
- "all"
members_can_create_public_repositories
boolean
- Example
- true
members_can_create_private_repositories
boolean
- Example
- true
members_can_create_internal_repositories
boolean
- Example
- true
members_can_create_pages
boolean
- Example
- true
members_can_create_public_pages
boolean
- Example
- true
members_can_create_private_pages
boolean
- Example
- true
members_can_fork_private_repositories
boolean or null
- Example
- false
web_commit_signoff_required
boolean
- Example
- false
updated_at
string
date-time
required
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
Delete a team (Legacy)
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 Delete a team endpoint.
To delete a team, the authenticated user must be an organization owner or team maintainer.
If you are an organization owner, deleting a parent team will delete all of its child teams as well.
team_id
int
required
The unique identifier of the team.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
Update a team (Legacy)
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 Update a team endpoint.
To edit a team, the authenticated user must either be an organization owner or a team maintainer.
Note: With nested teams, the privacy
for parent teams cannot be secret
.
name
string
required
The name of the team.
description
string
The description of the team.
privacy
string
The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy
intact. The options are:
For a non-nested team:
secret
- only visible to organization owners and members of this team.closed
- visible to all members of this organization.
For a parent or child team:closed
- visible to all members of this organization.
- Enum
-
- secret
- closed
permission
string
Deprecated. The permission that new repositories will be added to the team with when none is specified.
- Default
- "pull"
- Enum
-
- pull
- push
- admin
parent_team_id
int or null
The ID of a team to set as the parent team.
team_id
int
required
The unique identifier of the team.
Request
{
"name": "new team name",
"description": "new team description",
"privacy": "closed"
}
Response
Response when the updated information already exists
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"members_count": 3,
"repos_count": 10,
"created_at": "2017-07-14T16:53:42Z",
"updated_at": "2017-08-17T12:37:15Z",
"organization": {
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"ldap_dn": "uid=asdf,ou=users,dc=github,dc=com"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Response
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"members_count": 3,
"repos_count": 10,
"created_at": "2017-07-14T16:53:42Z",
"updated_at": "2017-08-17T12:37:15Z",
"organization": {
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"ldap_dn": "uid=asdf,ou=users,dc=github,dc=com"
}
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
id
int
required
Unique identifier of the team
- Example
- 42
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
name
string
required
Name of the team
- Example
- "Developers"
slug
string
required
- Example
- "justice-league"
description
string or null
required
- Example
- "A great team."
privacy
string
The level of privacy this team should have
- Enum
-
- closed
- secret
- Example
- "closed"
permission
string
required
Permission that the team will have for its repositories
- Example
- "push"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
parent
object (parent) or null
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
members_count
int
required
- Example
- 3
repos_count
int
required
- Example
- 10
created_at
string
date-time
required
- Example
- "2017-07-14T16:53:42Z"
updated_at
string
date-time
required
- Example
- "2017-08-17T12:37:15Z"
organization
object (organization)
required
Team Organization
login
string
required
- Example
- "github"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDEyOk9yZ2FuaXphdGlvbjE="
url
string
uri
required
- Example
- "https://api.github.com/orgs/github"
repos_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/repos"
events_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/events"
hooks_url
string
required
- Example
- "https://api.github.com/orgs/github/hooks"
issues_url
string
required
- Example
- "https://api.github.com/orgs/github/issues"
members_url
string
required
- Example
- "https://api.github.com/orgs/github/members{/member}"
public_members_url
string
required
- Example
- "https://api.github.com/orgs/github/public_members{/member}"
avatar_url
string
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
description
string or null
required
- Example
- "A great organization"
name
string
- Example
- "github"
company
string
- Example
- "GitHub"
blog
string
uri
- Example
- "https://github.com/blog"
location
string
- Example
- "San Francisco"
string
- Example
- "octocat@github.com"
twitter_username
string or null
- Example
- "github"
is_verified
boolean
- Example
- true
has_organization_projects
boolean
required
- Example
- true
has_repository_projects
boolean
required
- Example
- true
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
html_url
string
uri
required
- Example
- "https://github.com/octocat"
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
type
string
required
- Example
- "Organization"
total_private_repos
int
- Example
- 100
owned_private_repos
int
- Example
- 100
private_gists
int or null
- Example
- 81
disk_usage
int or null
- Example
- 10000
collaborators
int or null
- Example
- 8
billing_email
string or null
- Example
- "org@example.com"
plan
object (plan)
name
string
required
space
int
required
private_repos
int
required
filled_seats
int
seats
int
default_repository_permission
string or null
members_can_create_repositories
boolean or null
- Example
- true
two_factor_requirement_enabled
boolean or null
- Example
- true
members_allowed_repository_creation_type
string
- Example
- "all"
members_can_create_public_repositories
boolean
- Example
- true
members_can_create_private_repositories
boolean
- Example
- true
members_can_create_internal_repositories
boolean
- Example
- true
members_can_create_pages
boolean
- Example
- true
members_can_create_public_pages
boolean
- Example
- true
members_can_create_private_pages
boolean
- Example
- true
members_can_fork_private_repositories
boolean or null
- Example
- false
web_commit_signoff_required
boolean
- Example
- false
updated_at
string
date-time
required
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
id
int
required
Unique identifier of the team
- Example
- 42
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
name
string
required
Name of the team
- Example
- "Developers"
slug
string
required
- Example
- "justice-league"
description
string or null
required
- Example
- "A great team."
privacy
string
The level of privacy this team should have
- Enum
-
- closed
- secret
- Example
- "closed"
permission
string
required
Permission that the team will have for its repositories
- Example
- "push"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
parent
object (parent) or null
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
members_count
int
required
- Example
- 3
repos_count
int
required
- Example
- 10
created_at
string
date-time
required
- Example
- "2017-07-14T16:53:42Z"
updated_at
string
date-time
required
- Example
- "2017-08-17T12:37:15Z"
organization
object (organization)
required
Team Organization
login
string
required
- Example
- "github"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDEyOk9yZ2FuaXphdGlvbjE="
url
string
uri
required
- Example
- "https://api.github.com/orgs/github"
repos_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/repos"
events_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/events"
hooks_url
string
required
- Example
- "https://api.github.com/orgs/github/hooks"
issues_url
string
required
- Example
- "https://api.github.com/orgs/github/issues"
members_url
string
required
- Example
- "https://api.github.com/orgs/github/members{/member}"
public_members_url
string
required
- Example
- "https://api.github.com/orgs/github/public_members{/member}"
avatar_url
string
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
description
string or null
required
- Example
- "A great organization"
name
string
- Example
- "github"
company
string
- Example
- "GitHub"
blog
string
uri
- Example
- "https://github.com/blog"
location
string
- Example
- "San Francisco"
string
- Example
- "octocat@github.com"
twitter_username
string or null
- Example
- "github"
is_verified
boolean
- Example
- true
has_organization_projects
boolean
required
- Example
- true
has_repository_projects
boolean
required
- Example
- true
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
html_url
string
uri
required
- Example
- "https://github.com/octocat"
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
type
string
required
- Example
- "Organization"
total_private_repos
int
- Example
- 100
owned_private_repos
int
- Example
- 100
private_gists
int or null
- Example
- 81
disk_usage
int or null
- Example
- 10000
collaborators
int or null
- Example
- 8
billing_email
string or null
- Example
- "org@example.com"
plan
object (plan)
name
string
required
space
int
required
private_repos
int
required
filled_seats
int
seats
int
default_repository_permission
string or null
members_can_create_repositories
boolean or null
- Example
- true
two_factor_requirement_enabled
boolean or null
- Example
- true
members_allowed_repository_creation_type
string
- Example
- "all"
members_can_create_public_repositories
boolean
- Example
- true
members_can_create_private_repositories
boolean
- Example
- true
members_can_create_internal_repositories
boolean
- Example
- true
members_can_create_pages
boolean
- Example
- true
members_can_create_public_pages
boolean
- Example
- true
members_can_create_private_pages
boolean
- Example
- true
members_can_fork_private_repositories
boolean or null
- Example
- false
web_commit_signoff_required
boolean
- Example
- false
updated_at
string
date-time
required
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
List discussions (Legacy)
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 discussions
endpoint.
List all discussions on a team's page. OAuth access tokens require the read:discussion
scope.
direction
string
The direction to sort the results by.
- Default
- "desc"
- Enum
-
- asc
- desc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
team_id
int
required
The unique identifier of the team.
Response
Response
[
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Hi! This is an area for us to collaborate as a team.",
"body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
"body_version": "0d495416a700fb06133c612575d92bfb",
"comments_count": 0,
"comments_url": "https://api.github.com/teams/2343027/discussions/1/comments",
"created_at": "2018-01-25T18:56:31Z",
"last_edited_at": null,
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
"node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
"number": 1,
"pinned": false,
"private": false,
"team_url": "https://api.github.com/teams/2343027",
"title": "Our first team post",
"updated_at": "2018-01-25T18:56:31Z",
"url": "https://api.github.com/teams/2343027/discussions/1",
"reactions": {
"url": "https://api.github.com/teams/2343027/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Team Discussion)]
- Content Type
- application/json
Team Discussion
object (Team Discussion)
A team discussion is a persistent record of a free-form conversation within a team.
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the discussion.
- Example
- "Please suggest improvements to our workflow in comments."
body_html
string
required
- Example
- "<p>Hi! This is an area for us to collaborate as a team</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
comments_count
int
required
- Example
- 0
comments_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1/comments"
created_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
last_edited_at
string or null
date-time
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1"
node_id
string
required
- Example
- "MDE0OlRlYW1EaXNjdXNzaW9uMQ=="
number
int
required
The unique sequence number of a team discussion.
- Example
- 42
pinned
boolean
required
Whether or not this discussion should be pinned for easy retrieval.
- Example
- true
private
boolean
required
Whether or not this discussion should be restricted to team members and organization administrators.
- Example
- true
team_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027"
title
string
required
The title of the discussion.
- Example
- "How can we improve our workflow?"
updated_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Link
string
Create a discussion (Legacy)
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 Create a discussion
endpoint.
Creates a new discussion post on a team's page. OAuth access tokens require the write:discussion
scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
title
string
required
The discussion post's title.
body
string
required
The discussion post's body text.
private
boolean
Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true
to create a private post.
- Default
- false
team_id
int
required
The unique identifier of the team.
Request
{
"title": "Our first team post",
"body": "Hi! This is an area for us to collaborate as a team."
}
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Hi! This is an area for us to collaborate as a team.",
"body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
"body_version": "0d495416a700fb06133c612575d92bfb",
"comments_count": 0,
"comments_url": "https://api.github.com/teams/2343027/discussions/1/comments",
"created_at": "2018-01-25T18:56:31Z",
"last_edited_at": null,
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
"node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
"number": 1,
"pinned": false,
"private": false,
"team_url": "https://api.github.com/teams/2343027",
"title": "Our first team post",
"updated_at": "2018-01-25T18:56:31Z",
"url": "https://api.github.com/teams/2343027/discussions/1",
"reactions": {
"url": "https://api.github.com/teams/2343027/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the discussion.
- Example
- "Please suggest improvements to our workflow in comments."
body_html
string
required
- Example
- "<p>Hi! This is an area for us to collaborate as a team</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
comments_count
int
required
- Example
- 0
comments_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1/comments"
created_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
last_edited_at
string or null
date-time
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1"
node_id
string
required
- Example
- "MDE0OlRlYW1EaXNjdXNzaW9uMQ=="
number
int
required
The unique sequence number of a team discussion.
- Example
- 42
pinned
boolean
required
Whether or not this discussion should be pinned for easy retrieval.
- Example
- true
private
boolean
required
Whether or not this discussion should be restricted to team members and organization administrators.
- Example
- true
team_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027"
title
string
required
The title of the discussion.
- Example
- "How can we improve our workflow?"
updated_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Get a discussion (Legacy)
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 Get a discussion endpoint.
Get a specific discussion on a team's page. OAuth access tokens require the read:discussion
scope.
team_id
int
required
The unique identifier of the team.
discussion_number
int
required
The number that identifies the discussion.
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Hi! This is an area for us to collaborate as a team.",
"body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
"body_version": "0d495416a700fb06133c612575d92bfb",
"comments_count": 0,
"comments_url": "https://api.github.com/teams/2343027/discussions/1/comments",
"created_at": "2018-01-25T18:56:31Z",
"last_edited_at": null,
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
"node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
"number": 1,
"pinned": false,
"private": false,
"team_url": "https://api.github.com/teams/2343027",
"title": "Our first team post",
"updated_at": "2018-01-25T18:56:31Z",
"url": "https://api.github.com/teams/2343027/discussions/1",
"reactions": {
"url": "https://api.github.com/teams/2343027/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the discussion.
- Example
- "Please suggest improvements to our workflow in comments."
body_html
string
required
- Example
- "<p>Hi! This is an area for us to collaborate as a team</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
comments_count
int
required
- Example
- 0
comments_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1/comments"
created_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
last_edited_at
string or null
date-time
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1"
node_id
string
required
- Example
- "MDE0OlRlYW1EaXNjdXNzaW9uMQ=="
number
int
required
The unique sequence number of a team discussion.
- Example
- 42
pinned
boolean
required
Whether or not this discussion should be pinned for easy retrieval.
- Example
- true
private
boolean
required
Whether or not this discussion should be restricted to team members and organization administrators.
- Example
- true
team_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027"
title
string
required
The title of the discussion.
- Example
- "How can we improve our workflow?"
updated_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Delete a discussion (Legacy)
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 Delete a discussion
endpoint.
Delete a discussion from a team's page. OAuth access tokens require the write:discussion
scope.
team_id
int
required
The unique identifier of the team.
discussion_number
int
required
The number that identifies the discussion.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Update a discussion (Legacy)
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 Update a discussion endpoint.
Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the write:discussion
scope.
title
string
The discussion post's title.
body
string
The discussion post's body text.
team_id
int
required
The unique identifier of the team.
discussion_number
int
required
The number that identifies the discussion.
Request
{
"title": "Welcome to our first team post"
}
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Hi! This is an area for us to collaborate as a team.",
"body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
"body_version": "0d495416a700fb06133c612575d92bfb",
"comments_count": 1,
"comments_url": "https://api.github.com/teams/2343027/discussions/1/comments",
"created_at": "2018-01-25T18:56:31Z",
"last_edited_at": "2018-01-26T18:22:20Z",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
"node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
"number": 1,
"pinned": false,
"private": false,
"team_url": "https://api.github.com/teams/2343027",
"title": "Welcome to our first team post",
"updated_at": "2018-01-26T18:22:20Z",
"url": "https://api.github.com/teams/2343027/discussions/1",
"reactions": {
"url": "https://api.github.com/teams/2343027/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the discussion.
- Example
- "Please suggest improvements to our workflow in comments."
body_html
string
required
- Example
- "<p>Hi! This is an area for us to collaborate as a team</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
comments_count
int
required
- Example
- 0
comments_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1/comments"
created_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
last_edited_at
string or null
date-time
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1"
node_id
string
required
- Example
- "MDE0OlRlYW1EaXNjdXNzaW9uMQ=="
number
int
required
The unique sequence number of a team discussion.
- Example
- 42
pinned
boolean
required
Whether or not this discussion should be pinned for easy retrieval.
- Example
- true
private
boolean
required
Whether or not this discussion should be restricted to team members and organization administrators.
- Example
- true
team_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027"
title
string
required
The title of the discussion.
- Example
- "How can we improve our workflow?"
updated_at
string
date-time
required
- Example
- "2018-01-25T18:56:31Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2343027/discussions/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
List discussion comments (Legacy)
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 discussion comments endpoint.
List all comments on a team discussion. OAuth access tokens require the read:discussion
scope.
direction
string
The direction to sort the results by.
- Default
- "desc"
- Enum
-
- asc
- desc
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
team_id
int
required
The unique identifier of the team.
discussion_number
int
required
The number that identifies the discussion.
Response
Response
[
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Do you like apples?",
"body_html": "<p>Do you like apples?</p>",
"body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51",
"created_at": "2018-01-15T23:53:58Z",
"last_edited_at": null,
"discussion_url": "https://api.github.com/teams/2403582/discussions/1",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
"node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
"number": 1,
"updated_at": "2018-01-15T23:53:58Z",
"url": "https://api.github.com/teams/2403582/discussions/1/comments/1",
"reactions": {
"url": "https://api.github.com/teams/2403582/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
array[object (Team Discussion Comment)]
- Content Type
- application/json
Team Discussion Comment
object (Team Discussion Comment)
A reply to a discussion within a team.
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the comment.
- Example
- "I agree with this suggestion."
body_html
string
required
- Example
- "<p>Do you like apples?</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
created_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
last_edited_at
string or null
date-time
required
discussion_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1"
node_id
string
required
- Example
- "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE="
number
int
required
The unique sequence number of a team discussion comment.
- Example
- 42
updated_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Link
string
Create a discussion comment (Legacy)
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 Create a discussion comment endpoint.
Creates a new comment on a team discussion. OAuth access tokens require the write:discussion
scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
body
string
required
The discussion comment's body text.
team_id
int
required
The unique identifier of the team.
discussion_number
int
required
The number that identifies the discussion.
Request
{
"body": "Do you like apples?"
}
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Do you like apples?",
"body_html": "<p>Do you like apples?</p>",
"body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51",
"created_at": "2018-01-15T23:53:58Z",
"last_edited_at": null,
"discussion_url": "https://api.github.com/teams/2403582/discussions/1",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
"node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
"number": 1,
"updated_at": "2018-01-15T23:53:58Z",
"url": "https://api.github.com/teams/2403582/discussions/1/comments/1",
"reactions": {
"url": "https://api.github.com/teams/2403582/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the comment.
- Example
- "I agree with this suggestion."
body_html
string
required
- Example
- "<p>Do you like apples?</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
created_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
last_edited_at
string or null
date-time
required
discussion_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1"
node_id
string
required
- Example
- "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE="
number
int
required
The unique sequence number of a team discussion comment.
- Example
- 42
updated_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Get a discussion comment (Legacy)
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 Get a discussion comment endpoint.
Get a specific comment on a team discussion. OAuth access tokens require the read:discussion
scope.
team_id
int
required
The unique identifier of the team.
discussion_number
int
required
The number that identifies the discussion.
comment_number
int
required
The number that identifies the comment.
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Do you like apples?",
"body_html": "<p>Do you like apples?</p>",
"body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51",
"created_at": "2018-01-15T23:53:58Z",
"last_edited_at": null,
"discussion_url": "https://api.github.com/teams/2403582/discussions/1",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
"node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
"number": 1,
"updated_at": "2018-01-15T23:53:58Z",
"url": "https://api.github.com/teams/2403582/discussions/1/comments/1",
"reactions": {
"url": "https://api.github.com/teams/2403582/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the comment.
- Example
- "I agree with this suggestion."
body_html
string
required
- Example
- "<p>Do you like apples?</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
created_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
last_edited_at
string or null
date-time
required
discussion_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1"
node_id
string
required
- Example
- "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE="
number
int
required
The unique sequence number of a team discussion comment.
- Example
- 42
updated_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
Delete a discussion comment (Legacy)
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 Delete a discussion comment endpoint.
Deletes a comment on a team discussion. OAuth access tokens require the write:discussion
scope.
team_id
int
required
The unique identifier of the team.
discussion_number
int
required
The number that identifies the discussion.
comment_number
int
required
The number that identifies the comment.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Update a discussion comment (Legacy)
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 Update a discussion comment endpoint.
Edits the body text of a discussion comment. OAuth access tokens require the write:discussion
scope.
body
string
required
The discussion comment's body text.
team_id
int
required
The unique identifier of the team.
discussion_number
int
required
The number that identifies the discussion.
comment_number
int
required
The number that identifies the comment.
Request
{
"body": "Do you like pineapples?"
}
Response
Response
{
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"body": "Do you like pineapples?",
"body_html": "<p>Do you like pineapples?</p>",
"body_version": "e6907b24d9c93cc0c5024a7af5888116",
"created_at": "2018-01-15T23:53:58Z",
"last_edited_at": "2018-01-26T18:22:20Z",
"discussion_url": "https://api.github.com/teams/2403582/discussions/1",
"html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
"node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
"number": 1,
"updated_at": "2018-01-26T18:22:20Z",
"url": "https://api.github.com/teams/2403582/discussions/1/comments/1",
"reactions": {
"url": "https://api.github.com/teams/2403582/discussions/1/reactions",
"total_count": 5,
"+1": 3,
"-1": 1,
"laugh": 0,
"confused": 0,
"heart": 1,
"hooray": 0,
"eyes": 1,
"rocket": 1
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
author
object (author) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
body
string
required
The main text of the comment.
- Example
- "I agree with this suggestion."
body_html
string
required
- Example
- "<p>Do you like apples?</p>"
body_version
string
required
The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.
- Example
- "0307116bbf7ced493b8d8a346c650b71"
created_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
last_edited_at
string or null
date-time
required
discussion_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1"
node_id
string
required
- Example
- "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE="
number
int
required
The unique sequence number of a team discussion comment.
- Example
- 42
updated_at
string
date-time
required
- Example
- "2018-01-15T23:53:58Z"
url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1"
reactions
object (reactions)
url
string
uri
required
total_count
int
required
+1
int
required
-1
int
required
laugh
int
required
confused
int
required
heart
int
required
hooray
int
required
eyes
int
required
rocket
int
required
List team members (Legacy)
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 team members
endpoint.
Team members will include the members of child teams.
role
string
Filters members returned by their role in the team.
- Default
- "all"
- Enum
-
- member
- maintainer
- all
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
team_id
int
required
The unique identifier of the team.
Response
Response
[
{
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Simple User)]
- Content Type
- application/json
Simple User
object (Simple User)
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
Link
string
Get team member (Legacy)
The "Get team member" endpoint (described below) is deprecated.
We recommend using the Get team membership for a user endpoint instead. It allows you to get both active and pending memberships.
To list members in a team, the team must be visible to the authenticated user.
team_id
int
required
The unique identifier of the team.
username
string
required
The handle for the GitHub user account.
Response
if user is a member
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
if user is not a member
Empty response
Add team member (Legacy)
The "Add team member" endpoint (described below) is deprecated.
We recommend using the Add or update team membership for a user endpoint instead. It allows you to invite new organization members to your teams.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.
Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub Enterprise Server."
Note that you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."
team_id
int
required
The unique identifier of the team.
username
string
required
The handle for the GitHub user account.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
No schema
message
string
documentation_url
string
url
string
status
string
Not Found if team synchronization is set up
Empty response
Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization
Empty response
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Remove team member (Legacy)
The "Remove team member" endpoint (described below) is deprecated.
We recommend using the Remove team membership for a user endpoint instead. It allows you to remove both active and pending memberships.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.
Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub Enterprise Server."
team_id
int
required
The unique identifier of the team.
username
string
required
The handle for the GitHub user account.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
Not Found if team synchronization is setup
Empty response
Get team membership for a user (Legacy)
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 Get team membership for a user endpoint.
Team members will include the members of child teams.
To get a user's membership with a team, the team must be visible to the authenticated user.
Note:
The response contains the state
of the membership and the member's role
.
The role
for organization owners is set to maintainer
. For more information about maintainer
roles, see Create a team.
team_id
int
required
The unique identifier of the team.
username
string
required
The handle for the GitHub user account.
Response
Response
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "maintainer",
"state": "active"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
url
string
uri
required
role
string
required
The role of the user in the team.
- Default
- "member"
- Enum
-
- member
- maintainer
- Example
- "member"
state
string
required
The state of the user's membership in the team.
- Enum
-
- active
- pending
Add or update team membership for a user (Legacy)
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 Add or update team membership for a user endpoint.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.
Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub Enterprise Server."
If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.
If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
role
string
The role that this user should have in the team.
- Default
- "member"
- Enum
-
- member
- maintainer
team_id
int
required
The unique identifier of the team.
username
string
required
The handle for the GitHub user account.
Request
{
"role": "member"
}
Response
Response
{
"url": "https://api.github.com/teams/1/memberships/octocat",
"role": "member",
"state": "pending"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
message
string
documentation_url
string
url
string
status
string
Forbidden if team synchronization is set up
Empty response
Unprocessable Entity if you attempt to add an organization to a team
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
url
string
uri
required
role
string
required
The role of the user in the team.
- Default
- "member"
- Enum
-
- member
- maintainer
- Example
- "member"
state
string
required
The state of the user's membership in the team.
- Enum
-
- active
- pending
Remove team membership for a user (Legacy)
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 team membership for a user endpoint.
Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
Note: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "Synchronizing teams between your identity provider and GitHub Enterprise Server."
team_id
int
required
The unique identifier of the team.
username
string
required
The handle for the GitHub user account.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
if team synchronization is set up
Empty response
List team projects (Legacy)
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 team projects
endpoint.
Lists the organization projects for a team.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
team_id
int
required
The unique identifier of the team.
Response
Response
[
{
"owner_url": "https://api.github.com/orgs/octocat",
"url": "https://api.github.com/projects/1002605",
"html_url": "https://github.com/orgs/api-playground/projects/1",
"columns_url": "https://api.github.com/projects/1002605/columns",
"id": 1002605,
"node_id": "MDc6UHJvamVjdDEwMDI2MDU=",
"name": "Organization Roadmap",
"body": "High-level roadmap for the upcoming year.",
"number": 1,
"state": "open",
"creator": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"created_at": "2011-04-11T20:09:31Z",
"updated_at": "2014-03-04T18:58:10Z",
"organization_permission": "write",
"private": false,
"permissions": {
"read": true,
"write": true,
"admin": false
}
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Team Project)]
- Content Type
- application/json
Team Project
object (Team Project)
A team's access to a project.
owner_url
string
required
url
string
required
html_url
string
required
columns_url
string
required
id
int
required
node_id
string
required
name
string
required
body
string or null
required
number
int
required
state
string
required
creator
object (creator)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
created_at
string
required
updated_at
string
required
organization_permission
string
The organization permission for this project. Only present when owner is an organization.
private
boolean
Whether the project is private or not. Only present when owner is an organization.
permissions
object (permissions)
required
read
boolean
required
write
boolean
required
admin
boolean
required
Link
string
Check team permissions for a project (Legacy)
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 Check team permissions for a project endpoint.
Checks whether a team has read
, write
, or admin
permissions for an organization project. The response includes projects inherited from a parent team.
team_id
int
required
The unique identifier of the team.
project_id
int
required
The unique identifier of the project.
Response
Response
{
"owner_url": "https://api.github.com/orgs/octocat",
"url": "https://api.github.com/projects/1002605",
"html_url": "https://github.com/orgs/api-playground/projects/1",
"columns_url": "https://api.github.com/projects/1002605/columns",
"id": 1002605,
"node_id": "MDc6UHJvamVjdDEwMDI2MDU=",
"name": "Organization Roadmap",
"body": "High-level roadmap for the upcoming year.",
"number": 1,
"state": "open",
"creator": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"created_at": "2011-04-11T20:09:31Z",
"updated_at": "2014-03-04T18:58:10Z",
"organization_permission": "write",
"private": false,
"permissions": {
"read": true,
"write": true,
"admin": false
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Not Found if project is not managed by this team
Empty response
owner_url
string
required
url
string
required
html_url
string
required
columns_url
string
required
id
int
required
node_id
string
required
name
string
required
body
string or null
required
number
int
required
state
string
required
creator
object (creator)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
created_at
string
required
updated_at
string
required
organization_permission
string
The organization permission for this project. Only present when owner is an organization.
private
boolean
Whether the project is private or not. Only present when owner is an organization.
permissions
object (permissions)
required
read
boolean
required
write
boolean
required
admin
boolean
required
Add or update team project permissions (Legacy)
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 Add or update team project permissions endpoint.
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.
permission
string
The permission to grant to the team for 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 this endpoint. For more information, see "HTTP verbs."
- Enum
-
- read
- write
- admin
team_id
int
required
The unique identifier of the team.
project_id
int
required
The unique identifier of the project.
Request
{
"permission": "read"
}
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
message
string
documentation_url
string
url
string
status
string
Forbidden if the project is not owned by the organization
{
"message": "Must have admin rights to Repository.",
"documentation_url": "https://docs.github.com/enterprise-server@3.9/rest/reference/teams#add-or-update-team-project-permissions"
}
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
Remove a project from a team (Legacy)
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 project from a team endpoint.
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. Note: This endpoint removes the project from the team, but does not delete it.
team_id
int
required
The unique identifier of the team.
project_id
int
required
The unique identifier of the project.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
List team repositories (Legacy)
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 team repositories endpoint.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
team_id
int
required
The unique identifier of the team.
Response
Response
[
{
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "https://api.github.com/repos/octocat/Hello-World/events",
"forks_url": "https://api.github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "https://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription",
"tags_url": "https://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "https://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "https://api.github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": false,
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"has_discussions": false,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": false,
"push": false,
"pull": true
},
"security_and_analysis": {
"advanced_security": {
"status": "enabled"
},
"secret_scanning": {
"status": "enabled"
},
"secret_scanning_push_protection": {
"status": "disabled"
}
}
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Minimal Repository)]
- Content Type
- application/json
Minimal Repository
object (Minimal Repository)
Minimal Repository
id
int
required
- Example
- 1296269
node_id
string
required
- Example
- "MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
name
string
required
- Example
- "Hello-World"
full_name
string
required
- Example
- "octocat/Hello-World"
owner
object (owner)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World"
description
string or null
required
- Example
- "This your first repo!"
fork
boolean
required
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World"
archive_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
assignees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
blobs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
branches_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
collaborators_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
comments_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/comments{/number}"
commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
compare_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
contents_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
contributors_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contributors"
deployments_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/deployments"
downloads_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/downloads"
events_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/events"
forks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/forks"
git_commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
git_refs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
git_tags_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
git_url
string
issue_comment_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
issue_events_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
issues_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues{/number}"
keys_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
labels_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/labels{/name}"
languages_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/languages"
merges_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/merges"
milestones_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
notifications_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
pulls_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
releases_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
ssh_url
string
stargazers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/stargazers"
statuses_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
subscribers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscribers"
subscription_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscription"
tags_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/tags"
teams_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/teams"
trees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
clone_url
string
mirror_url
string or null
hooks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/hooks"
svn_url
string
homepage
string or null
language
string or null
forks_count
int
stargazers_count
int
watchers_count
int
size
int
The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.
default_branch
string
open_issues_count
int
is_template
boolean
topics
array[string]
string
has_issues
boolean
has_projects
boolean
has_wiki
boolean
has_pages
boolean
has_downloads
boolean
has_discussions
boolean
archived
boolean
disabled
boolean
visibility
string
pushed_at
string or null
date-time
- Example
- "2011-01-26T19:06:43Z"
created_at
string or null
date-time
- Example
- "2011-01-26T19:01:12Z"
updated_at
string or null
date-time
- Example
- "2011-01-26T19:14:43Z"
permissions
object (permissions)
admin
boolean
maintain
boolean
push
boolean
triage
boolean
pull
boolean
role_name
string
- Example
- "admin"
temp_clone_token
string
delete_branch_on_merge
boolean
subscribers_count
int
network_count
int
code_of_conduct
object (code_of_conduct)
Code Of Conduct
key
string
required
- Example
- "contributor_covenant"
name
string
required
- Example
- "Contributor Covenant"
url
string
uri
required
- Example
- "https://api.github.com/codes_of_conduct/contributor_covenant"
body
string
- Example
- "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
html_url
string or null
uri
required
license
object (license) or null
key
string
name
string
spdx_id
string
url
string
node_id
string
forks
int
- Example
- 0
open_issues
int
- Example
- 0
watchers
int
- Example
- 0
allow_forking
boolean
web_commit_signoff_required
boolean
- Example
- false
security_and_analysis
object (security_and_analysis) or null
advanced_security
object (advanced_security)
status
string
- Enum
-
- enabled
- disabled
secret_scanning
object (secret_scanning)
status
string
- Enum
-
- enabled
- disabled
secret_scanning_push_protection
object (secret_scanning_push_protection)
status
string
- Enum
-
- enabled
- disabled
Link
string
Check team permissions for a repository (Legacy)
Note: Repositories inherited through a parent team will also be checked.
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 Check team permissions for a repository endpoint.
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 Accept
header:
team_id
int
required
The unique identifier of the team.
owner
string
required
The account owner of the repository. The name is not case sensitive.
repo
string
required
The name of the repository. The name is not case sensitive.
Response
Alternative response with extra repository information
{
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World",
"archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "https://api.github.com/repos/octocat/Hello-World/events",
"forks_url": "https://api.github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "https://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription",
"tags_url": "https://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "https://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "https://api.github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": false,
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": false,
"maintain": false,
"push": false,
"triage": false,
"pull": true
},
"role_name": "read",
"allow_rebase_merge": true,
"template_repository": {
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World-Template",
"full_name": "octocat/Hello-World-Template",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World-Template",
"description": "This your first repo!",
"fork": false,
"url": "https://api.github.com/repos/octocat/Hello-World-Template",
"archive_url": "https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user}",
"blobs_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/octocat/Hello-World-Template/comments{/number}",
"commits_url": "https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha}",
"compare_url": "https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path}",
"contributors_url": "https://api.github.com/repos/octocat/Hello-World-Template/contributors",
"deployments_url": "https://api.github.com/repos/octocat/Hello-World-Template/deployments",
"downloads_url": "https://api.github.com/repos/octocat/Hello-World-Template/downloads",
"events_url": "https://api.github.com/repos/octocat/Hello-World-Template/events",
"forks_url": "https://api.github.com/repos/octocat/Hello-World-Template/forks",
"git_commits_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World-Template.git",
"issue_comment_url": "https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number}",
"issues_url": "https://api.github.com/repos/octocat/Hello-World-Template/issues{/number}",
"keys_url": "https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id}",
"labels_url": "https://api.github.com/repos/octocat/Hello-World-Template/labels{/name}",
"languages_url": "https://api.github.com/repos/octocat/Hello-World-Template/languages",
"merges_url": "https://api.github.com/repos/octocat/Hello-World-Template/merges",
"milestones_url": "https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number}",
"releases_url": "https://api.github.com/repos/octocat/Hello-World-Template/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World-Template.git",
"stargazers_url": "https://api.github.com/repos/octocat/Hello-World-Template/stargazers",
"statuses_url": "https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/octocat/Hello-World-Template/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/Hello-World-Template/subscription",
"tags_url": "https://api.github.com/repos/octocat/Hello-World-Template/tags",
"teams_url": "https://api.github.com/repos/octocat/Hello-World-Template/teams",
"trees_url": "https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World-Template.git",
"mirror_url": "git:git.example.com/octocat/Hello-World-Template",
"hooks_url": "https://api.github.com/repos/octocat/Hello-World-Template/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World-Template",
"homepage": "https://github.com",
"language": null,
"forks": 9,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"watchers": 80,
"size": 108,
"default_branch": "master",
"open_issues": 0,
"open_issues_count": 0,
"is_template": true,
"license": {
"key": "mit",
"name": "MIT License",
"url": "https://api.github.com/licenses/mit",
"spdx_id": "MIT",
"node_id": "MDc6TGljZW5zZW1pdA==",
"html_url": "https://api.github.com/licenses/mit"
},
"topics": [
"octocat",
"atom",
"electron",
"api"
],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"pull": true,
"triage": false,
"push": false,
"maintain": false,
"admin": false
},
"allow_rebase_merge": true,
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
"allow_squash_merge": true,
"allow_auto_merge": false,
"delete_branch_on_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0
},
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
"allow_squash_merge": true,
"allow_auto_merge": false,
"delete_branch_on_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0,
"license": {
"key": "mit",
"name": "MIT License",
"url": "https://api.github.com/licenses/mit",
"spdx_id": "MIT",
"node_id": "MDc6TGljZW5zZW1pdA==",
"html_url": "https://api.github.com/licenses/mit"
},
"forks": 1,
"open_issues": 1,
"watchers": 1
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
No schema
Response if repository is managed by this team
Empty response
Not Found if repository is not managed by this team
Empty response
id
int
required
Unique identifier of the repository
- Example
- 42
node_id
string
required
- Example
- "MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
name
string
required
The name of the repository.
- Example
- "Team Environment"
full_name
string
required
- Example
- "octocat/Hello-World"
license
object (license) or null
required
License Simple
key
string
required
- Example
- "mit"
name
string
required
- Example
- "MIT License"
url
string or null
uri
required
- Example
- "https://api.github.com/licenses/mit"
spdx_id
string or null
required
- Example
- "MIT"
node_id
string
required
- Example
- "MDc6TGljZW5zZW1pdA=="
html_url
string
uri
forks
int
required
permissions
object (permissions)
admin
boolean
required
pull
boolean
required
triage
boolean
push
boolean
required
maintain
boolean
role_name
string
- Example
- "admin"
owner
object (owner) or null
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
Whether the repository is private or public.
- Default
- false
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World"
description
string or null
required
- Example
- "This your first repo!"
fork
boolean
required
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World"
archive_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
assignees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
blobs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
branches_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
collaborators_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
comments_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/comments{/number}"
commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
compare_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
contents_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
contributors_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contributors"
deployments_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/deployments"
downloads_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/downloads"
events_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/events"
forks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/forks"
git_commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
git_refs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
git_tags_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
git_url
string
required
- Example
- "git:github.com/octocat/Hello-World.git"
issue_comment_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
issue_events_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
issues_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues{/number}"
keys_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
labels_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/labels{/name}"
languages_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/languages"
merges_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/merges"
milestones_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
notifications_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
pulls_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
releases_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
ssh_url
string
required
- Example
- "git@github.com:octocat/Hello-World.git"
stargazers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/stargazers"
statuses_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
subscribers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscribers"
subscription_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscription"
tags_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/tags"
teams_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/teams"
trees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
clone_url
string
required
- Example
- "https://github.com/octocat/Hello-World.git"
mirror_url
string or null
uri
required
- Example
- "git:git.example.com/octocat/Hello-World"
hooks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/hooks"
svn_url
string
uri
required
- Example
- "https://svn.github.com/octocat/Hello-World"
homepage
string or null
uri
required
- Example
- "https://github.com"
language
string or null
required
forks_count
int
required
- Example
- 9
stargazers_count
int
required
- Example
- 80
watchers_count
int
required
- Example
- 80
size
int
required
- Example
- 108
default_branch
string
required
The default branch of the repository.
- Example
- "master"
open_issues_count
int
required
- Example
- 0
is_template
boolean
Whether this repository acts as a template that can be used to generate new repositories.
- Default
- false
- Example
- true
topics
array[string]
string
has_issues
boolean
required
Whether issues are enabled.
- Default
- true
- Example
- true
has_projects
boolean
required
Whether projects are enabled.
- Default
- true
- Example
- true
has_wiki
boolean
required
Whether the wiki is enabled.
- Default
- true
- Example
- true
has_pages
boolean
required
has_downloads
boolean
required
Whether downloads are enabled.
- Default
- true
- Example
- true
archived
boolean
required
Whether the repository is archived.
- Default
- false
disabled
boolean
required
Returns whether or not this repository disabled.
visibility
string
The repository visibility: public, private, or internal.
- Default
- "public"
pushed_at
string or null
date-time
required
- Example
- "2011-01-26T19:06:43Z"
created_at
string or null
date-time
required
- Example
- "2011-01-26T19:01:12Z"
updated_at
string or null
date-time
required
- Example
- "2011-01-26T19:14:43Z"
allow_rebase_merge
boolean
Whether to allow rebase merges for pull requests.
- Default
- true
- Example
- true
template_repository
object (template_repository) or null
A repository on GitHub.
id
int
required
Unique identifier of the repository
- Example
- 42
node_id
string
required
- Example
- "MDEwOlJlcG9zaXRvcnkxMjk2MjY5"
name
string
required
The name of the repository.
- Example
- "Team Environment"
full_name
string
required
- Example
- "octocat/Hello-World"
license
object (license) or null
required
License Simple
key
string
required
- Example
- "mit"
name
string
required
- Example
- "MIT License"
url
string or null
uri
required
- Example
- "https://api.github.com/licenses/mit"
spdx_id
string or null
required
- Example
- "MIT"
node_id
string
required
- Example
- "MDc6TGljZW5zZW1pdA=="
html_url
string
uri
organization
object (organization) or null
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
forks
int
required
permissions
object (permissions)
admin
boolean
required
pull
boolean
required
triage
boolean
push
boolean
required
maintain
boolean
owner
object (owner)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
private
boolean
required
Whether the repository is private or public.
- Default
- false
html_url
string
uri
required
- Example
- "https://github.com/octocat/Hello-World"
description
string or null
required
- Example
- "This your first repo!"
fork
boolean
required
url
string
uri
required
- Example
- "https://api.github.com/repos/octocat/Hello-World"
archive_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}"
assignees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/assignees{/user}"
blobs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}"
branches_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/branches{/branch}"
collaborators_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}"
comments_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/comments{/number}"
commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/commits{/sha}"
compare_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}"
contents_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contents/{+path}"
contributors_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/contributors"
deployments_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/deployments"
downloads_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/downloads"
events_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/events"
forks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/forks"
git_commits_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}"
git_refs_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}"
git_tags_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}"
git_url
string
required
- Example
- "git:github.com/octocat/Hello-World.git"
issue_comment_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}"
issue_events_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}"
issues_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/issues{/number}"
keys_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}"
labels_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/labels{/name}"
languages_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/languages"
merges_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/merges"
milestones_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/milestones{/number}"
notifications_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}"
pulls_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/pulls{/number}"
releases_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/releases{/id}"
ssh_url
string
required
- Example
- "git@github.com:octocat/Hello-World.git"
stargazers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/stargazers"
statuses_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}"
subscribers_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscribers"
subscription_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/subscription"
tags_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/tags"
teams_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/teams"
trees_url
string
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}"
clone_url
string
required
- Example
- "https://github.com/octocat/Hello-World.git"
mirror_url
string or null
uri
required
- Example
- "git:git.example.com/octocat/Hello-World"
hooks_url
string
uri
required
- Example
- "http://api.github.com/repos/octocat/Hello-World/hooks"
svn_url
string
uri
required
- Example
- "https://svn.github.com/octocat/Hello-World"
homepage
string or null
uri
required
- Example
- "https://github.com"
language
string or null
required
forks_count
int
required
- Example
- 9
stargazers_count
int
required
- Example
- 80
watchers_count
int
required
- Example
- 80
size
int
required
The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.
- Example
- 108
default_branch
string
required
The default branch of the repository.
- Example
- "master"
open_issues_count
int
required
- Example
- 0
is_template
boolean
Whether this repository acts as a template that can be used to generate new repositories.
- Default
- false
- Example
- true
topics
array[string]
string
has_issues
boolean
required
Whether issues are enabled.
- Default
- true
- Example
- true
has_projects
boolean
required
Whether projects are enabled.
- Default
- true
- Example
- true
has_wiki
boolean
required
Whether the wiki is enabled.
- Default
- true
- Example
- true
has_pages
boolean
required
has_downloads
boolean
required
Whether downloads are enabled.
- Default
- true
- Example
- true
has_discussions
boolean
Whether discussions are enabled.
- Default
- false
- Example
- true
archived
boolean
required
Whether the repository is archived.
- Default
- false
disabled
boolean
required
Returns whether or not this repository disabled.
visibility
string
The repository visibility: public, private, or internal.
- Default
- "public"
pushed_at
string or null
date-time
required
- Example
- "2011-01-26T19:06:43Z"
created_at
string or null
date-time
required
- Example
- "2011-01-26T19:01:12Z"
updated_at
string or null
date-time
required
- Example
- "2011-01-26T19:14:43Z"
allow_rebase_merge
boolean
Whether to allow rebase merges for pull requests.
- Default
- true
- Example
- true
template_repository
object (template_repository) or null
id
int
node_id
string
name
string
full_name
string
owner
object (owner)
login
string
id
int
node_id
string
avatar_url
string
gravatar_id
string
url
string
html_url
string
followers_url
string
following_url
string
gists_url
string
starred_url
string
subscriptions_url
string
organizations_url
string
repos_url
string
events_url
string
received_events_url
string
type
string
site_admin
boolean
private
boolean
html_url
string
description
string
fork
boolean
url
string
archive_url
string
assignees_url
string
blobs_url
string
branches_url
string
collaborators_url
string
comments_url
string
commits_url
string
compare_url
string
contents_url
string
contributors_url
string
deployments_url
string
downloads_url
string
events_url
string
forks_url
string
git_commits_url
string
git_refs_url
string
git_tags_url
string
git_url
string
issue_comment_url
string
issue_events_url
string
issues_url
string
keys_url
string
labels_url
string
languages_url
string
merges_url
string
milestones_url
string
notifications_url
string
pulls_url
string
releases_url
string
ssh_url
string
stargazers_url
string
statuses_url
string
subscribers_url
string
subscription_url
string
tags_url
string
teams_url
string
trees_url
string
clone_url
string
mirror_url
string
hooks_url
string
svn_url
string
homepage
string
language
string
forks_count
int
stargazers_count
int
watchers_count
int
size
int
default_branch
string
open_issues_count
int
is_template
boolean
topics
array[string]
string
has_issues
boolean
has_projects
boolean
has_wiki
boolean
has_pages
boolean
has_downloads
boolean
archived
boolean
disabled
boolean
visibility
string
pushed_at
string
created_at
string
updated_at
string
permissions
object (permissions)
admin
boolean
maintain
boolean
push
boolean
triage
boolean
pull
boolean
allow_rebase_merge
boolean
temp_clone_token
string
allow_squash_merge
boolean
allow_auto_merge
boolean
delete_branch_on_merge
boolean
allow_update_branch
boolean
use_squash_pr_title_as_default
boolean
squash_merge_commit_title
string
The default value for a squash merge commit title:
PR_TITLE
- default to the pull request's title.COMMIT_OR_PR_TITLE
- default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
- Enum
-
- PR_TITLE
- COMMIT_OR_PR_TITLE
squash_merge_commit_message
string
The default value for a squash merge commit message:
PR_BODY
- default to the pull request's body.COMMIT_MESSAGES
- default to the branch's commit messages.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- COMMIT_MESSAGES
- BLANK
merge_commit_title
string
The default value for a merge commit title.
PR_TITLE
- default to the pull request's title.MERGE_MESSAGE
- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
- Enum
-
- PR_TITLE
- MERGE_MESSAGE
merge_commit_message
string
The default value for a merge commit message.
PR_TITLE
- default to the pull request's title.PR_BODY
- default to the pull request's body.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- PR_TITLE
- BLANK
allow_merge_commit
boolean
subscribers_count
int
network_count
int
temp_clone_token
string
allow_squash_merge
boolean
Whether to allow squash merges for pull requests.
- Default
- true
- Example
- true
allow_auto_merge
boolean
Whether to allow Auto-merge to be used on pull requests.
- Default
- false
- Example
- false
delete_branch_on_merge
boolean
Whether to delete head branches when pull requests are merged
- Default
- false
- Example
- false
allow_update_branch
boolean
Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
- Default
- false
- Example
- false
use_squash_pr_title_as_default
boolean
deprecated
Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use squash_merge_commit_title
instead.
- Default
- false
squash_merge_commit_title
string
The default value for a squash merge commit title:
PR_TITLE
- default to the pull request's title.COMMIT_OR_PR_TITLE
- default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
- Enum
-
- PR_TITLE
- COMMIT_OR_PR_TITLE
squash_merge_commit_message
string
The default value for a squash merge commit message:
PR_BODY
- default to the pull request's body.COMMIT_MESSAGES
- default to the branch's commit messages.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- COMMIT_MESSAGES
- BLANK
merge_commit_title
string
The default value for a merge commit title.
PR_TITLE
- default to the pull request's title.MERGE_MESSAGE
- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
- Enum
-
- PR_TITLE
- MERGE_MESSAGE
merge_commit_message
string
The default value for a merge commit message.
PR_TITLE
- default to the pull request's title.PR_BODY
- default to the pull request's body.BLANK
- default to a blank commit message.
- Enum
-
- PR_BODY
- PR_TITLE
- BLANK
allow_merge_commit
boolean
Whether to allow merge commits for pull requests.
- Default
- true
- Example
- true
allow_forking
boolean
Whether to allow forking this repo
web_commit_signoff_required
boolean
Whether to require contributors to sign off on web-based commits
- Default
- false
subscribers_count
int
network_count
int
open_issues
int
required
watchers
int
required
master_branch
string
starred_at
string
- Example
- "\"2020-07-09T00:17:42Z\""
anonymous_access_enabled
boolean
Whether anonymous git access is enabled for this repository
temp_clone_token
string
allow_squash_merge
boolean
Whether to allow squash merges for pull requests.
- Default
- true
- Example
- true
allow_auto_merge
boolean
Whether to allow Auto-merge to be used on pull requests.
- Default
- false
- Example
- false
delete_branch_on_merge
boolean
Whether to delete head branches when pull requests are merged
- Default
- false
- Example
- false
allow_merge_commit
boolean
Whether to allow merge commits for pull requests.
- Default
- true
- Example
- true
allow_forking
boolean
Whether to allow forking this repo
- Default
- false
- Example
- false
web_commit_signoff_required
boolean
Whether to require contributors to sign off on web-based commits
- Default
- false
- Example
- false
subscribers_count
int
network_count
int
open_issues
int
required
watchers
int
required
master_branch
string
Add or update team repository permissions (Legacy)
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 "Add or update team repository permissions" endpoint.
To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity
status if you attempt to add a repository to a team that is not owned by the organization.
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."
permission
string
The permission to grant the team on this repository. If no permission is specified, the team's permission
attribute will be used to determine what permission to grant the team on this repository.
- Enum
-
- pull
- push
- admin
team_id
int
required
The unique identifier of the team.
owner
string
required
The account owner of the repository. The name is not case sensitive.
repo
string
required
The name of the repository. The name is not case sensitive.
Request
{
"permission": "push"
}
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
Remove a repository from a team (Legacy)
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.
team_id
int
required
The unique identifier of the team.
owner
string
required
The account owner of the repository. The name is not case sensitive.
repo
string
required
The name of the repository. The name is not case sensitive.
Response
Response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
List child teams (Legacy)
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.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
team_id
int
required
The unique identifier of the team.
Response
if child teams exist
[
{
"id": 2,
"node_id": "MDQ6VGVhbTI=",
"url": "https://api.github.com/teams/2",
"name": "Original Roster",
"slug": "original-roster",
"description": "Started it all.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/2/members{/member}",
"repositories_url": "https://api.github.com/teams/2/repos",
"parent": {
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos"
},
"html_url": "https://github.com/orgs/rails/teams/core"
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Validation failed, or the endpoint has been spammed.
{
"message": "string",
"documentation_url": "string",
"errors": [
{
"resource": "string",
"field": "string",
"message": "string",
"code": "string",
"index": 123,
"value": "string"
}
]
}
message
string
required
documentation_url
string
required
errors
array[object]
object
resource
string
field
string
message
string
code
string
required
index
int
value
One Of
string or null
int or null
array[string] or null
string
array[object (Team)]
- Content Type
- application/json
Team
object (Team)
Groups of organization members that gives permissions on specified repositories.
id
int
required
node_id
string
required
name
string
required
slug
string
required
description
string or null
required
privacy
string
permission
string
required
permissions
object (permissions)
pull
boolean
required
triage
boolean
required
push
boolean
required
maintain
boolean
required
admin
boolean
required
url
string
uri
required
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
members_url
string
required
repositories_url
string
uri
required
parent
object (parent) or null
required
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
Link
string
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. When using a fine-grained personal access token, the resource owner of the token must be a single organization, and have at least read-only member organization permissions. The response payload only contains the teams from a single organization when using a fine-grained personal access token.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
[
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"parent": null,
"members_count": 3,
"repos_count": 10,
"created_at": "2017-07-14T16:53:42Z",
"updated_at": "2017-08-17T12:37:15Z",
"organization": {
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"is_verified": true,
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
}
}
]
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
message
string
documentation_url
string
url
string
status
string
message
string
documentation_url
string
url
string
status
string
Not modified
Empty response
Resource not found
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
Forbidden
{
"message": "string",
"documentation_url": "string",
"url": "string",
"status": "string"
}
array[object (Full Team)]
- Content Type
- application/json
Full Team
object (Full Team)
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 42
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
name
string
required
Name of the team
- Example
- "Developers"
slug
string
required
- Example
- "justice-league"
description
string or null
required
- Example
- "A great team."
privacy
string
The level of privacy this team should have
- Enum
-
- closed
- secret
- Example
- "closed"
permission
string
required
Permission that the team will have for its repositories
- Example
- "push"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
parent
object (parent) or null
Groups of organization members that gives permissions on specified repositories.
id
int
required
Unique identifier of the team
- Example
- 1
node_id
string
required
- Example
- "MDQ6VGVhbTE="
url
string
uri
required
URL for the team
- Example
- "https://api.github.com/organizations/1/team/1"
members_url
string
required
- Example
- "https://api.github.com/organizations/1/team/1/members{/member}"
name
string
required
Name of the team
- Example
- "Justice League"
description
string or null
required
Description of the team
- Example
- "A great team."
permission
string
required
Permission that the team will have for its repositories
- Example
- "admin"
privacy
string
The level of privacy this team should have
- Example
- "closed"
html_url
string
uri
required
- Example
- "https://github.com/orgs/rails/teams/core"
repositories_url
string
uri
required
- Example
- "https://api.github.com/organizations/1/team/1/repos"
slug
string
required
- Example
- "justice-league"
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
members_count
int
required
- Example
- 3
repos_count
int
required
- Example
- 10
created_at
string
date-time
required
- Example
- "2017-07-14T16:53:42Z"
updated_at
string
date-time
required
- Example
- "2017-08-17T12:37:15Z"
organization
object (organization)
required
Team Organization
login
string
required
- Example
- "github"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDEyOk9yZ2FuaXphdGlvbjE="
url
string
uri
required
- Example
- "https://api.github.com/orgs/github"
repos_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/repos"
events_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/events"
hooks_url
string
required
- Example
- "https://api.github.com/orgs/github/hooks"
issues_url
string
required
- Example
- "https://api.github.com/orgs/github/issues"
members_url
string
required
- Example
- "https://api.github.com/orgs/github/members{/member}"
public_members_url
string
required
- Example
- "https://api.github.com/orgs/github/public_members{/member}"
avatar_url
string
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
description
string or null
required
- Example
- "A great organization"
name
string
- Example
- "github"
company
string
- Example
- "GitHub"
blog
string
uri
- Example
- "https://github.com/blog"
location
string
- Example
- "San Francisco"
string
- Example
- "octocat@github.com"
twitter_username
string or null
- Example
- "github"
is_verified
boolean
- Example
- true
has_organization_projects
boolean
required
- Example
- true
has_repository_projects
boolean
required
- Example
- true
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
html_url
string
uri
required
- Example
- "https://github.com/octocat"
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
type
string
required
- Example
- "Organization"
total_private_repos
int
- Example
- 100
owned_private_repos
int
- Example
- 100
private_gists
int or null
- Example
- 81
disk_usage
int or null
- Example
- 10000
collaborators
int or null
- Example
- 8
billing_email
string or null
- Example
- "org@example.com"
plan
object (plan)
name
string
required
space
int
required
private_repos
int
required
filled_seats
int
seats
int
default_repository_permission
string or null
members_can_create_repositories
boolean or null
- Example
- true
two_factor_requirement_enabled
boolean or null
- Example
- true
members_allowed_repository_creation_type
string
- Example
- "all"
members_can_create_public_repositories
boolean
- Example
- true
members_can_create_private_repositories
boolean
- Example
- true
members_can_create_internal_repositories
boolean
- Example
- true
members_can_create_pages
boolean
- Example
- true
members_can_create_public_pages
boolean
- Example
- true
members_can_create_private_pages
boolean
- Example
- true
members_can_fork_private_repositories
boolean or null
- Example
- false
web_commit_signoff_required
boolean
- Example
- false
updated_at
string
date-time
required
ldap_dn
string
Distinguished Name (DN) that team maps to within LDAP environment
- Example
- "uid=example,ou=users,dc=github,dc=com"
Link
string
Was this page helpful?