Get a team (Legacy)
DEPRECATEDDeprecation 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.
Path Parameters
Response
application/json
Response
Response
Full Team
Groups of organization members that gives permissions on specified repositories.
Unique identifier of the team
Example:42
Example:MDQ6VGVhbTE=
URL for the team
Example:https://api.github.com/organizations/1/team/1
Example:https://github.com/orgs/rails/teams/core
Name of the team
Example:Developers
Example:justice-league
Example:A great team.
The level of privacy this team should have
Allowed values:closedsecret
Example:closed
Permission that the team will have for its repositories
Example:push
Example:https://api.github.com/organizations/1/team/1/members{/member}
Example:https://api.github.com/organizations/1/team/1/repos
Groups of organization members that gives permissions on specified repositories.
Show Child Parameters
Example:3
Example:10
Example:2017-07-14T16:53:42Z
Example:2017-08-17T12:37:15Z
Organization Full
Show Child Parameters
Distinguished Name (DN) that team maps to within LDAP environment
Example:uid=example,ou=users,dc=github,dc=com
Path Parameters
Update a team (Legacy)
DEPRECATEDDeprecation 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
.
Path Parameters
Body
application/json
Body
The name of the team.
The description of the team.
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.
Allowed values:secretclosed
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
* pull
- team members can pull, but not push to or administer newly-added repositories.
* push
- team members can pull and push, but not administer newly-added repositories.
* admin
- team members can pull, push and administer newly-added repositories.
Allowed values:pullpushadmin
Default:pull
The ID of a team to set as the parent team.
Response
application/json
Response
Response
Full Team
Groups of organization members that gives permissions on specified repositories.
Unique identifier of the team
Example:42
Example:MDQ6VGVhbTE=
URL for the team
Example:https://api.github.com/organizations/1/team/1
Example:https://github.com/orgs/rails/teams/core
Name of the team
Example:Developers
Example:justice-league
Example:A great team.
The level of privacy this team should have
Allowed values:closedsecret
Example:closed
Permission that the team will have for its repositories
Example:push
Example:https://api.github.com/organizations/1/team/1/members{/member}
Example:https://api.github.com/organizations/1/team/1/repos
Groups of organization members that gives permissions on specified repositories.
Show Child Parameters
Example:3
Example:10
Example:2017-07-14T16:53:42Z
Example:2017-08-17T12:37:15Z
Organization Full
Show Child Parameters
Distinguished Name (DN) that team maps to within LDAP environment
Example:uid=example,ou=users,dc=github,dc=com
Path Parameters
Body
Delete a team (Legacy)
DEPRECATEDDeprecation 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.
Path Parameters
Response
Response
Response
Path Parameters
List discussions (Legacy)
DEPRECATEDDeprecation 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.
Query Parameters
One of asc
(ascending) or desc
(descending).
Allowed values:ascdesc
Default:desc
Results per page (max 100)
Default:30
Page number of the results to fetch.
Default:1
Path Parameters
Response
200 application/json
Response
Response
A team discussion is a persistent record of a free-form conversation within a team.
Simple User
Show Child Parameters
The main text of the discussion.
Example:Please suggest improvements to our workflow in comments.
Example:<p>Hi! This is an area for us to collaborate as a team</p>
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
Example:0
Example:https://api.github.com/organizations/1/team/2343027/discussions/1/comments
Example:2018-01-25T18:56:31Z
Example:https://github.com/orgs/github/teams/justice-league/discussions/1
Example:MDE0OlRlYW1EaXNjdXNzaW9uMQ==
The unique sequence number of a team discussion.
Example:42
Whether or not this discussion should be pinned for easy retrieval.
Example:true
Whether or not this discussion should be restricted to team members and organization administrators.
Example:true
Example:https://api.github.com/organizations/1/team/2343027
The title of the discussion.
Example:How can we improve our workflow?
Example:2018-01-25T18:56:31Z
Example:https://api.github.com/organizations/1/team/2343027/discussions/1
Show Child Parameters
Path Parameters
Query Parameters
Create a discussion (Legacy)
DEPRECATEDDeprecation 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.
Path Parameters
Body
application/json
Body
The discussion post’s title.
The discussion post’s body text.
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
Response
201 application/json
Response
Response
Team Discussion
A team discussion is a persistent record of a free-form conversation within a team.
Simple User
Show Child Parameters
The main text of the discussion.
Example:Please suggest improvements to our workflow in comments.
Example:<p>Hi! This is an area for us to collaborate as a team</p>
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
Example:0
Example:https://api.github.com/organizations/1/team/2343027/discussions/1/comments
Example:2018-01-25T18:56:31Z
Example:https://github.com/orgs/github/teams/justice-league/discussions/1
Example:MDE0OlRlYW1EaXNjdXNzaW9uMQ==
The unique sequence number of a team discussion.
Example:42
Whether or not this discussion should be pinned for easy retrieval.
Example:true
Whether or not this discussion should be restricted to team members and organization administrators.
Example:true
Example:https://api.github.com/organizations/1/team/2343027
The title of the discussion.
Example:How can we improve our workflow?
Example:2018-01-25T18:56:31Z
Example:https://api.github.com/organizations/1/team/2343027/discussions/1