Puntos de conexión de la API de REST para debates en equipo
La API de REST permite obtener, crear, editar y borrar las entradas de debate de la página de un equipo.
Nota:
Los debates de equipo y los puntos de conexión de los comentarios de debates de equipo están cerrar en GitHub Enterprise Server 3.13 en favor de GitHub Discussions. Para más información sobreGitHub Discussions, consulta documentación GitHub Discussions.
List discussions
List all discussions on a team's page.
Note
You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions.
OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.
Tokens de acceso específicos para "List discussions"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (read)
Parámetros para "List discussions"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| orgstring RequeridoThe organization name. The name is not case sensitive. | 
| team_slugstring RequeridoThe slug of the team name. | 
| Nombre, Tipo, Descripción | 
|---|
| directionstringThe direction to sort the results by. Valor predeterminado:  Puede ser uno de los siguientes:  | 
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pinnedstringPinned discussions only filter | 
Códigos de estado de respuesta HTTP para "List discussions"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List discussions"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussionsResponse
Status: 200[
  {
    "author": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://HOSTNAME/users/octocat/followers",
      "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
      "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
      "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
      "organizations_url": "https://HOSTNAME/users/octocat/orgs",
      "repos_url": "https://HOSTNAME/users/octocat/repos",
      "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
      "received_events_url": "https://HOSTNAME/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "body": "Hi! This is an area for us to collaborate as a team.",
    "body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
    "body_version": "0d495416a700fb06133c612575d92bfb",
    "comments_count": 0,
    "comments_url": "https://HOSTNAME/teams/2343027/discussions/1/comments",
    "created_at": "2018-01-25T18:56:31Z",
    "last_edited_at": null,
    "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
    "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
    "number": 1,
    "pinned": false,
    "private": false,
    "team_url": "https://HOSTNAME/teams/2343027",
    "title": "Our first team post",
    "updated_at": "2018-01-25T18:56:31Z",
    "url": "https://HOSTNAME/teams/2343027/discussions/1",
    "reactions": {
      "url": "https://HOSTNAME/teams/2343027/discussions/1/reactions",
      "total_count": 5,
      "+1": 3,
      "-1": 1,
      "laugh": 0,
      "confused": 0,
      "heart": 1,
      "hooray": 0,
      "eyes": 1,
      "rocket": 1
    }
  }
]Create a discussion
Creates a new discussion post on a team's page.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."
Note
You can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.
OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.
Tokens de acceso específicos para "Create a discussion"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (write)
Parámetros para "Create a discussion"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| orgstring RequeridoThe organization name. The name is not case sensitive. | 
| team_slugstring RequeridoThe slug of the team name. | 
| Nombre, Tipo, Descripción | 
|---|
| titlestring RequeridoThe discussion post's title. | 
| bodystring RequeridoThe discussion post's body text. | 
| privatebooleanPrivate posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to  Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "Create a discussion"
| status code | Descripción | 
|---|---|
| 201 | Created | 
Ejemplos de código para "Create a discussion"
Ejemplo de solicitud
curl -L \
  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions \
  -d '{"title":"Our first team post","body":"Hi! This is an area for us to collaborate as a team."}'Response
