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