GitHub Mapping API

The Mapping API from GitHub — 4 operation(s) for mapping.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
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-mapping-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: GitHub Teams Mapping API
  description: The GitHub Teams API allows developers to programmatically create and manage teams within GitHub organizations, which are groups of organization members that reflect your company or group's structure and provide cascading access permissions to repositories. Through these REST API endpoints, you can create and delete teams, add or remove team members and maintainers, manage team repositories and their permission levels, organize teams into hierarchical structures with parent and child teams, configure team settings like privacy levels and notifications, and access team discussions. This API is essential for automating team management workflows, synchronizing GitHub team structures with external HR or directory systems, building custom administrative dashboards, and maintaining consistent access control as your organization scales.
  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: Mapping
paths:
  /admin/ldap/teams/{team_id}/mapping:
    patch:
      summary: GitHub Update Ldap Mapping for Team
      description: Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.9/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.9/rest/teams/teams/#create-a-team) endpoint to create a team with LDAP mapping.
      operationId: updateLdapMappingForTeam
      tags:
      - Mapping
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team
      parameters:
      - $ref: '#/components/parameters/team-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ldap-mapping-team'
              examples:
                default:
                  $ref: '#/components/examples/ldap-mapping-team'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                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.
              required:
              - ldap_dn
            examples:
              default:
                value:
                  ldap_dn: cn=Enterprise Ops,ou=teams,dc=github,dc=com
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: ldap
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/ldap/teams/{team_id}/sync:
    post:
      summary: GitHub Sync Ldap Mapping for Team
      description: Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready.
      operationId: syncLdapMappingForTeam
      tags:
      - Mapping
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/ldap#sync-ldap-mapping-for-a-team
      parameters:
      - $ref: '#/components/parameters/team-id'
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
              examples:
                default:
                  value:
                    status: queued
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: ldap
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  examples:
    ldap-mapping-team:
      value:
        ldap_dn: cn=Enterprise Ops,ou=teams,dc=github,dc=com
        id: 1
        node_id: MDQ6VGVhbTE=
        url: https://api.github.com/teams/1
        html_url: https://github.com/orgs/github/teams/justice-league
        name: Justice League
        slug: justice-league
        description: A great team.
        privacy: closed
        notification_setting: notifications_enabled
        permission: admin
        members_url: https://api.github.com/teams/1/members{/member}
        repositories_url: https://api.github.com/teams/1/repos
        parent: null
  schemas:
    ldap-mapping-team:
      type: object
      properties:
        ldap_dn:
          type: string
          example: example_value
        id:
          type: integer
          example: 42
        node_id:
          type: string
          example: '12345678'
        url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        html_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        name:
          type: string
          example: octocat
        slug:
          type: string
          example: example_value
        description:
          type:
          - string
          - 'null'
          example: This is an example repository
        privacy:
          type: string
          example: example_value
        permission:
          type: string
          example: example_value
        members_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        repositories_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        parent:
          example: example_value
  parameters:
    team-id:
      name: team_id
      description: The unique identifier of the team.
      in: path
      required: true
      schema:
        type: integer
  securitySchemes:
    bearerHttpAuthentication:
      description: Bearer Token
      type: http
      scheme: Bearer
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://docs.github.com/enterprise-server@3.9/rest/