Skip to main content

List discussion comments (Legacy)

Deprecated

**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/[email protected]/rest/reference/teams#list-discussion-comments) endpoint. List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/[email protected]/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).

GET/teams/{team_id}/discussions/{discussion_number}/comments
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
team_id integer
required
discussion_number integer
required
Query Parameters
direction string
optional

One of `asc` (ascending) or `desc` (descending).

per_page integer
optional

Results per page (max 100)

page integer
optional

Page number of the results to fetch.

Responses

application/json array[Team Discussion Comment object]

Response

Headers
Link string
Example:
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"
items Team Discussion Comment object

A reply to a discussion within a team.

author Simple User object
requirednullable

Simple User

avatar_url string<uri>
required

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

email string
optionalnullable
events_url string
required

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

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}

gravatar_id string
requirednullable

Example: 41d064eb2195891e12d0413f63227ea7

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

login string
required

Example: octocat

name string
optionalnullable
node_id string
required

Example: MDQ6VXNlcjE=

organizations_url string<uri>
required

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

received_events_url string<uri>
required

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

repos_url string<uri>
required

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

site_admin boolean
required
starred_at string
optional

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

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

type string
required

Example: User

url string<uri>
required

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

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

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

last_edited_at string<date-time>
requirednullable
node_id string
required

Example: MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=

number integer
required

The unique sequence number of a team discussion comment.

Example: 42

reactions Reaction Rollup object
optional
+1 integer
required
-1 integer
required
confused integer
required
eyes integer
required
heart integer
required
hooray integer
required
laugh integer
required
rocket integer
required
total_count integer
required
url string<uri>
required
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