Skip to main content

Get a discussion (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 [Get a discussion](https://docs.github.com/[email protected]/rest/reference/teams#get-a-discussion) endpoint. Get a specific discussion on a team's page. 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}
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
team_id integer
required
discussion_number integer
required

Responses

application/json Team Discussion object

Response

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

Example: Please suggest improvements to our workflow in comments.

body_html string
required

Example: <p>Hi! This is an area for us to collaborate as a team</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

comments_count integer
required

Example: 0

comments_url string<uri>
required

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

created_at string<date-time>
required

Example: 2018-01-25T18:56:31Z

html_url string<uri>
required

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

last_edited_at string<date-time>
requirednullable
node_id string
required

Example: MDE0OlRlYW1EaXNjdXNzaW9uMQ==

number integer
required

The unique sequence number of a team discussion.

Example: 42

pinned boolean
required

Whether or not this discussion should be pinned for easy retrieval.

Example: true

private boolean
required

Whether or not this discussion should be restricted to team members and organization administrators.

Example: true

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
team_url string<uri>
required

Example: https://api.github.com/organizations/1/team/2343027

title string
required

The title of the discussion.

Example: How can we improve our workflow?

updated_at string<date-time>
required

Example: 2018-01-25T18:56:31Z

url string<uri>
required

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