Status: 201{
  "author": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Hi! This is an area for us to collaborate as a team.",
  "body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
  "body_version": "0d495416a700fb06133c612575d92bfb",
  "comments_count": 0,
  "comments_url": "https://HOSTNAME/teams/2343027/discussions/1/comments",
  "created_at": "2018-01-25T18:56:31Z",
  "last_edited_at": null,
  "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
  "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
  "number": 1,
  "pinned": false,
  "private": false,
  "team_url": "https://HOSTNAME/teams/2343027",
  "title": "Our first team post",
  "updated_at": "2018-01-25T18:56:31Z",
  "url": "https://HOSTNAME/teams/2343027/discussions/1",
  "reactions": {
    "url": "https://HOSTNAME/teams/2343027/discussions/1/reactions",
    "total_count": 5,
    "+1": 3,
    "-1": 1,
    "laugh": 0,
    "confused": 0,
    "heart": 1,
    "hooray": 0,
    "eyes": 1,
    "rocket": 1
  }
}Get a discussion
Get a specific discussion on a team's page.
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}.
OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.
Tokens de acceso específicos para "Get a discussion"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (read)
Parámetros para "Get a discussion"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| orgstring RequeridoThe organization name. The name is not case sensitive. | 
| team_slugstring RequeridoThe slug of the team name. | 
| discussion_numberinteger RequeridoThe number that identifies the discussion. | 
Códigos de estado de respuesta HTTP para "Get a discussion"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "Get a discussion"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBERResponse
Status: 200{
  "author": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Hi! This is an area for us to collaborate as a team.",
  "body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
  "body_version": "0d495416a700fb06133c612575d92bfb",
  "comments_count": 0,
  "comments_url": "https://HOSTNAME/teams/2343027/discussions/1/comments",
  "created_at": "2018-01-25T18:56:31Z",
  "last_edited_at": null,
  "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
  "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
  "number": 1,
  "pinned": false,
  "private": false,
  "team_url": "https://HOSTNAME/teams/2343027",
  "title": "Our first team post",
  "updated_at": "2018-01-25T18:56:31Z",
  "url": "https://HOSTNAME/teams/2343027/discussions/1",
  "reactions": {
    "url": "https://HOSTNAME/teams/2343027/discussions/1/reactions",
    "total_count": 5,
    "+1": 3,
    "-1": 1,
    "laugh": 0,
    "confused": 0,
    "heart": 1,
    "hooray": 0,
    "eyes": 1,
    "rocket": 1
  }
}Update a discussion
Edits the title and body text of a discussion post. Only the parameters you provide are updated.
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}.
OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.
Tokens de acceso específicos para "Update a discussion"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (write)
Parámetros para "Update a discussion"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| orgstring RequeridoThe organization name. The name is not case sensitive. | 
| team_slugstring RequeridoThe slug of the team name. | 
| discussion_numberinteger RequeridoThe number that identifies the discussion. | 
| Nombre, Tipo, Descripción | 
|---|
| titlestringThe discussion post's title. | 
| bodystringThe discussion post's body text. | 
Códigos de estado de respuesta HTTP para "Update a discussion"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "Update a discussion"
Ejemplo de solicitud
curl -L \
  -X PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBER \
  -d '{"title":"Welcome to our first team post"}'Response
