UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 2.1 MB
{"openapi":"3.0.3","servers":[{"url":"{protocol}://{hostname}/api/v3","variables":{"hostname":{"default":"HOSTNAME","description":"Self-hosted Enterprise Server or Enterprise Cloud hostname"},"protocol":{"default":"http","description":"Self-hosted Enterprise Server or Enterprise Cloud protocol"}}}],"info":{"contact":{"name":"Support","url":"https://support.github.com/contact?tags=dotcom-rest-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","title":"GitHub v3 REST API","version":"1.1.4","x-apisguru-categories":["collaboration","developer_tools"],"x-logo":{"url":"https://twitter.com/github/profile_image?size=original"},"x-origin":[{"format":"openapi","url":"https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/ghes-2.22/ghes-2.22.json","version":"3.0"}],"x-providerName":"github.com","x-serviceName":"ghes-2.22"},"externalDocs":{"description":"GitHub Enterprise Developer Docs","url":"https://docs.github.com/enterprise-server@2.22/rest/"},"tags":[{"description":"Endpoints to manage GitHub Actions using the REST API.","name":"actions"},{"description":"Activity APIs provide access to notifications, subscriptions, and timelines.","name":"activity"},{"description":"Information for integrations and installations.","name":"apps"},{"description":"Monitor charges and usage from Actions and Packages.","name":"billing"},{"description":"Rich interactions with checks run by your integrations.","name":"checks"},{"description":"Retrieve code scanning alerts from a repository.","name":"code-scanning"},{"description":"Insight into codes of conduct for your communities.","name":"codes-of-conduct"},{"description":"Endpoints to manage Codespaces using the REST API.","name":"codespaces"},{"description":"List emojis available to use on GitHub.","name":"emojis"},{"description":"Administer a GitHub enterprise.","name":"enterprise-admin"},{"description":"View, modify your gists.","name":"gists"},{"description":"Raw Git functionality.","name":"git"},{"description":"View gitignore templates","name":"gitignore"},{"description":"Owner or admin management of users interactions.","name":"interactions"},{"description":"Interact with GitHub Issues.","name":"issues"},{"description":"View various OSS licenses.","name":"licenses"},{"description":"Render Github flavored markdown","name":"markdown"},{"description":"Endpoints that give information about the API.","name":"meta"},{"description":"Move projects to or from GitHub.","name":"migrations"},{"description":"Manage access of OAuth applications","name":"oauth-authorizations"},{"description":"Interact with GitHub Orgs.","name":"orgs"},{"description":"Manage packages for authenticated users and organizations.","name":"packages"},{"description":"Interact with GitHub Projects.","name":"projects"},{"description":"Interact with GitHub Pull Requests.","name":"pulls"},{"description":"Check your current rate limit status","name":"rate-limit"},{"description":"Interact with reactions to various GitHub entities.","name":"reactions"},{"description":"Interact with GitHub Repos.","name":"repos"},{"description":"Provisioning of GitHub organization membership for SCIM-enabled providers.","name":"scim"},{"description":"Look for stuff on GitHub.","name":"search"},{"description":"Retrieve secret scanning alerts from a repository.","name":"secret-scanning"},{"description":"GHES statistics","name":"server-statistics"},{"description":"Interact with GitHub Teams.","name":"teams"},{"description":"Interact with and view information about users and also current user.","name":"users"}],"paths":{"/":{"get":{"description":"Get Hypermedia links to resources accessible in GitHub's REST API","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#root-endpoint"},"operationId":"meta/root","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"authorizations_url":{"format":"uri-template","type":"string"},"code_search_url":{"format":"uri-template","type":"string"},"commit_search_url":{"format":"uri-template","type":"string"},"current_user_authorizations_html_url":{"format":"uri-template","type":"string"},"current_user_repositories_url":{"format":"uri-template","type":"string"},"current_user_url":{"format":"uri-template","type":"string"},"emails_url":{"format":"uri-template","type":"string"},"emojis_url":{"format":"uri-template","type":"string"},"events_url":{"format":"uri-template","type":"string"},"feeds_url":{"format":"uri-template","type":"string"},"followers_url":{"format":"uri-template","type":"string"},"following_url":{"format":"uri-template","type":"string"},"gists_url":{"format":"uri-template","type":"string"},"hub_url":{"format":"uri-template","type":"string"},"issue_search_url":{"format":"uri-template","type":"string"},"issues_url":{"format":"uri-template","type":"string"},"keys_url":{"format":"uri-template","type":"string"},"label_search_url":{"format":"uri-template","type":"string"},"notifications_url":{"format":"uri-template","type":"string"},"organization_repositories_url":{"format":"uri-template","type":"string"},"organization_teams_url":{"format":"uri-template","type":"string"},"organization_url":{"format":"uri-template","type":"string"},"public_gists_url":{"format":"uri-template","type":"string"},"rate_limit_url":{"format":"uri-template","type":"string"},"repository_search_url":{"format":"uri-template","type":"string"},"repository_url":{"format":"uri-template","type":"string"},"starred_gists_url":{"format":"uri-template","type":"string"},"starred_url":{"format":"uri-template","type":"string"},"topic_search_url":{"format":"uri-template","type":"string"},"user_organizations_url":{"format":"uri-template","type":"string"},"user_repositories_url":{"format":"uri-template","type":"string"},"user_search_url":{"format":"uri-template","type":"string"},"user_url":{"format":"uri-template","type":"string"}},"required":["current_user_url","current_user_authorizations_html_url","authorizations_url","code_search_url","commit_search_url","emails_url","emojis_url","events_url","feeds_url","followers_url","following_url","gists_url","hub_url","issue_search_url","issues_url","keys_url","label_search_url","notifications_url","organization_url","organization_repositories_url","organization_teams_url","public_gists_url","rate_limit_url","repository_url","repository_search_url","current_user_repositories_url","starred_url","starred_gists_url","user_url","user_organizations_url","user_repositories_url","user_search_url"],"type":"object"}}},"description":"Response"}},"summary":"GitHub API Root","tags":["meta"],"x-github":{"category":"meta","enabledForGitHubApps":true,"githubCloudOnly":false}}},"/admin/hooks":{"get":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#list-global-webhooks"},"operationId":"enterprise-admin/list-global-webhooks","parameters":[{"description":"This API is under preview and subject to change.","in":"header","name":"accept","required":true,"schema":{"default":"application/vnd.github.superpro-preview+json","type":"string"}},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/global-hook-items"}},"schema":{"items":{"$ref":"#/components/schemas/global-hook"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}},"summary":"List global webhooks","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"superpro","note":"The [Global Webhooks API](https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#global-webhooks) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```","required":true}],"subcategory":"global-webhooks"}},"post":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#create-a-global-webhook"},"operationId":"enterprise-admin/create-global-webhook","parameters":[{"description":"This API is under preview and subject to change.","in":"header","name":"accept","required":true,"schema":{"default":"application/vnd.github.superpro-preview+json","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"config":{"content_type":"json","secret":"secret","url":"https://example.com/webhook"},"events":["organization","user"],"name":"web"},"schema":{"properties":{"active":{"default":true,"description":"Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.","type":"boolean"},"config":{"description":"Key/value pairs to provide settings for this webhook.","properties":{"content_type":{"description":"The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.","type":"string"},"insecure_ssl":{"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.**","type":"string"},"secret":{"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@2.22/webhooks/event-payloads/#delivery-headers) header.","type":"string"},"url":{"description":"The URL to which the payloads will be delivered.","type":"string"}},"required":["url"],"type":"object"},"events":{"description":"The [events](https://docs.github.com/enterprise-server@2.22/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"},"type":"array"},"name":{"description":"Must be passed as \"web\".","type":"string"}},"required":["name","config"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/global-hook"}},"schema":{"$ref":"#/components/schemas/global-hook"}}},"description":"Response"}},"summary":"Create a global webhook","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"superpro","note":"The [Global Webhooks API](https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#global-webhooks) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```","required":true}],"subcategory":"global-webhooks"}}},"/admin/hooks/{hook_id}":{"delete":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#delete-a-global-webhook"},"operationId":"enterprise-admin/delete-global-webhook","parameters":[{"description":"This API is under preview and subject to change.","in":"header","name":"accept","required":true,"schema":{"default":"application/vnd.github.superpro-preview+json","type":"string"}},{"$ref":"#/components/parameters/hook-id"}],"responses":{"204":{"description":"Response"}},"summary":"Delete a global webhook","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"superpro","note":"The [Global Webhooks API](https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#global-webhooks) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```","required":true}],"subcategory":"global-webhooks"}},"get":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#get-a-global-webhook"},"operationId":"enterprise-admin/get-global-webhook","parameters":[{"description":"This API is under preview and subject to change.","in":"header","name":"accept","required":true,"schema":{"default":"application/vnd.github.superpro-preview+json","type":"string"}},{"$ref":"#/components/parameters/hook-id"}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/global-hook"}},"schema":{"$ref":"#/components/schemas/global-hook"}}},"description":"Response"}},"summary":"Get a global webhook","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"superpro","note":"The [Global Webhooks API](https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#global-webhooks) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```","required":true}],"subcategory":"global-webhooks"}},"patch":{"description":"Parameters that are not provided will be overwritten with the default value or removed if no default exists.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#update-a-global-webhook"},"operationId":"enterprise-admin/update-global-webhook","parameters":[{"description":"This API is under preview and subject to change.","in":"header","name":"accept","required":true,"schema":{"default":"application/vnd.github.superpro-preview+json","type":"string"}},{"$ref":"#/components/parameters/hook-id"}],"requestBody":{"content":{"application/json":{"example":{"config":{"url":"https://example.com/webhook"},"events":["organization"]},"schema":{"properties":{"active":{"default":true,"description":"Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.","type":"boolean"},"config":{"description":"Key/value pairs to provide settings for this webhook.","properties":{"content_type":{"description":"The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.","type":"string"},"insecure_ssl":{"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.**","type":"string"},"secret":{"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@2.22/webhooks/event-payloads/#delivery-headers) header.","type":"string"},"url":{"description":"The URL to which the payloads will be delivered.","type":"string"}},"required":["url"],"type":"object"},"events":{"description":"The [events](https://docs.github.com/enterprise-server@2.22/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"},"type":"array"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/global-hook-2"}},"schema":{"$ref":"#/components/schemas/global-hook-2"}}},"description":"Response"}},"summary":"Update a global webhook","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"superpro","note":"The [Global Webhooks API](https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#global-webhooks) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```","required":true}],"subcategory":"global-webhooks"}}},"/admin/hooks/{hook_id}/pings":{"post":{"description":"This will trigger a [ping event](https://docs.github.com/enterprise-server@2.22/webhooks/#ping-event) to be sent to the webhook.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#ping-a-global-webhook"},"operationId":"enterprise-admin/ping-global-webhook","parameters":[{"description":"This API is under preview and subject to change.","in":"header","name":"accept","required":true,"schema":{"default":"application/vnd.github.superpro-preview+json","type":"string"}},{"$ref":"#/components/parameters/hook-id"}],"responses":{"204":{"description":"Response"}},"summary":"Ping a global webhook","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"superpro","note":"The [Global Webhooks API](https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#global-webhooks) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```","required":true}],"subcategory":"global-webhooks"}}},"/admin/keys":{"get":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#list-public-keys"},"operationId":"enterprise-admin/list-public-keys","parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/direction"},{"in":"query","name":"sort","required":false,"schema":{"default":"created","enum":["created","updated","accessed"],"type":"string"}},{"description":"Only show public keys accessed after the given time.","in":"query","name":"since","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/enterprise-public-key-items"}},"schema":{"items":{"$ref":"#/components/schemas/public-key-full"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}},"summary":"List public keys","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"subcategory":"users"}}},"/admin/keys/{key_ids}":{"delete":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#delete-a-public-key"},"operationId":"enterprise-admin/delete-public-key","parameters":[{"$ref":"#/components/parameters/key-ids"}],"responses":{"204":{"description":"Response"}},"summary":"Delete a public key","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"subcategory":"users"}}},"/admin/ldap/teams/{team_id}/mapping":{"patch":{"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://help.github.com/enterprise/admin/guides/user-management/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@2.22/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping.\n\nIf you pass the `hellcat-preview` media type, you can also update the LDAP mapping of a child team.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#update-ldap-mapping-for-a-team"},"operationId":"enterprise-admin/update-ldap-mapping-for-team","parameters":[{"$ref":"#/components/parameters/team-id"}],"requestBody":{"content":{"application/json":{"example":{"ldap_dn":"cn=Enterprise Ops,ou=teams,dc=github,dc=com"},"schema":{"properties":{"ldap_dn":{"description":"The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.","type":"string"}},"required":["ldap_dn"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/ldap-mapping-team"}},"schema":{"$ref":"#/components/schemas/ldap-mapping-team"}}},"description":"Response"}},"summary":"Update LDAP mapping for a team","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"hellcat","note":"The Nested Teams API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2017-08-30-preview-nested-teams) for full details. To access the API, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.hellcat-preview+json\n```","required":false}],"subcategory":"ldap"}}},"/admin/ldap/teams/{team_id}/sync":{"post":{"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.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#sync-ldap-mapping-for-a-team"},"operationId":"enterprise-admin/sync-ldap-mapping-for-team","parameters":[{"$ref":"#/components/parameters/team-id"}],"responses":{"201":{"content":{"application/json":{"example":{"status":"queued"},"schema":{"properties":{"status":{"type":"string"}},"type":"object"}}},"description":"Response"}},"summary":"Sync LDAP mapping for a team","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"subcategory":"ldap"}}},"/admin/ldap/users/{username}/mapping":{"patch":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user"},"operationId":"enterprise-admin/update-ldap-mapping-for-user","parameters":[{"$ref":"#/components/parameters/username"}],"requestBody":{"content":{"application/json":{"example":{"ldap_dn":"uid=asdf,ou=users,dc=github,dc=com"},"schema":{"properties":{"ldap_dn":{"description":"The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.","type":"string"}},"required":["ldap_dn"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/ldap-mapping-user"}},"schema":{"$ref":"#/components/schemas/ldap-mapping-user"}}},"description":"Response"}},"summary":"Update LDAP mapping for a user","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"subcategory":"ldap"}}},"/admin/ldap/users/{username}/sync":{"post":{"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.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#sync-ldap-mapping-for-a-user"},"operationId":"enterprise-admin/sync-ldap-mapping-for-user","parameters":[{"$ref":"#/components/parameters/username"}],"responses":{"201":{"content":{"application/json":{"example":{"status":"queued"},"schema":{"properties":{"status":{"type":"string"}},"type":"object"}}},"description":"Response"}},"summary":"Sync LDAP mapping for a user","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"subcategory":"ldap"}}},"/admin/organizations":{"post":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#create-an-organization"},"operationId":"enterprise-admin/create-org","requestBody":{"content":{"application/json":{"example":{"admin":"monalisaoctocat","login":"github","profile_name":"GitHub, Inc."},"schema":{"properties":{"admin":{"description":"The login of the user who will manage this organization.","type":"string"},"login":{"description":"The organization's username.","type":"string"},"profile_name":{"description":"The organization's display name.","type":"string"}},"required":["login","admin"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-simple"}},"schema":{"$ref":"#/components/schemas/organization-simple"}}},"description":"Response"}},"summary":"Create an organization","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"subcategory":"orgs"}}},"/admin/organizations/{org}":{"patch":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#update-an-organization-name"},"operationId":"enterprise-admin/update-org-name","parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"example":{"login":"the-new-octocats"},"schema":{"properties":{"login":{"description":"The organization's new name.","type":"string"}},"required":["login"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"example":{"message":"Job queued to rename organization. It may take a few minutes to complete.","url":"https://<hostname>/api/v3/organizations/1"},"schema":{"properties":{"message":{"type":"string"},"url":{"type":"string"}},"type":"object"}}},"description":"Response"}},"summary":"Update an organization name","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"subcategory":"orgs"}}},"/admin/pre-receive-environments":{"get":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#list-pre-receive-environments"},"operationId":"enterprise-admin/list-pre-receive-environments","parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/direction"},{"in":"query","name":"sort","required":false,"schema":{"default":"created","enum":["created","updated","name"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pre-receive-environment-items"}},"schema":{"items":{"$ref":"#/components/schemas/pre-receive-environment"},"type":"array"}}},"description":"Response"}},"summary":"List pre-receive environments","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-environments"}},"post":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#create-a-pre-receive-environment"},"operationId":"enterprise-admin/create-pre-receive-environment","requestBody":{"content":{"application/json":{"example":{"image_url":"https://my_file_server/path/to/devtools_env.tar.gz","name":"DevTools Hook Env"},"schema":{"properties":{"image_url":{"description":"URL from which to download a tarball of this environment.","type":"string"},"name":{"description":"The new pre-receive environment's name.","type":"string"}},"required":["name","image_url"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pre-receive-environment"}},"schema":{"$ref":"#/components/schemas/pre-receive-environment"}}},"description":"Response"}},"summary":"Create a pre-receive environment","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-environments"}}},"/admin/pre-receive-environments/{pre_receive_environment_id}":{"delete":{"description":"If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response.\n\nThe possible error messages are:\n\n* _Cannot modify or delete the default environment_\n* _Cannot delete environment that has hooks_\n* _Cannot delete environment when download is in progress_","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#delete-a-pre-receive-environment"},"operationId":"enterprise-admin/delete-pre-receive-environment","parameters":[{"$ref":"#/components/parameters/pre-receive-environment-id"}],"responses":{"204":{"description":"Response"},"422":{"content":{"application/json":{"examples":{"client-errors":{"value":{"errors":[{"code":"custom","message":"Cannot modify or delete the default environment","resource":"PreReceiveEnvironment"}],"message":"Validation Failed"}}},"schema":{"properties":{"errors":{"items":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"resource":{"type":"string"}},"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}}},"description":"Client Errors"}},"summary":"Delete a pre-receive environment","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-environments"}},"get":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#get-a-pre-receive-environment"},"operationId":"enterprise-admin/get-pre-receive-environment","parameters":[{"$ref":"#/components/parameters/pre-receive-environment-id"}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pre-receive-environment"}},"schema":{"$ref":"#/components/schemas/pre-receive-environment"}}},"description":"Response"}},"summary":"Get a pre-receive environment","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-environments"}},"patch":{"description":"You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#update-a-pre-receive-environment"},"operationId":"enterprise-admin/update-pre-receive-environment","parameters":[{"$ref":"#/components/parameters/pre-receive-environment-id"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"image_url":{"description":"URL from which to download a tarball of this environment.","type":"string"},"name":{"description":"This pre-receive environment's new name.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"default-response":{"$ref":"#/components/examples/pre-receive-environment-default-response"}},"schema":{"$ref":"#/components/schemas/pre-receive-environment"}}},"description":"Response"},"422":{"content":{"application/json":{"examples":{"client-errors":{"value":{"errors":[{"code":"custom","message":"Cannot modify or delete the default environment","resource":"PreReceiveEnvironment"}],"message":"Validation Failed"}}},"schema":{"properties":{"errors":{"items":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"resource":{"type":"string"}},"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}}},"description":"Client Errors"}},"summary":"Update a pre-receive environment","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-environments"}}},"/admin/pre-receive-environments/{pre_receive_environment_id}/downloads":{"post":{"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.\n\nIf a download cannot be triggered, you will receive a `422 Unprocessable Entity` response.\n\nThe possible error messages are:\n\n* _Cannot modify or delete the default environment_\n* _Can not start a new download when a download is in progress_","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#start-a-pre-receive-environment-download"},"operationId":"enterprise-admin/start-pre-receive-environment-download","parameters":[{"$ref":"#/components/parameters/pre-receive-environment-id"}],"responses":{"202":{"content":{"application/json":{"examples":{"default-response":{"$ref":"#/components/examples/pre-receive-environment-download-status-default-response"}},"schema":{"$ref":"#/components/schemas/pre-receive-environment-download-status"}}},"description":"Response"},"422":{"content":{"application/json":{"examples":{"client-errors":{"value":{"errors":[{"code":"custom","message":"Can not start a new download when a download is in progress","resource":"PreReceiveEnvironment"}],"message":"Validation Failed"}}},"schema":{"properties":{"errors":{"items":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"resource":{"type":"string"}},"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}}},"description":"Client Errors"}},"summary":"Start a pre-receive environment download","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-environments"}}},"/admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest":{"get":{"description":"In addition to seeing the download status at the \"[Get a pre-receive environment](#get-a-pre-receive-environment)\" endpoint, there is also this separate endpoint for just the download status.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#get-the-download-status-for-a-pre-receive-environment"},"operationId":"enterprise-admin/get-download-status-for-pre-receive-environment","parameters":[{"$ref":"#/components/parameters/pre-receive-environment-id"}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pre-receive-environment-download-status"}},"schema":{"$ref":"#/components/schemas/pre-receive-environment-download-status"}}},"description":"Response"}},"summary":"Get the download status for a pre-receive environment","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-environments"}}},"/admin/pre-receive-hooks":{"get":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#list-pre-receive-hooks"},"operationId":"enterprise-admin/list-pre-receive-hooks","parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/direction"},{"description":"One of `created` (when the repository was starred) or `updated` (when it was last pushed to) or `name`.","in":"query","name":"sort","required":false,"schema":{"default":"created","enum":["created","updated","name"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pre-receive-hook-items"}},"schema":{"items":{"$ref":"#/components/schemas/pre-receive-hook"},"type":"array"}}},"description":"Response"}},"summary":"List pre-receive hooks","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-hooks"}},"post":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#create-a-pre-receive-hook"},"operationId":"enterprise-admin/create-pre-receive-hook","requestBody":{"content":{"application/json":{"example":{"allow_downstream_configuration":false,"enforcement":"disabled","environment":{"id":2},"name":"Check Commits","script":"scripts/commit_check.sh","script_repository":{"full_name":"DevIT/hooks"}},"schema":{"properties":{"allow_downstream_configuration":{"description":"Whether enforcement can be overridden at the org or repo level. default: `false`","type":"boolean"},"enforcement":{"description":"The state of enforcement for this hook. default: `disabled`","type":"string"},"environment":{"additionalProperties":true,"description":"The pre-receive environment where the script is executed.","properties":{},"type":"object"},"name":{"description":"The name of the hook.","type":"string"},"script":{"description":"The script that the hook runs.","type":"string"},"script_repository":{"additionalProperties":true,"description":"The GitHub repository where the script is kept.","properties":{},"type":"object"}},"required":["name","script","script_repository","environment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pre-receive-hook"}},"schema":{"$ref":"#/components/schemas/pre-receive-hook"}}},"description":"Response"}},"summary":"Create a pre-receive hook","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-hooks"}}},"/admin/pre-receive-hooks/{pre_receive_hook_id}":{"delete":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#delete-a-pre-receive-hook"},"operationId":"enterprise-admin/delete-pre-receive-hook","parameters":[{"$ref":"#/components/parameters/pre-receive-hook-id"}],"responses":{"204":{"description":"Response"}},"summary":"Delete a pre-receive hook","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-hooks"}},"get":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#get-a-pre-receive-hook"},"operationId":"enterprise-admin/get-pre-receive-hook","parameters":[{"$ref":"#/components/parameters/pre-receive-hook-id"}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pre-receive-hook"}},"schema":{"$ref":"#/components/schemas/pre-receive-hook"}}},"description":"Response"}},"summary":"Get a pre-receive hook","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-hooks"}},"patch":{"description":"","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#update-a-pre-receive-hook"},"operationId":"enterprise-admin/update-pre-receive-hook","parameters":[{"$ref":"#/components/parameters/pre-receive-hook-id"}],"requestBody":{"content":{"application/json":{"example":{"allow_downstream_configuration":true,"environment":{"id":1},"name":"Check Commits"},"schema":{"properties":{"allow_downstream_configuration":{"description":"Whether enforcement can be overridden at the org or repo level.","type":"boolean"},"enforcement":{"description":"The state of enforcement for this hook.","type":"string"},"environment":{"additionalProperties":true,"description":"The pre-receive environment where the script is executed.","properties":{},"type":"object"},"name":{"description":"The name of the hook.","type":"string"},"script":{"description":"The script that the hook runs.","type":"string"},"script_repository":{"additionalProperties":true,"description":"The GitHub repository where the script is kept.","properties":{},"type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/pre-receive-hook-2"}},"schema":{"$ref":"#/components/schemas/pre-receive-hook"}}},"description":"Response"}},"summary":"Update a pre-receive hook","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"previews":[{"name":"eye-scream","note":"APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```","required":true}],"subcategory":"pre-receive-hooks"}}},"/admin/tokens":{"get":{"description":"Lists personal access tokens for all users, including admin users.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#list-personal-access-tokens"},"operationId":"enterprise-admin/list-personal-access-tokens","parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/authorization-items"}},"schema":{"items":{"$ref":"#/components/schemas/authorization"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}},"summary":"List personal access tokens","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"subcategory":"users"}}},"/admin/tokens/{token_id}":{"delete":{"description":"Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#delete-a-personal-access-token"},"operationId":"enterprise-admin/delete-personal-access-token","parameters":[{"$ref":"#/components/parameters/token-id"}],"responses":{"204":{"description":"Response"}},"summary":"Delete a personal access token","tags":["enterprise-admin"],"x-github":{"category":"enterprise-admin","enabledForGitHubApps":false,"githubCloudOnly":false,"subcategory":"users"}}},"/admin/users":{"post":{"description":"If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user.\n\nThe login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `\"octo_cat\"` as the login, a user named `\"octo-cat\"` will be created.\n\nIf the login name or email address is already associated with an account, the server will return a `422` response.","externalDocs":{"description":"API method documentation","url":"https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#create-a-user"},"operationId":"enterprise-admin/create-user","requestBody":{"content":{"application/json":{"example":{"email":"octocat@github.com","login":"monalisa"},"schema":{"properties":{"email":{"description":"**Required for built-in authentication.** The user's email address. This parameter c