GitHub Enterprise-Admin API

Enterprise Administration

Operations 121

GET /admin/hooks GitHub List Global Webhooks #
POST /admin/hooks GitHub Create a Global Webhook #
GET /admin/hooks/{hook_id} GitHub Get a Global Webhook #
PATCH /admin/hooks/{hook_id} GitHub Update a Global Webhook #
DELETE /admin/hooks/{hook_id} GitHub Delete a Global Webhook #
POST /admin/hooks/{hook_id}/pings GitHub Ping a Global Webhook #
GET /admin/keys GitHub List Public Keys #
DELETE /admin/keys/{key_ids} GitHub Delete a Public Key #
PATCH /admin/ldap/teams/{team_id}/mapping GitHub Update LDAP Mapping for a Team #
POST /admin/ldap/teams/{team_id}/sync GitHub Sync LDAP Mapping for a Team #
PATCH /admin/ldap/users/{username}/mapping GitHub Update LDAP Mapping for a User #
POST /admin/ldap/users/{username}/sync GitHub Sync LDAP Mapping for a User #
POST /admin/organizations GitHub Create an Organization #
PATCH /admin/organizations/{org} GitHub Update an Organization Name #
GET /admin/pre-receive-environments GitHub List Pre-receive Environments #
POST /admin/pre-receive-environments GitHub Create a Pre-receive Environment #
GET /admin/pre-receive-environments/{pre_receive_environment_id} GitHub Get a Pre-receive Environment #
PATCH /admin/pre-receive-environments/{pre_receive_environment_id} GitHub Update a Pre-receive Environment #
DELETE /admin/pre-receive-environments/{pre_receive_environment_id} GitHub Delete a Pre-receive Environment #
POST /admin/pre-receive-environments/{pre_receive_environment_id}/downloads GitHub Start a Pre-receive Environment Download #
GET /admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest GitHub Get the Download Status for a Pre-receive Environment #
GET /admin/pre-receive-hooks GitHub List Pre-receive Hooks #
POST /admin/pre-receive-hooks GitHub Create a Pre-receive Hook #
GET /admin/pre-receive-hooks/{pre_receive_hook_id} GitHub Get a Pre-receive Hook #
PATCH /admin/pre-receive-hooks/{pre_receive_hook_id} GitHub Update a Pre-receive Hook #
DELETE /admin/pre-receive-hooks/{pre_receive_hook_id} GitHub Delete a Pre-receive Hook #
GET /admin/tokens GitHub List Personal Access Tokens #
DELETE /admin/tokens/{token_id} GitHub Delete a Personal Access Token #
POST /admin/users GitHub Create a User #
PATCH /admin/users/{username} GitHub Update the Username for a User #
DELETE /admin/users/{username} GitHub Delete a User #
POST /admin/users/{username}/authorizations GitHub Create an Impersonation OAuth Token #
DELETE /admin/users/{username}/authorizations GitHub Delete an Impersonation OAuth Token #
GET /enterprise/announcement GitHub Get the Global Announcement Banner #
PATCH /enterprise/announcement GitHub Set the Global Announcement Banner #
DELETE /enterprise/announcement GitHub Remove the Global Announcement Banner #
GET /enterprise/settings/license GitHub Get License Information #
GET /enterprise/stats/all GitHub Get All Statistics #
GET /enterprise/stats/comments GitHub Get Comment Statistics #
GET /enterprise/stats/gists GitHub Get Gist Statistics #
GET /enterprise/stats/hooks GitHub Get Hooks Statistics #
GET /enterprise/stats/issues GitHub Get Issue Statistics #
GET /enterprise/stats/milestones GitHub Get Milestone Statistics #
GET /enterprise/stats/orgs GitHub Get Organization Statistics #
GET /enterprise/stats/pages GitHub Get Pages Statistics #
GET /enterprise/stats/pulls GitHub Get Pull Request Statistics #
GET /enterprise/stats/repos GitHub Get Repository Statistics #
GET /enterprise/stats/users GitHub Get Users Statistics #
GET /enterprises/{enterprise}/actions/permissions GitHub Get GitHub Actions Permissions for an Enterprise #
PUT /enterprises/{enterprise}/actions/permissions GitHub Set GitHub Actions Permissions for an Enterprise #
GET /enterprises/{enterprise}/actions/permissions/organizations GitHub List Selected Organizations Enabled for GitHub Actions in an Enterprise #
PUT /enterprises/{enterprise}/actions/permissions/organizations GitHub Set Selected Organizations Enabled for GitHub Actions in an Enterprise #
PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id} GitHub Enable a Selected Organization for GitHub Actions in an Enterprise #
DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id} GitHub Disable a Selected Organization for GitHub Actions in an Enterprise #
GET /enterprises/{enterprise}/actions/permissions/selected-actions GitHub Get Allowed Actions for an Enterprise #
PUT /enterprises/{enterprise}/actions/permissions/selected-actions GitHub Set Allowed Actions for an Enterprise #
GET /enterprises/{enterprise}/actions/runner-groups GitHub List Self-hosted Runner Groups for an Enterprise #
POST /enterprises/{enterprise}/actions/runner-groups GitHub Create a Self-hosted Runner Group for an Enterprise #
GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id} GitHub Get a Self-hosted Runner Group for an Enterprise #
PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id} GitHub Update a Self-hosted Runner Group for an Enterprise #
DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id} GitHub Delete a Self-hosted Runner Group from an Enterprise #
GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations GitHub List Organization Access to a Self-hosted Runner Group in an Enterprise #
PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations GitHub Set Organization Access for a Self-hosted Runner Group in an Enterprise #
PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id} GitHub Add Organization Access to a Self-hosted Runner Group in an Enterprise #
DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id} GitHub Remove Organization Access to a Self-hosted Runner Group in an Enterprise #
GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners GitHub List Self-hosted Runners in a Group for an Enterprise #
PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners GitHub Set Self-hosted Runners in a Group for an Enterprise #
PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id} GitHub Add a Self-hosted Runner to a Group for an Enterprise #
DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id} GitHub Remove a Self-hosted Runner from a Group for an Enterprise #
GET /enterprises/{enterprise}/actions/runners GitHub List Self-hosted Runners for an Enterprise #
GET /enterprises/{enterprise}/actions/runners/downloads GitHub List Runner Applications for an Enterprise #
POST /enterprises/{enterprise}/actions/runners/registration-token GitHub Create a Registration Token for an Enterprise #
POST /enterprises/{enterprise}/actions/runners/remove-token GitHub Create a Remove Token for an Enterprise #
GET /enterprises/{enterprise}/actions/runners/{runner_id} GitHub Get a Self-hosted Runner for an Enterprise #
DELETE /enterprises/{enterprise}/actions/runners/{runner_id} GitHub Delete a Self-hosted Runner from an Enterprise #
GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels GitHub List Labels for a Self-hosted Runner for an Enterprise #
POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels GitHub Add Custom Labels to a Self-hosted Runner for an Enterprise #
PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels GitHub Set Custom Labels for a Self-hosted Runner for an Enterprise #
DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels GitHub Remove All Custom Labels from a Self-hosted Runner for an Enterprise #
DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name} GitHub Remove a Custom Label from a Self-hosted Runner for an Enterprise #
GET /enterprises/{enterprise}/audit-log GitHub Get the Audit Log for an Enterprise #
GET /enterprises/{enterprise}/code_security_and_analysis GitHub Get Code Security and Analysis Features for an Enterprise #
PATCH /enterprises/{enterprise}/code_security_and_analysis GitHub Update Code Security and Analysis Features for an Enterprise #
POST /enterprises/{enterprise}/{security_product}/{enablement} GitHub Enable or Disable a Security Feature #
GET /manage/v1/config/nodes GitHub Get GHES Node Metadata for All Nodes #
GET /manage/v1/replication/status GitHub Get the Status of Services Running on All Replica Nodes #
GET /manage/v1/version GitHub Get All GHES Release Versions for All Nodes #
GET /orgs/{org}/pre-receive-hooks GitHub List Pre-receive Hooks for an Organization #
GET /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id} GitHub Get a Pre-receive Hook for an Organization #
PATCH /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id} GitHub Update Pre-receive Hook Enforcement for an Organization #
DELETE /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id} GitHub Remove Pre-receive Hook Enforcement for an Organization #
GET /repos/{owner}/{repo}/pre-receive-hooks GitHub List Pre-receive Hooks for a Repository #
GET /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} GitHub Get a Pre-receive Hook for a Repository #
PATCH /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} GitHub Update Pre-receive Hook Enforcement for a Repository #
DELETE /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id} GitHub Remove Pre-receive Hook Enforcement for a Repository #
POST /scim/v2/Groups GitHub Provision a SCIM Enterprise Group #
GET /scim/v2/Groups/{scim_group_id} GitHub Get SCIM Provisioning Information for an Enterprise Group #
PUT /scim/v2/Groups/{scim_group_id} GitHub Set SCIM Information for a Provisioned Enterprise Group #
PATCH /scim/v2/Groups/{scim_group_id} GitHub Update an Attribute for a SCIM Enterprise Group #
DELETE /scim/v2/Groups/{scim_group_id} GitHub Delete a SCIM Group from an Enterprise #
GET /scim/v2/Users GitHub List SCIM Provisioned Identities for an Enterprise #
POST /scim/v2/Users GitHub Provision a SCIM Enterprise User #
GET /scim/v2/Users/{scim_user_id} GitHub Get SCIM Provisioning Information for an Enterprise User #
PUT /scim/v2/Users/{scim_user_id} GitHub Set SCIM Information for a Provisioned Enterprise User #
PATCH /scim/v2/Users/{scim_user_id} GitHub Update an Attribute for a SCIM Enterprise User #
DELETE /scim/v2/Users/{scim_user_id} GitHub Delete a SCIM User from an Enterprise #
GET /setup/api/configcheck GitHub Get the Configuration Status #
POST /setup/api/configure GitHub Start a Configuration Process #
GET /setup/api/maintenance GitHub Get the Maintenance Status #
POST /setup/api/maintenance GitHub Enable or Disable Maintenance Mode #
GET /setup/api/settings GitHub Get Settings #
PUT /setup/api/settings GitHub Set Settings #
GET /setup/api/settings/authorized-keys GitHub Get All Authorized SSH Keys #
POST /setup/api/settings/authorized-keys GitHub Add an Authorized SSH Key #
DELETE /setup/api/settings/authorized-keys GitHub Remove an Authorized SSH Key #
POST /setup/api/start GitHub Create a GitHub License #
POST /setup/api/upgrade GitHub Upgrade a License #
PUT /users/{username}/site_admin GitHub Promote a User to Be a Site Administrator #
DELETE /users/{username}/site_admin GitHub Demote a Site Administrator #
PUT /users/{username}/suspended GitHub Suspend a User #
DELETE /users/{username}/suspended GitHub Unsuspend a User #

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

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github-enterprise-admin-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