Status: 200{
  "author": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Hi! This is an area for us to collaborate as a team.",
  "body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
  "body_version": "0d495416a700fb06133c612575d92bfb",
  "comments_count": 1,
  "comments_url": "https://HOSTNAME/teams/2343027/discussions/1/comments",
  "created_at": "2018-01-25T18:56:31Z",
  "last_edited_at": "2018-01-26T18:22:20Z",
  "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
  "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
  "number": 1,
  "pinned": false,
  "private": false,
  "team_url": "https://HOSTNAME/teams/2343027",
  "title": "Welcome to our first team post",
  "updated_at": "2018-01-26T18:22:20Z",
  "url": "https://HOSTNAME/teams/2343027/discussions/1",
  "reactions": {
    "url": "https://HOSTNAME/teams/2343027/discussions/1/reactions",
    "total_count": 5,
    "+1": 3,
    "-1": 1,
    "laugh": 0,
    "confused": 0,
    "heart": 1,
    "hooray": 0,
    "eyes": 1,
    "rocket": 1
  }
}Delete a discussion
Delete a discussion from a team's page.
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}.
OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.
Tokens de acceso específicos para "Delete a discussion"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (write)
Parámetros para "Delete a discussion"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| orgstring RequeridoThe organization name. The name is not case sensitive. | 
| team_slugstring RequeridoThe slug of the team name. | 
| discussion_numberinteger RequeridoThe number that identifies the discussion. | 
Códigos de estado de respuesta HTTP para "Delete a discussion"
| status code | Descripción | 
|---|---|
| 204 | No Content | 
Ejemplos de código para "Delete a discussion"
Ejemplo de solicitud
curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/orgs/ORG/teams/TEAM_SLUG/discussions/DISCUSSION_NUMBERResponse
Status: 204List discussions (Legacy)
Warning
Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.
List all discussions on a team's page.
OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.
Tokens de acceso específicos para "List discussions (Legacy)"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (read)
Parámetros para "List discussions (Legacy)"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| team_idinteger RequeridoThe unique identifier of the team. | 
| Nombre, Tipo, Descripción | 
|---|
| directionstringThe direction to sort the results by. Valor predeterminado:  Puede ser uno de los siguientes:  | 
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "List discussions (Legacy)"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "List discussions (Legacy)"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussionsResponse
Status: 200[
  {
    "author": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://HOSTNAME/users/octocat/followers",
      "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
      "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
      "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
      "organizations_url": "https://HOSTNAME/users/octocat/orgs",
      "repos_url": "https://HOSTNAME/users/octocat/repos",
      "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
      "received_events_url": "https://HOSTNAME/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "body": "Hi! This is an area for us to collaborate as a team.",
    "body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
    "body_version": "0d495416a700fb06133c612575d92bfb",
    "comments_count": 0,
    "comments_url": "https://HOSTNAME/teams/2343027/discussions/1/comments",
    "created_at": "2018-01-25T18:56:31Z",
    "last_edited_at": null,
    "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
    "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
    "number": 1,
    "pinned": false,
    "private": false,
    "team_url": "https://HOSTNAME/teams/2343027",
    "title": "Our first team post",
    "updated_at": "2018-01-25T18:56:31Z",
    "url": "https://HOSTNAME/teams/2343027/discussions/1",
    "reactions": {
      "url": "https://HOSTNAME/teams/2343027/discussions/1/reactions",
      "total_count": 5,
      "+1": 3,
      "-1": 1,
      "laugh": 0,
      "confused": 0,
      "heart": 1,
      "hooray": 0,
      "eyes": 1,
      "rocket": 1
    }
  }
]Create a discussion (Legacy)
Warning
Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.
Creates a new discussion post on a team's page.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."
OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.
Tokens de acceso específicos para "Create a discussion (Legacy)"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (write)
Parámetros para "Create a discussion (Legacy)"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| team_idinteger RequeridoThe unique identifier of the team. | 
| Nombre, Tipo, Descripción | 
|---|
| titlestring RequeridoThe discussion post's title. | 
| bodystring RequeridoThe discussion post's body text. | 
| privatebooleanPrivate posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to  Valor predeterminado:  | 
Códigos de estado de respuesta HTTP para "Create a discussion (Legacy)"
| status code | Descripción | 
|---|---|
| 201 | Created | 
Ejemplos de código para "Create a discussion (Legacy)"
Ejemplo de solicitud
curl -L \
  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussions \
  -d '{"title":"Our first team post","body":"Hi! This is an area for us to collaborate as a team."}'Response
