v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2024-01-0382859610.0 MB
teams

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.

get/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments

Path parameters

orgstring required

The organization name. The name is not case sensitive.

team_slugstring required

The slug of the team name.

discussion_numberinteger required

The number that identifies the discussion.

Query parameters

direction'asc' | 'desc'

The direction to sort the results by.

per_pageinteger

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

pageinteger

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

Response

Response

bodystring required

The main text of the comment.

body_htmlstring required
body_versionstring 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.

created_atstring date-time required
last_edited_atstring date-time nullable required
discussion_urlstring uri required
html_urlstring uri required
node_idstring required
numberinteger required

The unique sequence number of a team discussion comment.

updated_atstring date-time required
urlstring uri required

Example response

[
  {
    "author": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
      "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",
      "starred_at": "\"2020-07-09T00:17:55Z\""
    },
    "body": "I agree with this suggestion.",
    "body_html": "<p>Do you like apples?</p>",
    "body_version": "0307116bbf7ced493b8d8a346c650b71",
    "created_at": "2018-01-15T23:53:58Z",
    "discussion_url": "https://api.github.com/organizations/1/team/2403582/discussions/1",
    "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1",
    "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=",
    "number": 42,
    "updated_at": "2018-01-15T23:53:58Z",
    "url": "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1"
  }
]