GitHub Legacy API

The Legacy API from GitHub — 15 operation(s) for legacy.

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-legacy-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Legacy 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: Legacy
paths:
  /teams/{team_id}/projects:
    get:
      summary: GitHub List Team Projects (legacy)
      description: '**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 [`List team projects`](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#list-team-projects) endpoint.


        Lists the organization projects for a team.'
      tags:
      - Legacy
      operationId: listTeamProjectsLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#list-team-projects-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/team-project'
              examples:
                default:
                  $ref: '#/components/examples/team-project-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: teams
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /teams/{team_id}/projects/{project_id}:
    get:
      summary: GitHub Check Team Permissions for Project (legacy)
      description: '**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 [Check team permissions for a project](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#check-team-permissions-for-a-project) endpoint.


        Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.'
      tags:
      - Legacy
      operationId: checkTeamPermissionsForProjectLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#check-team-permissions-for-a-project-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $ref: '#/components/parameters/project-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team-project'
              examples:
                default:
                  $ref: '#/components/examples/team-project'
        '404':
          description: Not Found if project is not managed by this team
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: teams
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      summary: GitHub Add or Update Team Project Permissions (legacy)
      description: '**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 [Add or update team project permissions](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#add-or-update-team-project-permissions) endpoint.


        Adds an organization project to a team. To add a project to a team or update the team''s permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.'
      tags:
      - Legacy
      operationId: addOrUpdateTeamProjectPermissionsLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#add-or-update-team-project-permissions-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $ref: '#/components/parameters/project-id'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                permission:
                  type: string
                  description: 'The permission to grant to the team for this project. Default: the team''s `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you''ll need to set `Content-Length` to zero when calling this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-server@3.9/rest/guides/getting-started-with-the-rest-api#http-method)."'
                  enum:
                  - read
                  - write
                  - admin
            examples:
              default:
                summary: Example of setting permission to read
                value:
                  permission: read
      responses:
        '204':
          description: Response
        '403':
          description: Forbidden if the project is not owned by the organization
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  documentation_url:
                    type: string
              examples:
                response-if-the-project-is-not-owned-by-the-organization:
                  value:
                    message: Must have admin rights to Repository.
                    documentation_url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#add-or-update-team-project-permissions
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: teams
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Remove Project from Team (legacy)
      description: '**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 [Remove a project from a team](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#remove-a-project-from-a-team) endpoint.


        Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it.'
      tags:
      - Legacy
      operationId: removeProjectFromTeamLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#remove-a-project-from-a-team-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $ref: '#/components/parameters/project-id'
      responses:
        '204':
          description: Response
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: teams
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /teams/{team_id}:
    get:
      summary: GitHub Get Team (legacy)
      description: '**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#get-a-team-by-name) endpoint.'
      tags:
      - Legacy
      operationId: getTeamLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#get-a-team-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      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
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: teams
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Team (legacy)
      description: '**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 [Update a team](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#update-a-team) endpoint.


        To edit a team, the authenticated user must either be an organization owner or a team maintainer.


        **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`.'
      tags:
      - Legacy
      operationId: updateTeamLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#update-a-team-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      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.
                privacy:
                  type: string
                  description: "The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. 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
              required:
              - name
            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
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: teams
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Team (legacy)
      description: '**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 [Delete a team](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#delete-a-team) endpoint.


        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.'
      tags:
      - Legacy
      operationId: deleteTeamLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/teams#delete-a-team-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      responses:
        '204':
          description: Response
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: teams
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /teams/{team_id}/discussions:
    get:
      summary: GitHub List Discussions (legacy)
      description: '**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 [`List discussions`](https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#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.'
      tags:
      - Legacy
      operationId: listDiscussionsLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#list-discussions-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $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'
              examples:
                default:
                  $ref: '#/components/examples/team-discussion-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: discussions
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Discussion (legacy)
      description: '**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 [`Create a discussion`](https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#create-a-discussion) endpoint.


        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)."


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Legacy
      operationId: createDiscussionLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#create-a-discussion-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      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
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: discussions
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /teams/{team_id}/discussions/{discussion_number}:
    get:
      summary: GitHub Get Discussion (legacy)
      description: '**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.9/rest/teams/discussions#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.'
      tags:
      - Legacy
      operationId: getDiscussionLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#get-a-discussion-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $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
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: discussions
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Discussion (legacy)
      description: '**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 [Update a discussion](https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#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.'
      tags:
      - Legacy
      operationId: updateDiscussionLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#update-a-discussion-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $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
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: discussions
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Discussion (legacy)
      description: '**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 [`Delete a discussion`](https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#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.'
      tags:
      - Legacy
      operationId: deleteDiscussionLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussions#delete-a-discussion-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $ref: '#/components/parameters/discussion-number'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: discussions
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /teams/{team_id}/discussions/{discussion_number}/comments:
    get:
      summary: GitHub List Discussion Comments (legacy)
      description: '**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 [List discussion comments](https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#list-discussion-comments) endpoint.


        List all comments on a team discussion.


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Legacy
      operationId: listDiscussionCommentsLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#list-discussion-comments-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $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
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: discussion-comments
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Discussion Comment (legacy)
      description: '**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 [Create a discussion comment](https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#create-a-discussion-comment) endpoint.


        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)."


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Legacy
      operationId: createDiscussionCommentLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#create-a-discussion-comment-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $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
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: discussion-comments
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}:
    get:
      summary: GitHub Get Discussion Comment (legacy)
      description: '**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 comment](https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#get-a-discussion-comment) endpoint.


        Get a specific comment on a team discussion.


        OAuth app tokens and personal access tokens (classic) need the `read:discussion` scope to use this endpoint.'
      tags:
      - Legacy
      operationId: getDiscussionCommentLegacy
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#get-a-discussion-comment-legacy
      parameters:
      - $ref: '#/components/parameters/team-id'
      - $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
        removalDate: '2021-02-01'
        deprecationDate: '2020-01-21'
        category: teams
        subcategory: discussion-comments
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Discussion Comment (legacy)
      description: '**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 [Update a discussion comment](https://docs.github.com/enterprise-server@3.9/rest/teams/discussion-comments#update-a-discussion-comment) endpoint.


        Edits the body text of a discussion comment.


        OAuth app tokens and personal access tokens (classic) need the `write:discussion` scope to use this endpoint.'
      tags:
      - Legacy
      operationId: updateDiscussionCommentLegacy
      externalDocs:
        description: API method documentation
        url: https

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