Status: 201{
  "author": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Hi! This is an area for us to collaborate as a team.",
  "body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
  "body_version": "0d495416a700fb06133c612575d92bfb",
  "comments_count": 0,
  "comments_url": "https://HOSTNAME/teams/2343027/discussions/1/comments",
  "created_at": "2018-01-25T18:56:31Z",
  "last_edited_at": null,
  "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
  "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
  "number": 1,
  "pinned": false,
  "private": false,
  "team_url": "https://HOSTNAME/teams/2343027",
  "title": "Our first team post",
  "updated_at": "2018-01-25T18:56:31Z",
  "url": "https://HOSTNAME/teams/2343027/discussions/1",
  "reactions": {
    "url": "https://HOSTNAME/teams/2343027/discussions/1/reactions",
    "total_count": 5,
    "+1": 3,
    "-1": 1,
    "laugh": 0,
    "confused": 0,
    "heart": 1,
    "hooray": 0,
    "eyes": 1,
    "rocket": 1
  }
}Get a discussion (Legacy)
Warning
Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.
Get a specific discussion on a team's page.
OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.
Tokens de acceso específicos para "Get a discussion (Legacy)"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (read)
Parámetros para "Get a discussion (Legacy)"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| team_idinteger RequeridoThe unique identifier of the team. | 
| discussion_numberinteger RequeridoThe number that identifies the discussion. | 
Códigos de estado de respuesta HTTP para "Get a discussion (Legacy)"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "Get a discussion (Legacy)"
Ejemplo de solicitud
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussions/DISCUSSION_NUMBERResponse
Status: 200{
  "author": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Hi! This is an area for us to collaborate as a team.",
  "body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
  "body_version": "0d495416a700fb06133c612575d92bfb",
  "comments_count": 0,
  "comments_url": "https://HOSTNAME/teams/2343027/discussions/1/comments",
  "created_at": "2018-01-25T18:56:31Z",
  "last_edited_at": null,
  "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
  "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
  "number": 1,
  "pinned": false,
  "private": false,
  "team_url": "https://HOSTNAME/teams/2343027",
  "title": "Our first team post",
  "updated_at": "2018-01-25T18:56:31Z",
  "url": "https://HOSTNAME/teams/2343027/discussions/1",
  "reactions": {
    "url": "https://HOSTNAME/teams/2343027/discussions/1/reactions",
    "total_count": 5,
    "+1": 3,
    "-1": 1,
    "laugh": 0,
    "confused": 0,
    "heart": 1,
    "hooray": 0,
    "eyes": 1,
    "rocket": 1
  }
}Update a discussion (Legacy)
Warning
Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.
Edits the title and body text of a discussion post. Only the parameters you provide are updated.
OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.
Tokens de acceso específicos para "Update a discussion (Legacy)"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (write)
Parámetros para "Update a discussion (Legacy)"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| team_idinteger RequeridoThe unique identifier of the team. | 
| discussion_numberinteger RequeridoThe number that identifies the discussion. | 
| Nombre, Tipo, Descripción | 
|---|
| titlestringThe discussion post's title. | 
| bodystringThe discussion post's body text. | 
Códigos de estado de respuesta HTTP para "Update a discussion (Legacy)"
| status code | Descripción | 
|---|---|
| 200 | OK | 
Ejemplos de código para "Update a discussion (Legacy)"
Ejemplo de solicitud
curl -L \
  -X PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussions/DISCUSSION_NUMBER \
  -d '{"title":"Welcome to our first team post"}'Response
Status: 200{
  "author": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "body": "Hi! This is an area for us to collaborate as a team.",
  "body_html": "<p>Hi! This is an area for us to collaborate as a team</p>",
  "body_version": "0d495416a700fb06133c612575d92bfb",
  "comments_count": 1,
  "comments_url": "https://HOSTNAME/teams/2343027/discussions/1/comments",
  "created_at": "2018-01-25T18:56:31Z",
  "last_edited_at": "2018-01-26T18:22:20Z",
  "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1",
  "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==",
  "number": 1,
  "pinned": false,
  "private": false,
  "team_url": "https://HOSTNAME/teams/2343027",
  "title": "Welcome to our first team post",
  "updated_at": "2018-01-26T18:22:20Z",
  "url": "https://HOSTNAME/teams/2343027/discussions/1",
  "reactions": {
    "url": "https://HOSTNAME/teams/2343027/discussions/1/reactions",
    "total_count": 5,
    "+1": 3,
    "-1": 1,
    "laugh": 0,
    "confused": 0,
    "heart": 1,
    "hooray": 0,
    "eyes": 1,
    "rocket": 1
  }
}Delete a discussion (Legacy)
Warning
Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.
Delete a discussion from a team's page.
OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.
Tokens de acceso específicos para "Delete a discussion (Legacy)"
Este punto de conexión funciona con los siguientes tipos de token pormenorizados:
- Tokens de acceso de usuario de la aplicación de GitHub
- Token de acceso a la instalación de la aplicación de GitHub
- Tokens de acceso personal específico
El token pormenorizado debe tener el siguiente conjunto de permisos:
- "Team discussions" organization permissions (write)
Parámetros para "Delete a discussion (Legacy)"
| Nombre, Tipo, Descripción | 
|---|
| acceptstringSetting to  | 
| Nombre, Tipo, Descripción | 
|---|
| team_idinteger RequeridoThe unique identifier of the team. | 
| discussion_numberinteger RequeridoThe number that identifies the discussion. | 
Códigos de estado de respuesta HTTP para "Delete a discussion (Legacy)"
| status code | Descripción | 
|---|---|
| 204 | No Content | 
Ejemplos de código para "Delete a discussion (Legacy)"
Ejemplo de solicitud
curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/teams/TEAM_ID/discussions/DISCUSSION_NUMBERResponse
Status: 204