GitHub v3 REST API

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

get
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

discussion_numberintegerrequired
comment_numberintegerrequired

Response

200 application/json

Response

Team Discussion Comment

A reply to a discussion within a team.

authorobject | nullrequired

Simple User

Show Child Parameters
bodystringrequired

The main text of the comment.

Example:I agree with this suggestion.

body_htmlstringrequired

Example:<p>Do you like apples?</p>

body_versionstringrequired

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_atstring(date-time)required

Example:2018-01-15T23:53:58Z

last_edited_atstring | null(date-time)required
discussion_urlstring(uri)required

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

html_urlstring(uri)required

Example:https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1

node_idstringrequired

Example:MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=

numberintegerrequired

The unique sequence number of a team discussion comment.

Example:42

updated_atstring(date-time)required

Example:2018-01-15T23:53:58Z

urlstring(uri)required

Example:https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1

reactionsobject
Show Child Parameters
get/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}
 
200 application/json

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

patch
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

discussion_numberintegerrequired
comment_numberintegerrequired

Body

application/json
bodystringrequired

The discussion comment’s body text.

Response

200 application/json

Response

Team Discussion Comment

A reply to a discussion within a team.

authorobject | nullrequired

Simple User

Show Child Parameters
bodystringrequired

The main text of the comment.

Example:I agree with this suggestion.

body_htmlstringrequired

Example:<p>Do you like apples?</p>

body_versionstringrequired

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_atstring(date-time)required

Example:2018-01-15T23:53:58Z

last_edited_atstring | null(date-time)required
discussion_urlstring(uri)required

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

html_urlstring(uri)required

Example:https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1

node_idstringrequired

Example:MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=

numberintegerrequired

The unique sequence number of a team discussion comment.

Example:42

updated_atstring(date-time)required

Example:2018-01-15T23:53:58Z

urlstring(uri)required

Example:https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1

reactionsobject
Show Child Parameters
patch/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}

Body

{ "body": "Do you like pineapples?" }
 
200 application/json

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

delete
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

discussion_numberintegerrequired
comment_numberintegerrequired

Response

204

Response

delete/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}
 
204

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.

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

Query Parameters

rolestring

Filters members returned by their role in the team. Can be one of:
* member - normal members of the team.
* maintainer - team maintainers.
* all - all members of the team.

Allowed values:membermaintainerall

Default:all

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

Response

200 application/json

Response

Simple User

namestring | null
emailstring | null
loginstringrequired

Example:octocat

idintegerrequired

Example:1

node_idstringrequired

Example:MDQ6VXNlcjE=

avatar_urlstring(uri)required

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

gravatar_idstring | nullrequired

Example:41d064eb2195891e12d0413f63227ea7

urlstring(uri)required

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

html_urlstring(uri)required

Example:https://github.com/octocat

followers_urlstring(uri)required

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

following_urlstringrequired

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

gists_urlstringrequired

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

starred_urlstringrequired

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

subscriptions_urlstring(uri)required

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

organizations_urlstring(uri)required

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

repos_urlstring(uri)required

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

events_urlstringrequired

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

received_events_urlstring(uri)required

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

typestringrequired

Example:User

site_adminbooleanrequired
starred_atstring

Example:"2020-07-09T00:17:55Z"

get/orgs/{org}/teams/{team_slug}/members
 
200 application/json

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.

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

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

usernamestringrequired

Response

application/json

Response

Team Membership

Team Membership

urlstring(uri)required
rolestringrequired

The role of the user in the team.

Allowed values:membermaintainer

Default:member

Example:member

statestringrequired

The state of the user’s membership in the team.

Allowed values:activepending

get/orgs/{org}/teams/{team_slug}/memberships/{username}
 
application/json