# Get a discussion (Legacy)

From **GitHub v3 REST API**.

`GET /teams/{team_id}/discussions/{discussion_number}`

**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/enterprise-server@3.0/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/enterprise-server@3.0/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).

## Parameters

### `team_id`

- Location: path
- Required: true
- Type: `integer`

### `discussion_number`

- Location: path
- Required: true
- Type: `integer`

## Responses

### `200`

Response

### `application/json`

- Type: `object`

A team discussion is a persistent record of a free-form conversation within a team.

```json
{
  "author": {
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "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}",
    "gravatar_id": "",
    "html_url": "https://github.com/octocat",
    "id": 1,
    "login": "octocat",
    "node_id": "MDQ6VXNlcjE=",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "site_admin": false,
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "type": "User",
    "url": "https://api.github.com/users/octocat"
  },
  "body": "Hi! This is an area for us to collaborate as a team.",
  "body_html": "\u003cp\u003eHi! This is an area for us to collaborate as a team\u003c/p\u003e",
  "body_version": "0d495416a700fb06133c612575d92bfb",
  "comments_count": 0,
  "comments_url": "https://api.github.com/teams/2343027/discussions/1/comments",
  "created_at": "2018-01-25T18:56:31Z",
  "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
  "last_edited_at": null,
  "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
  "number": 1,
  "pinned": false,
  "private": false,
  "reactions": {
    "+1": 3,
    "-1": 1,
    "confused": 0,
    "eyes": 1,
    "heart": 1,
    "hooray": 0,
    "laugh": 0,
    "rocket": 1,
    "total_count": 5,
    "url": "https://api.github.com/teams/2343027/discussions/1/reactions"
  },
  "team_url": "https://api.github.com/teams/2343027",
  "title": "Our first team post",
  "updated_at": "2018-01-25T18:56:31Z",
  "url": "https://api.github.com/teams/2343027/discussions/1"
}
```

```json
{"description":"A team discussion is a persistent record of a free-form conversation within a team.","properties":{"author":{"$ref":"#/components/schemas/nullable-simple-user"},"body":{"description":"The main text of the discussion.","example":"Please suggest improvements to our workflow in comments.","type":"string"},"body_html":{"example":"\u003cp\u003eHi! This is an area for us to collaborate as a team\u003c/p\u003e","type":"string"},"body_version":{"description":"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","type":"string"},"comments_count":{"example":0,"type":"integer"},"comments_url":{"example":"https://api.github.com/organizations/1/team/2343027/discussions/1/comments","format":"uri","type":"string"},"created_at":{"example":"2018-01-25T18:56:31Z","format":"date-time","type":"string"},"html_url":{"example":"https://github.com/orgs/github/teams/justice-league/discussions/1","format":"uri","type":"string"},"last_edited_at":{"format":"date-time","nullable":true,"type":"string"},"node_id":{"example":"MDE0OlRlYW1EaXNjdXNzaW9uMQ==","type":"string"},"number":{"description":"The unique sequence number of a team discussion.","example":42,"type":"integer"},"pinned":{"description":"Whether or not this discussion should be pinned for easy retrieval.","example":true,"type":"boolean"},"private":{"description":"Whether or not this discussion should be restricted to team members and organization administrators.","example":true,"type":"boolean"},"reactions":{"$ref":"#/components/schemas/reaction-rollup"},"team_url":{"example":"https://api.github.com/organizations/1/team/2343027","format":"uri","type":"string"},"title":{"description":"The title of the discussion.","example":"How can we improve our workflow?","type":"string"},"updated_at":{"example":"2018-01-25T18:56:31Z","format":"date-time","type":"string"},"url":{"example":"https://api.github.com/organizations/1/team/2343027/discussions/1","format":"uri","type":"string"}},"required":["author","body","body_html","body_version","comments_count","comments_url","created_at","last_edited_at","html_url","pinned","private","node_id","number","team_url","title","updated_at","url"],"title":"Team Discussion","type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/teams/{team_id}/discussions/{discussion_number}
```