github-enterprise-admin-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: GitHub v3 REST Enterprise Admin API
  description: GitHub's v3 REST API.
  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: Enterprise-Admin
  description: Enterprise Administration
paths:
  /admin/hooks:
    get:
      summary: GitHub List Global Webhooks
      description: ''
      operationId: enterprise-admin/list-global-webhooks
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/global-webhooks#list-global-webhooks
      parameters:
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/global-hook'
              examples:
                default:
                  $ref: '#/components/examples/global-hook-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: global-webhooks
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create a Global Webhook
      description: ''
      operationId: enterprise-admin/create-global-webhook
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/global-webhooks#create-a-global-webhook
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global-hook'
              examples:
                default:
                  $ref: '#/components/examples/global-hook'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Must be passed as "web".
                config:
                  type: object
                  description: Key/value pairs to provide settings for this webhook.
                  properties:
                    url:
                      type: string
                      description: The URL to which the payloads will be delivered.
                    content_type:
                      type: string
                      description: The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
                    secret:
                      type: string
                      description: If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.9/webhooks/event-payloads/#delivery-headers) header.
                    insecure_ssl:
                      type: string
                      description: Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**
                  required:
                  - url
                events:
                  type: array
                  description: 'The [events](https://docs.github.com/enterprise-server@3.9/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`.'
                  items:
                    type: string
                active:
                  type: boolean
                  description: Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.
                  default: true
              required:
              - name
              - config
            examples:
              default:
                value:
                  name: web
                  events:
                  - organization
                  - user
                  config:
                    url: https://example.com/webhook
                    content_type: json
                    secret: secret
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: global-webhooks
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/hooks/{hook_id}:
    get:
      summary: GitHub Get a Global Webhook
      description: ''
      operationId: enterprise-admin/get-global-webhook
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/global-webhooks#get-a-global-webhook
      parameters:
      - $ref: '#/components/parameters/hook-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global-hook'
              examples:
                default:
                  $ref: '#/components/examples/global-hook'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: global-webhooks
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update a Global Webhook
      description: Parameters that are not provided will be overwritten with the default value or removed if no default exists.
      operationId: enterprise-admin/update-global-webhook
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/global-webhooks#update-a-global-webhook
      parameters:
      - $ref: '#/components/parameters/hook-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/global-hook-2'
              examples:
                default:
                  $ref: '#/components/examples/global-hook-2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                config:
                  type: object
                  description: Key/value pairs to provide settings for this webhook.
                  properties:
                    url:
                      type: string
                      description: The URL to which the payloads will be delivered.
                    content_type:
                      type: string
                      description: The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
                    secret:
                      type: string
                      description: If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.9/webhooks/event-payloads/#delivery-headers) header.
                    insecure_ssl:
                      type: string
                      description: Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**
                  required:
                  - url
                events:
                  type: array
                  description: 'The [events](https://docs.github.com/enterprise-server@3.9/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`.'
                  items:
                    type: string
                active:
                  type: boolean
                  description: Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.
                  default: true
            examples:
              default:
                value:
                  events:
                  - organization
                  config:
                    url: https://example.com/webhook
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: global-webhooks
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete a Global Webhook
      description: ''
      operationId: enterprise-admin/delete-global-webhook
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/global-webhooks#delete-a-global-webhook
      parameters:
      - $ref: '#/components/parameters/hook-id'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: global-webhooks
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/hooks/{hook_id}/pings:
    post:
      summary: GitHub Ping a Global Webhook
      description: This will trigger a [ping event](https://docs.github.com/enterprise-server@3.9/webhooks/#ping-event) to be sent to the webhook.
      operationId: enterprise-admin/ping-global-webhook
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/global-webhooks#ping-a-global-webhook
      parameters:
      - $ref: '#/components/parameters/hook-id'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: global-webhooks
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/keys:
    get:
      summary: GitHub List Public Keys
      description: ''
      operationId: enterprise-admin/list-public-keys
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/users#list-public-keys
      parameters:
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/direction'
      - name: sort
        in: query
        required: false
        schema:
          type: string
          enum:
          - created
          - updated
          - accessed
          default: created
        example: created
      - name: since
        description: Only show public keys accessed after the given time.
        in: query
        required: false
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/public-key-full'
              examples:
                default:
                  $ref: '#/components/examples/enterprise-public-key-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: users
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/keys/{key_ids}:
    delete:
      summary: GitHub Delete a Public Key
      description: ''
      operationId: enterprise-admin/delete-public-key
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/users#delete-a-public-key
      parameters:
      - $ref: '#/components/parameters/key-ids'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: users
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/ldap/teams/{team_id}/mapping:
    patch:
      summary: GitHub Update LDAP Mapping for a 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: enterprise-admin/update-ldap-mapping-for-team
      tags:
      - Enterprise-Admin
      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
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/ldap/teams/{team_id}/sync:
    post:
      summary: GitHub Sync LDAP Mapping for a 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: enterprise-admin/sync-ldap-mapping-for-team
      tags:
      - Enterprise-Admin
      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
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/ldap/users/{username}/mapping:
    patch:
      summary: GitHub Update LDAP Mapping for a User
      description: ''
      operationId: enterprise-admin/update-ldap-mapping-for-user
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user
      parameters:
      - $ref: '#/components/parameters/username'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ldap-mapping-user'
              examples:
                default:
                  $ref: '#/components/examples/ldap-mapping-user'
      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: uid=asdf,ou=users,dc=github,dc=com
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: ldap
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/ldap/users/{username}/sync:
    post:
      summary: GitHub Sync LDAP Mapping for a User
      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: enterprise-admin/sync-ldap-mapping-for-user
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/ldap#sync-ldap-mapping-for-a-user
      parameters:
      - $ref: '#/components/parameters/username'
      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
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/organizations:
    post:
      summary: GitHub Create an Organization
      description: ''
      operationId: enterprise-admin/create-org
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/orgs#create-an-organization
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization-simple'
              examples:
                default:
                  $ref: '#/components/examples/organization-simple'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                login:
                  type: string
                  description: The organization's username.
                admin:
                  type: string
                  description: The login of the user who will manage this organization.
                profile_name:
                  type: string
                  description: The organization's display name.
              required:
              - login
              - admin
            examples:
              default:
                value:
                  login: github
                  profile_name: GitHub, Inc.
                  admin: monalisaoctocat
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: orgs
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/organizations/{org}:
    patch:
      summary: GitHub Update an Organization Name
      description: ''
      operationId: enterprise-admin/update-org-name
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/orgs#update-an-organization-name
      parameters:
      - $ref: '#/components/parameters/org'
      responses:
        '202':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  url:
                    type: string
              examples:
                default:
                  value:
                    message: Job queued to rename organization. It may take a few minutes to complete.
                    url: https://<hostname>/api/v3/organizations/1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                login:
                  type: string
                  description: The organization's new name.
              required:
              - login
            examples:
              default:
                value:
                  login: the-new-octocats
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: orgs
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/pre-receive-environments:
    get:
      summary: GitHub List Pre-receive Environments
      description: ''
      operationId: enterprise-admin/list-pre-receive-environments
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/pre-receive-environments#list-pre-receive-environments
      parameters:
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/direction'
      - name: sort
        in: query
        required: false
        schema:
          type: string
          enum:
          - created
          - updated
          - name
          default: created
        example: created
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/pre-receive-environment'
              examples:
                default:
                  $ref: '#/components/examples/pre-receive-environment-items'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: pre-receive-environments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create a Pre-receive Environment
      description: ''
      operationId: enterprise-admin/create-pre-receive-environment
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/pre-receive-environments#create-a-pre-receive-environment
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pre-receive-environment'
              examples:
                default:
                  $ref: '#/components/examples/pre-receive-environment'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The new pre-receive environment's name.
                image_url:
                  type: string
                  description: URL from which to download a tarball of this environment.
              required:
              - name
              - image_url
            examples:
              default:
                value:
                  name: DevTools Hook Env
                  image_url: https://my_file_server/path/to/devtools_env.tar.gz
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: pre-receive-environments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/pre-receive-environments/{pre_receive_environment_id}:
    get:
      summary: GitHub Get a Pre-receive Environment
      description: ''
      operationId: enterprise-admin/get-pre-receive-environment
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/pre-receive-environments#get-a-pre-receive-environment
      parameters:
      - $ref: '#/components/parameters/pre-receive-environment-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pre-receive-environment'
              examples:
                default:
                  $ref: '#/components/examples/pre-receive-environment'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: pre-receive-environments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update a Pre-receive Environment
      description: You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response.
      operationId: enterprise-admin/update-pre-receive-environment
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/pre-receive-environments#update-a-pre-receive-environment
      parameters:
      - $ref: '#/components/parameters/pre-receive-environment-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pre-receive-environment'
              examples:
                default-response:
                  $ref: '#/components/examples/pre-receive-environment-default-response'
        '422':
          description: Client Errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        resource:
                          type: string
                        code:
                          type: string
                        message:
                          type: string
              examples:
                client-errors:
                  value:
                    message: Validation Failed
                    errors:
                    - resource: PreReceiveEnvironment
                      code: custom
                      message: Cannot modify or delete the default environment
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: This pre-receive environment's new name.
                image_url:
                  type: string
                  description: URL from which to download a tarball of this environment.
            examples:
              default:
                value:
                  name: DevTools Hook Env
                  image_url: https://my_file_server/path/to/devtools_env.tar.gz
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: pre-receive-environments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete a Pre-receive Environment
      description: 'If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response.


        The possible error messages are:


        *   _Cannot modify or delete the default environment_

        *   _Cannot delete environment that has hooks_

        *   _Cannot delete environment when download is in progress_'
      operationId: enterprise-admin/delete-pre-receive-environment
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/pre-receive-environments#delete-a-pre-receive-environment
      parameters:
      - $ref: '#/components/parameters/pre-receive-environment-id'
      responses:
        '204':
          description: Response
        '422':
          description: Client Errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        resource:
                          type: string
                        code:
                          type: string
                        message:
                          type: string
              examples:
                client-errors:
                  value:
                    message: Validation Failed
                    errors:
                    - resource: PreReceiveEnvironment
                      code: custom
                      message: Cannot modify or delete the default environment
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: pre-receive-environments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /admin/pre-receive-environments/{pre_receive_environment_id}/downloads:
    post:
      summary: GitHub Start a Pre-receive Environment Download
      description: 'Triggers a new download of the environment tarball from the environment''s `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment.


        If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response.


        The possible error messages are:


        * _Cannot modify or delete the default environment_

        * _Can not start a new download when a download is in progress_'
      operationId: enterprise-admin/start-pre-receive-environment-download
      tags:
      - Enterprise-Admin
      externalDocs:
        description: API m

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