GitHub Teams API

Interact with GitHub Teams.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/ https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-teams-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Teams API
  description: 'Use the REST API to retrieve information about GitHub Apps and GitHub App

    installations.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Teams
  description: Interact with GitHub Teams.
paths:
  /orgs/{org}/external-group/{group_id}:
    get:
      summary: GitHub Get an External Group
      description: 'Displays information about the specific group''s usage.  Provides a list of the group''s external members as well as a list of teams that this group is connected to.


        You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub''s products](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.'
      tags:
      - Teams
      operationId: teams/external-idp-group-info-for-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/external-groups#get-an-external-group
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/group-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/external-group'
              examples:
                default:
                  $ref: '#/components/examples/external-group'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        category: teams
        subcategory: external-groups
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/external-groups:
    get:
      summary: GitHub List External Groups in an Organization
      description: 'Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned.  You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)."


        You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub''s products](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.'
      tags:
      - Teams
      operationId: teams/list-external-idp-groups-for-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/external-groups#list-external-groups-in-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/per-page'
      - name: page
        description: Page token
        in: query
        schema:
          type: integer
        example: 42
      - name: display_name
        description: Limits the list to groups containing the text in the group name
        in: query
        schema:
          type: string
        example: octocat
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/external-groups'
              examples:
                default:
                  $ref: '#/components/examples/external-groups'
          headers:
            Link:
              example: <https://api.github.com/resource?per_page=2&page=url-encoded-next-page-token>; rel="next"
              schema:
                type: string
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        category: teams
        subcategory: external-groups
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams:
    get:
      summary: GitHub List Teams
      description: Lists all teams in an organization that are visible to the authenticated user.
      tags:
      - Teams
      operationId: teams/list
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#list-teams
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/team'
              examples:
                default:
                  $ref: '#/components/examples/team-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '403':
          $ref: '#/components/responses/forbidden'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: teams
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create a Team
      description: 'To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/enterprise-server@3.9/articles/setting-team-creation-permissions-in-your-organization)."


        When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/enterprise-server@3.9/github/setting-up-and-managing-organizations-and-teams/about-teams)".'
      tags:
      - Teams
      operationId: teams/create
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#create-a-team
      parameters:
      - $ref: '#/components/parameters/org'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the team.
                description:
                  type: string
                  description: The description of the team.
                maintainers:
                  type: array
                  description: List GitHub IDs for organization members who will become team maintainers.
                  items:
                    type: string
                repo_names:
                  type: array
                  description: The full name (e.g., "organization-name/repository-name") of repositories to add the team to.
                  items:
                    type: string
                privacy:
                  type: string
                  description: "The level of privacy this team should have. The options are:  \n**For a non-nested team:**  \n * `secret` - only visible to organization owners and members of this team.  \n * `closed` - visible to all members of this organization.  \nDefault: `secret`  \n**For a parent or child team:**  \n * `closed` - visible to all members of this organization.  \nDefault for child team: `closed`"
                  enum:
                  - secret
                  - closed
                permission:
                  type: string
                  description: '**Deprecated**. The permission that new repositories will be added to the team with when none is specified.'
                  enum:
                  - pull
                  - push
                  default: pull
                parent_team_id:
                  type: integer
                  description: The ID of a team to set as the parent team.
                ldap_dn:
                  type: string
                  description: The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the "[Update LDAP mapping for a team](https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team)" endpoint to change the LDAP DN. For more information, see "[Using LDAP](https://docs.github.com/enterprise-server@3.9/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap#enabling-ldap-sync)."
              required:
              - name
            examples:
              default:
                value:
                  name: Justice League
                  description: A great team
                  permission: push
                  privacy: closed
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-full'
              examples:
                default:
                  $ref: '#/components/examples/team-full'
        '403':
          $ref: '#/components/responses/forbidden'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: teams
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}:
    get:
      summary: GitHub Get a Team by Name
      description: 'Gets a team using the team''s `slug`. To create the `slug`, GitHub Enterprise Server replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`.


        **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`.'
      tags:
      - Teams
      operationId: teams/get-by-name
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#get-a-team-by-name
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-full'
              examples:
                default:
                  $ref: '#/components/examples/team-full'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: teams
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update a Team
      description: 'To edit a team, the authenticated user must either be an organization owner or a team maintainer.


        **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`.'
      tags:
      - Teams
      operationId: teams/update-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#update-a-team
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the team.
                description:
                  type: string
                  description: The description of the team.
                privacy:
                  type: string
                  description: "The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are:  \n**For a non-nested team:**  \n * `secret` - only visible to organization owners and members of this team.  \n * `closed` - visible to all members of this organization.  \n**For a parent or child team:**  \n * `closed` - visible to all members of this organization."
                  enum:
                  - secret
                  - closed
                permission:
                  type: string
                  description: '**Deprecated**. The permission that new repositories will be added to the team with when none is specified.'
                  enum:
                  - pull
                  - push
                  - admin
                  default: pull
                parent_team_id:
                  type: integer
                  description: The ID of a team to set as the parent team.
                  nullable: true
            examples:
              default:
                value:
                  name: new team name
                  description: new team description
                  privacy: closed
      responses:
        '200':
          description: Response when the updated information already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-full'
              examples:
                default:
                  $ref: '#/components/examples/team-full'
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-full'
              examples:
                default:
                  $ref: '#/components/examples/team-full'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: teams
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete a Team
      description: 'To delete a team, the authenticated user must be an organization owner or team maintainer.


        If you are an organization owner, deleting a parent team will delete all of its child teams as well.


        **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`.'
      tags:
      - Teams
      operationId: teams/delete-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#delete-a-team
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: teams
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions:
    get:
      summary: GitHub List Discussions
      description: '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.'
      tags:
      - Teams
      operationId: teams/list-discussions-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#list-discussions
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - name: pinned
        in: query
        required: false
        description: Pinned discussions only filter
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/team-discussion'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create a Discussion
      description: 'Creates a new discussion post on a team''s page.


        This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.9/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-server@3.9/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-server@3.9/rest/guides/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.'
      tags:
      - Teams
      operationId: teams/create-discussion-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#create-a-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: The discussion post's title.
                body:
                  type: string
                  description: The discussion post's body text.
                private:
                  type: boolean
                  description: Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post.
                  default: false
              required:
              - title
              - body
            examples:
              default:
                value:
                  title: Our first team post
                  body: Hi! This is an area for us to collaborate as a team.
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion'
      x-github:
        triggersNotification: true
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}:
    get:
      summary: GitHub Get a Discussion
      description: '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.'
      tags:
      - Teams
      operationId: teams/get-discussion-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#get-a-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update a Discussion
      description: '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.'
      tags:
      - Teams
      operationId: teams/update-discussion-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#update-a-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: The discussion post's title.
                body:
                  type: string
                  description: The discussion post's body text.
            examples:
              default:
                value:
                  title: Welcome to our first team post
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-2'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete a Discussion
      description: '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.'
      tags:
      - Teams
      operationId: teams/delete-discussion-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#delete-a-discussion
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussions
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments:
    get:
      summary: GitHub List Discussion Comments
      description: 'List all comments on a team discussion.


        **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`.


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Teams
      operationId: teams/list-discussion-comments-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#list-discussion-comments
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/direction'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/team-discussion-comment'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-comment-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussion-comments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create a Discussion Comment
      description: 'Creates a new comment on a team discussion.


        This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.9/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-server@3.9/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-server@3.9/rest/guides/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/{discussion_number}/comments`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Teams
      operationId: teams/create-discussion-comment-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#create-a-discussion-comment
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                body:
                  type: string
                  description: The discussion comment's body text.
              required:
              - body
            examples:
              default:
                value:
                  body: Do you like apples?
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion-comment'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-comment'
      x-github:
        triggersNotification: true
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussion-comments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}:
    get:
      summary: GitHub Get a Discussion Comment
      description: 'Get a specific comment on a team discussion.


        **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/{comment_number}`.


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Teams
      operationId: teams/get-discussion-comment-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#get-a-discussion-comment
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/comment-number'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion-comment'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-comment'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: teams
        subcategory: discussion-comments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update a Discussion Comment
      description: 'Edits the body text of a discussion comment.


        **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}/comments/{comment_number}`.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Teams
      operationId: teams/update-discussion-comment-in-org
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#update-a-discussion-comment
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/team-slug'
      - $ref: '#/components/parameters/discussion-number'
      - $ref: '#/components/parameters/comment-number'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                body:
                  type: string
                  description: The discussion comment's body text.
              required:
              - body
            examples:
              default:
                value:
                  body: Do you like pineapples?
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-discussion-comment'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-comment-2'
      x-github:
        githubCloudOnly: false
   

# --- truncated at 32 KB (889 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-teams-api-openapi.yml