# GitHub API ## API Docs - meta [GitHub API Root](https://github.apifox.cn/api-5363076.md): Get Hypermedia links to resources accessible in GitHub's REST API - meta [Get GitHub Enterprise Server meta information](https://github.apifox.cn/api-5363077.md): - meta [Get Octocat](https://github.apifox.cn/api-5363078.md): Get the octocat as ASCII art - meta [Get the Zen of GitHub](https://github.apifox.cn/api-5363079.md): Get a random sentence from the Zen of GitHub - enterprise-admin [List global webhooks](https://github.apifox.cn/api-5363080.md): - enterprise-admin [Create a global webhook](https://github.apifox.cn/api-5363081.md): - enterprise-admin [Delete a global webhook](https://github.apifox.cn/api-5363082.md): - enterprise-admin [Get a global webhook](https://github.apifox.cn/api-5363083.md): - enterprise-admin [Update a global webhook](https://github.apifox.cn/api-5363084.md): Parameters that are not provided will be overwritten with the default value or removed if no default exists. - enterprise-admin [Ping a global webhook](https://github.apifox.cn/api-5363085.md): This will trigger a [ping event](https://docs.github.com/enterprise-server@2.22/webhooks/#ping-event) to be sent to the webhook. - enterprise-admin [List public keys](https://github.apifox.cn/api-5363086.md): - enterprise-admin [Delete a public key](https://github.apifox.cn/api-5363087.md): - enterprise-admin [Update LDAP mapping for a team](https://github.apifox.cn/api-5363088.md): 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. - enterprise-admin [Sync LDAP mapping for a team](https://github.apifox.cn/api-5363089.md): 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. - enterprise-admin [Update LDAP mapping for a user](https://github.apifox.cn/api-5363090.md): - enterprise-admin [Sync LDAP mapping for a user](https://github.apifox.cn/api-5363091.md): 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. - enterprise-admin [Create an organization](https://github.apifox.cn/api-5363092.md): - enterprise-admin [Update an organization name](https://github.apifox.cn/api-5363093.md): - enterprise-admin [List pre-receive environments](https://github.apifox.cn/api-5363094.md): - enterprise-admin [Create a pre-receive environment](https://github.apifox.cn/api-5363095.md): - enterprise-admin [Delete a pre-receive environment](https://github.apifox.cn/api-5363096.md): If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. - enterprise-admin [Get a pre-receive environment](https://github.apifox.cn/api-5363097.md): - enterprise-admin [Update a pre-receive environment](https://github.apifox.cn/api-5363098.md): You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. - enterprise-admin [Start a pre-receive environment download](https://github.apifox.cn/api-5363099.md): 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. - enterprise-admin [Get the download status for a pre-receive environment](https://github.apifox.cn/api-5363100.md): 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. - enterprise-admin [List pre-receive hooks](https://github.apifox.cn/api-5363101.md): - enterprise-admin [Create a pre-receive hook](https://github.apifox.cn/api-5363102.md): - enterprise-admin [Delete a pre-receive hook](https://github.apifox.cn/api-5363103.md): - enterprise-admin [Get a pre-receive hook](https://github.apifox.cn/api-5363104.md): - enterprise-admin [Update a pre-receive hook](https://github.apifox.cn/api-5363105.md): - enterprise-admin [List personal access tokens](https://github.apifox.cn/api-5363106.md): Lists personal access tokens for all users, including admin users. - enterprise-admin [Delete a personal access token](https://github.apifox.cn/api-5363107.md): 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. - enterprise-admin [Create a user](https://github.apifox.cn/api-5363108.md): 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. - enterprise-admin [Delete a user](https://github.apifox.cn/api-5363109.md): Deleting a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#suspend-a-user) is often a better option. - enterprise-admin [Update the username for a user](https://github.apifox.cn/api-5363110.md): - enterprise-admin [Delete an impersonation OAuth token](https://github.apifox.cn/api-5363111.md): - enterprise-admin [Create an impersonation OAuth token](https://github.apifox.cn/api-5363112.md): - enterprise-admin [Get license information](https://github.apifox.cn/api-5363113.md): - enterprise-admin [Get statistics](https://github.apifox.cn/api-5363114.md): There are a variety of types to choose from: - enterprise-admin [List self-hosted runner groups for an enterprise](https://github.apifox.cn/api-5363115.md): Lists all self-hosted runner groups for an enterprise. - enterprise-admin [Create a self-hosted runner group for an enterprise](https://github.apifox.cn/api-5363116.md): Creates a new self-hosted runner group for an enterprise. - enterprise-admin [Delete a self-hosted runner group from an enterprise](https://github.apifox.cn/api-5363117.md): Deletes a self-hosted runner group for an enterprise. - enterprise-admin [Get a self-hosted runner group for an enterprise](https://github.apifox.cn/api-5363118.md): Gets a specific self-hosted runner group for an enterprise. - enterprise-admin [Update a self-hosted runner group for an enterprise](https://github.apifox.cn/api-5363119.md): Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - enterprise-admin [List organization access to a self-hosted runner group in an enterprise](https://github.apifox.cn/api-5363120.md): Lists the organizations with access to a self-hosted runner group. - enterprise-admin [Set organization access for a self-hosted runner group in an enterprise](https://github.apifox.cn/api-5363121.md): Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - enterprise-admin [Remove organization access to a self-hosted runner group in an enterprise](https://github.apifox.cn/api-5363122.md): Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - enterprise-admin [Add organization access to a self-hosted runner group in an enterprise](https://github.apifox.cn/api-5363123.md): Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - enterprise-admin [List self-hosted runners in a group for an enterprise](https://github.apifox.cn/api-5363124.md): Lists the self-hosted runners that are in a specific enterprise group. - enterprise-admin [Set self-hosted runners in a group for an enterprise](https://github.apifox.cn/api-5363125.md): Replaces the list of self-hosted runners that are part of an enterprise runner group. - enterprise-admin [Remove a self-hosted runner from a group for an enterprise](https://github.apifox.cn/api-5363126.md): Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. - enterprise-admin [Add a self-hosted runner to a group for an enterprise](https://github.apifox.cn/api-5363127.md): Adds a self-hosted runner to a runner group configured in an enterprise. - enterprise-admin [List self-hosted runners for an enterprise](https://github.apifox.cn/api-5363128.md): Lists all self-hosted runners configured for an enterprise. - enterprise-admin [List runner applications for an enterprise](https://github.apifox.cn/api-5363129.md): Lists binaries for the runner application that you can download and run. - enterprise-admin [Create a registration token for an enterprise](https://github.apifox.cn/api-5363130.md): Returns a token that you can pass to the `config` script. The token expires after one hour. - enterprise-admin [Create a remove token for an enterprise](https://github.apifox.cn/api-5363131.md): Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - enterprise-admin [Delete a self-hosted runner from an enterprise](https://github.apifox.cn/api-5363132.md): Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - enterprise-admin [Get a self-hosted runner for an enterprise](https://github.apifox.cn/api-5363133.md): Gets a specific self-hosted runner configured in an enterprise. - enterprise-admin [List pre-receive hooks for an organization](https://github.apifox.cn/api-5363134.md): List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. - enterprise-admin [Remove pre-receive hook enforcement for an organization](https://github.apifox.cn/api-5363135.md): Removes any overrides for this hook at the org level for this org. - enterprise-admin [Get a pre-receive hook for an organization](https://github.apifox.cn/api-5363136.md): - enterprise-admin [Update pre-receive hook enforcement for an organization](https://github.apifox.cn/api-5363137.md): For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` - enterprise-admin [List pre-receive hooks for a repository](https://github.apifox.cn/api-5363138.md): List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. - enterprise-admin [Remove pre-receive hook enforcement for a repository](https://github.apifox.cn/api-5363139.md): Deletes any overridden enforcement on this repository for the specified hook. - enterprise-admin [Get a pre-receive hook for a repository](https://github.apifox.cn/api-5363140.md): - enterprise-admin [Update pre-receive hook enforcement for a repository](https://github.apifox.cn/api-5363141.md): For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` - enterprise-admin [Get the configuration status](https://github.apifox.cn/api-5363142.md): This endpoint allows you to check the status of the most recent configuration process: - enterprise-admin [Start a configuration process](https://github.apifox.cn/api-5363143.md): This endpoint allows you to start a configuration process at any time for your updated settings to take effect: - enterprise-admin [Get the maintenance status](https://github.apifox.cn/api-5363144.md): Check your installation's maintenance status: - enterprise-admin [Enable or disable maintenance mode](https://github.apifox.cn/api-5363145.md): The possible values for `enabled` are `true` and `false`. When it's `false`, the attribute `when` is ignored and the maintenance mode is turned off. `when` defines the time period when the maintenance was enabled. - enterprise-admin [Get settings](https://github.apifox.cn/api-5363146.md): - enterprise-admin [Set settings](https://github.apifox.cn/api-5363147.md): For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@2.22/rest/reference/enterprise-admin#get-settings). - enterprise-admin [Remove an authorized SSH key](https://github.apifox.cn/api-5363148.md): - enterprise-admin [Get all authorized SSH keys](https://github.apifox.cn/api-5363149.md): - enterprise-admin [Add an authorized SSH key](https://github.apifox.cn/api-5363150.md): - enterprise-admin [Create a GitHub license](https://github.apifox.cn/api-5363151.md): When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license: - enterprise-admin [Upgrade a license](https://github.apifox.cn/api-5363152.md): This API upgrades your license and also triggers the configuration process: - enterprise-admin [Demote a site administrator](https://github.apifox.cn/api-5363153.md): You can demote any user account except your own. - enterprise-admin [Promote a user to be a site administrator](https://github.apifox.cn/api-5363154.md): Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#http-verbs)." - enterprise-admin [Unsuspend a user](https://github.apifox.cn/api-5363155.md): If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://help.github.com/enterprise/admin/guides/user-management/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. - enterprise-admin [Suspend a user](https://github.apifox.cn/api-5363156.md): If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://help.github.com/enterprise/admin/guides/user-management/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. - apps [Get the authenticated app](https://github.apifox.cn/api-5363157.md): Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/enterprise-server@2.22/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. - apps [Create a GitHub App from a manifest](https://github.apifox.cn/api-5363158.md): Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. - apps [List installations for the authenticated app](https://github.apifox.cn/api-5363159.md): You must use a [JWT](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - apps [Delete an installation for the authenticated app](https://github.apifox.cn/api-5363160.md): Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/enterprise-server@2.22/rest/reference/apps/#suspend-an-app-installation)" endpoint. - apps [Get an installation for the authenticated app](https://github.apifox.cn/api-5363161.md): Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (`target_type`) will be either an organization or a user account, depending which account the repository belongs to. - apps [Create an installation access token for an app](https://github.apifox.cn/api-5363162.md): Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. - apps [Unsuspend an app installation](https://github.apifox.cn/api-5363163.md): Removes a GitHub App installation suspension. - apps [Suspend an app installation](https://github.apifox.cn/api-5363164.md): Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub Enterprise Server API or webhook events is blocked for that account. - apps [Delete an app authorization](https://github.apifox.cn/api-5363165.md): OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@2.22/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. - apps [Revoke a grant for an application](https://github.apifox.cn/api-5363166.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - apps [Delete an app token](https://github.apifox.cn/api-5363167.md): OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@2.22/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. - apps [Reset a token](https://github.apifox.cn/api-5363168.md): OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/enterprise-server@2.22/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. - apps [Check a token](https://github.apifox.cn/api-5363169.md): OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/enterprise-server@2.22/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. - apps [Revoke an authorization for an application](https://github.apifox.cn/api-5363170.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - apps [Check an authorization](https://github.apifox.cn/api-5363171.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - apps [Reset an authorization](https://github.apifox.cn/api-5363172.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). - apps [Get an app](https://github.apifox.cn/api-5363173.md): **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). - apps [List repositories accessible to the app installation](https://github.apifox.cn/api-5363174.md): List repositories that an app installation can access. - apps [Revoke an installation access token](https://github.apifox.cn/api-5363175.md): Revokes the installation token you're using to authenticate as an installation and access this endpoint. - apps [Get an organization installation for the authenticated app](https://github.apifox.cn/api-5363176.md): Enables an authenticated GitHub App to find the organization's installation information. - apps [Create a content attachment](https://github.apifox.cn/api-5363177.md): Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference) to create an attachment. - apps [Get a repository installation for the authenticated app](https://github.apifox.cn/api-5363178.md): Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. - apps [List app installations accessible to the user access token](https://github.apifox.cn/api-5363179.md): Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - apps [List repositories accessible to the user access token](https://github.apifox.cn/api-5363180.md): List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. - apps [Remove a repository from an app installation](https://github.apifox.cn/api-5363181.md): Remove a single repository from an installation. The authenticated user must have admin access to the repository. - apps [Add a repository to an app installation](https://github.apifox.cn/api-5363182.md): Add a single repository to an installation. The authenticated user must have admin access to the repository. - apps [Get a user installation for the authenticated app](https://github.apifox.cn/api-5363183.md): Enables an authenticated GitHub App to find the user’s installation information. - oauth-authorizations [List your grants](https://github.apifox.cn/api-5363184.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - oauth-authorizations [Delete a grant](https://github.apifox.cn/api-5363185.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - oauth-authorizations [Get a single grant](https://github.apifox.cn/api-5363186.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - oauth-authorizations [List your authorizations](https://github.apifox.cn/api-5363187.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - oauth-authorizations [Create a new authorization](https://github.apifox.cn/api-5363188.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - oauth-authorizations [Get-or-create an authorization for a specific app](https://github.apifox.cn/api-5363189.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - oauth-authorizations [Get-or-create an authorization for a specific app and fingerprint](https://github.apifox.cn/api-5363190.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - oauth-authorizations [Delete an authorization](https://github.apifox.cn/api-5363191.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - oauth-authorizations [Get a single authorization](https://github.apifox.cn/api-5363192.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - oauth-authorizations [Update an existing authorization](https://github.apifox.cn/api-5363193.md): **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@2.22/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@2.22/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - codes-of-conduct [Get all codes of conduct](https://github.apifox.cn/api-5363194.md): - codes-of-conduct [Get a code of conduct](https://github.apifox.cn/api-5363195.md): - emojis [Get emojis](https://github.apifox.cn/api-5363196.md): Lists all the emojis available to use on GitHub Enterprise Server. - activity [List public events](https://github.apifox.cn/api-5363197.md): We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. - activity [Get feeds](https://github.apifox.cn/api-5363198.md): GitHub Enterprise Server provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: - activity [List public events for a network of repositories](https://github.apifox.cn/api-5363199.md): - activity [List notifications for the authenticated user](https://github.apifox.cn/api-5363200.md): List all notifications for the current user, sorted by most recently updated. - activity [Mark notifications as read](https://github.apifox.cn/api-5363201.md): Marks all notifications as "read" removes it from the [default view on GitHub Enterprise Server](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/enterprise-server@2.22/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. - activity [Get a thread](https://github.apifox.cn/api-5363202.md): - activity [Mark a thread as read](https://github.apifox.cn/api-5363203.md): - activity [Delete a thread subscription](https://github.apifox.cn/api-5363204.md): Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/enterprise-server@2.22/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. - activity [Get a thread subscription for the authenticated user](https://github.apifox.cn/api-5363205.md): This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@2.22/rest/reference/activity#get-a-repository-subscription). - activity [Set a thread subscription](https://github.apifox.cn/api-5363206.md): If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. - activity [List public organization events](https://github.apifox.cn/api-5363207.md): - activity [List repository events](https://github.apifox.cn/api-5363208.md): - activity [List repository notifications for the authenticated user](https://github.apifox.cn/api-5363209.md): List all notifications for the current user. - activity [Mark repository notifications as read](https://github.apifox.cn/api-5363210.md): Marks all notifications in a repository as "read" removes them from the [default view on GitHub Enterprise Server](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/enterprise-server@2.22/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. - activity [List stargazers](https://github.apifox.cn/api-5363211.md): Lists the people that have starred the repository. - activity [List watchers](https://github.apifox.cn/api-5363212.md): Lists the people watching the specified repository. - activity [Delete a repository subscription](https://github.apifox.cn/api-5363213.md): This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/enterprise-server@2.22/rest/reference/activity#set-a-repository-subscription). - activity [Get a repository subscription](https://github.apifox.cn/api-5363214.md): - activity [Set a repository subscription](https://github.apifox.cn/api-5363215.md): If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/enterprise-server@2.22/rest/reference/activity#delete-a-repository-subscription) completely. - activity [List repositories starred by the authenticated user](https://github.apifox.cn/api-5363216.md): Lists repositories the authenticated user has starred. - activity [Unstar a repository for the authenticated user](https://github.apifox.cn/api-5363217.md): - activity [Check if a repository is starred by the authenticated user](https://github.apifox.cn/api-5363218.md): - activity [Star a repository for the authenticated user](https://github.apifox.cn/api-5363219.md): Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#http-verbs)." - activity [List repositories watched by the authenticated user](https://github.apifox.cn/api-5363220.md): Lists repositories the authenticated user is watching. - activity [List events for the authenticated user](https://github.apifox.cn/api-5363221.md): If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. - activity [List organization events for the authenticated user](https://github.apifox.cn/api-5363222.md): This is the user's organization dashboard. You must be authenticated as the user to view this. - activity [List public events for a user](https://github.apifox.cn/api-5363223.md): - activity [List events received by the authenticated user](https://github.apifox.cn/api-5363224.md): These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. - activity [List public events received by a user](https://github.apifox.cn/api-5363225.md): - activity [List repositories starred by a user](https://github.apifox.cn/api-5363226.md): Lists repositories a user has starred. - activity [List repositories watched by a user](https://github.apifox.cn/api-5363227.md): Lists repositories a user is watching. - gists [List gists for the authenticated user](https://github.apifox.cn/api-5363228.md): Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: - gists [Create a gist](https://github.apifox.cn/api-5363229.md): Allows you to add a new gist with one or more files. - gists [List public gists](https://github.apifox.cn/api-5363230.md): List public gists sorted by most recently updated to least recently updated. - gists [List starred gists](https://github.apifox.cn/api-5363231.md): List the authenticated user's starred gists: - gists [Delete a gist](https://github.apifox.cn/api-5363232.md): - gists [Get a gist](https://github.apifox.cn/api-5363233.md): - gists [Update a gist](https://github.apifox.cn/api-5363234.md): Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. - gists [List gist comments](https://github.apifox.cn/api-5363235.md): - gists [Create a gist comment](https://github.apifox.cn/api-5363236.md): - gists [Delete a gist comment](https://github.apifox.cn/api-5363237.md): - gists [Get a gist comment](https://github.apifox.cn/api-5363238.md): - gists [Update a gist comment](https://github.apifox.cn/api-5363239.md): - gists [List gist commits](https://github.apifox.cn/api-5363240.md): - gists [List gist forks](https://github.apifox.cn/api-5363241.md): - gists [Fork a gist](https://github.apifox.cn/api-5363242.md): **Note**: This was previously `/gists/:gist_id/fork`. - gists [Unstar a gist](https://github.apifox.cn/api-5363243.md): - gists [Check if a gist is starred](https://github.apifox.cn/api-5363244.md): - gists [Star a gist](https://github.apifox.cn/api-5363245.md): Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#http-verbs)." - gists [Get a gist revision](https://github.apifox.cn/api-5363246.md): - gists [List gists for a user](https://github.apifox.cn/api-5363247.md): Lists public gists for the specified user: - gitignore [Get all gitignore templates](https://github.apifox.cn/api-5363248.md): List all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-server@2.22/rest/reference/repos#create-a-repository-for-the-authenticated-user). - gitignore [Get a gitignore template](https://github.apifox.cn/api-5363249.md): The API also allows fetching the source of a single template. - issues [List issues assigned to the authenticated user](https://github.apifox.cn/api-5363250.md): List issues assigned to the authenticated user across all visible repositories including owned repositories, member - issues [List organization issues assigned to the authenticated user](https://github.apifox.cn/api-5363251.md): List issues in an organization assigned to the authenticated user. - issues [List assignees](https://github.apifox.cn/api-5363252.md): Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. - issues [Check if a user can be assigned](https://github.apifox.cn/api-5363253.md): Checks if a user has permission to be assigned to an issue in this repository. - issues [List repository issues](https://github.apifox.cn/api-5363254.md): List issues in a repository. - issues [Create an issue](https://github.apifox.cn/api-5363255.md): Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. - issues [List issue comments for a repository](https://github.apifox.cn/api-5363256.md): By default, Issue Comments are ordered by ascending ID. - issues [Delete an issue comment](https://github.apifox.cn/api-5363257.md): - issues [Get an issue comment](https://github.apifox.cn/api-5363258.md): - issues [Update an issue comment](https://github.apifox.cn/api-5363259.md): - issues [List issue events for a repository](https://github.apifox.cn/api-5363260.md): - issues [Get an issue event](https://github.apifox.cn/api-5363261.md): - issues [Get an issue](https://github.apifox.cn/api-5363262.md): The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was - issues [Update an issue](https://github.apifox.cn/api-5363263.md): Issue owners and users with push access can edit an issue. - issues [Remove assignees from an issue](https://github.apifox.cn/api-5363264.md): Removes one or more assignees from an issue. - issues [Add assignees to an issue](https://github.apifox.cn/api-5363265.md): Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. - issues [List issue comments](https://github.apifox.cn/api-5363266.md): Issue Comments are ordered by ascending ID. - issues [Create an issue comment](https://github.apifox.cn/api-5363267.md): This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. - issues [List issue events](https://github.apifox.cn/api-5363268.md): - issues [Remove all labels from an issue](https://github.apifox.cn/api-5363269.md): - issues [List labels for an issue](https://github.apifox.cn/api-5363270.md): - issues [Add labels to an issue](https://github.apifox.cn/api-5363271.md): - issues [Set labels for an issue](https://github.apifox.cn/api-5363272.md): Removes any previous labels and sets the new labels for an issue. - issues [Remove a label from an issue](https://github.apifox.cn/api-5363273.md): Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. - issues [Unlock an issue](https://github.apifox.cn/api-5363274.md): Users with push access can unlock an issue's conversation. - issues [Lock an issue](https://github.apifox.cn/api-5363275.md): Users with push access can lock an issue or pull request's conversation. - issues [List timeline events for an issue](https://github.apifox.cn/api-5363276.md): - issues [List labels for a repository](https://github.apifox.cn/api-5363277.md): - issues [Create a label](https://github.apifox.cn/api-5363278.md): - issues [Delete a label](https://github.apifox.cn/api-5363279.md): - issues [Get a label](https://github.apifox.cn/api-5363280.md): - issues [Update a label](https://github.apifox.cn/api-5363281.md): - issues [List milestones](https://github.apifox.cn/api-5363282.md): - issues [Create a milestone](https://github.apifox.cn/api-5363283.md): - issues [Delete a milestone](https://github.apifox.cn/api-5363284.md): - issues [Get a milestone](https://github.apifox.cn/api-5363285.md): - issues [Update a milestone](https://github.apifox.cn/api-5363286.md): - issues [List labels for issues in a milestone](https://github.apifox.cn/api-5363287.md): - issues [List user account issues assigned to the authenticated user](https://github.apifox.cn/api-5363288.md): List issues across owned and member repositories assigned to the authenticated user. - licenses [Get all commonly used licenses](https://github.apifox.cn/api-5363289.md): - licenses [Get a license](https://github.apifox.cn/api-5363290.md): - licenses [Get the license for a repository](https://github.apifox.cn/api-5363291.md): This method returns the contents of the repository's license file, if one is detected. - markdown [Render a Markdown document](https://github.apifox.cn/api-5363292.md): - markdown [Render a Markdown document in raw mode](https://github.apifox.cn/api-5363293.md): You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. - orgs [List organizations](https://github.apifox.cn/api-5363294.md): Lists all organizations, in the order that they were created on GitHub Enterprise Server. - orgs [Get an organization](https://github.apifox.cn/api-5363295.md): To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). - orgs [Update an organization](https://github.apifox.cn/api-5363296.md): **Parameter Deprecation Notice:** GitHub Enterprise Server will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). - orgs [List organization webhooks](https://github.apifox.cn/api-5363297.md): - orgs [Create an organization webhook](https://github.apifox.cn/api-5363298.md): Here's how you can create a hook that posts payloads in JSON format: - orgs [Delete an organization webhook](https://github.apifox.cn/api-5363299.md): - orgs [Get an organization webhook](https://github.apifox.cn/api-5363300.md): Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." - orgs [Update an organization webhook](https://github.apifox.cn/api-5363301.md): Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." - orgs [Ping an organization webhook](https://github.apifox.cn/api-5363302.md): This will trigger a [ping event](https://docs.github.com/enterprise-server@2.22/webhooks/#ping-event) to be sent to the hook. - orgs [List app installations for an organization](https://github.apifox.cn/api-5363303.md): Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. - orgs [List organization members](https://github.apifox.cn/api-5363304.md): List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. - orgs [Remove an organization member](https://github.apifox.cn/api-5363305.md): Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. - orgs [Check organization membership for a user](https://github.apifox.cn/api-5363306.md): Check if a user is, publicly or privately, a member of the organization. - orgs [Remove organization membership for a user](https://github.apifox.cn/api-5363307.md): In order to remove a user's membership with an organization, the authenticated user must be an organization owner. - orgs [Get organization membership for a user](https://github.apifox.cn/api-5363308.md): In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. - orgs [Set organization membership for a user](https://github.apifox.cn/api-5363309.md): Only authenticated organization owners can add a member to the organization or update the member's role. - orgs [List outside collaborators for an organization](https://github.apifox.cn/api-5363310.md): List all users who are outside collaborators of an organization. - orgs [Remove outside collaborator from an organization](https://github.apifox.cn/api-5363311.md): Removing a user from this list will remove them from all the organization's repositories. - orgs [Convert an organization member to outside collaborator](https://github.apifox.cn/api-5363312.md): When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". - orgs [List public organization members](https://github.apifox.cn/api-5363313.md): Members of an organization can choose to have their membership publicized or not. - orgs [Remove public organization membership for the authenticated user](https://github.apifox.cn/api-5363314.md): - orgs [Check public organization membership for a user](https://github.apifox.cn/api-5363315.md): - orgs [Set public organization membership for the authenticated user](https://github.apifox.cn/api-5363316.md): The user can publicize their own membership. (A user cannot publicize the membership for another user.) - orgs [List organization memberships for the authenticated user](https://github.apifox.cn/api-5363317.md): - orgs [Get an organization membership for the authenticated user](https://github.apifox.cn/api-5363318.md): - orgs [Update an organization membership for the authenticated user](https://github.apifox.cn/api-5363319.md): - orgs [List organizations for the authenticated user](https://github.apifox.cn/api-5363320.md): List organizations for the authenticated user. - orgs [List organizations for a user](https://github.apifox.cn/api-5363321.md): List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. - actions [List self-hosted runner groups for an organization](https://github.apifox.cn/api-5363322.md): Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. - actions [Create a self-hosted runner group for an organization](https://github.apifox.cn/api-5363323.md): The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - actions [Delete a self-hosted runner group from an organization](https://github.apifox.cn/api-5363324.md): Deletes a self-hosted runner group for an organization. - actions [Get a self-hosted runner group for an organization](https://github.apifox.cn/api-5363325.md): Gets a specific self-hosted runner group for an organization. - actions [Update a self-hosted runner group for an organization](https://github.apifox.cn/api-5363326.md): Updates the `name` and `visibility` of a self-hosted runner group in an organization. - actions [List repository access to a self-hosted runner group in an organization](https://github.apifox.cn/api-5363327.md): The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - actions [Set repository access for a self-hosted runner group in an organization](https://github.apifox.cn/api-5363328.md): Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. - actions [Remove repository access to a self-hosted runner group in an organization](https://github.apifox.cn/api-5363329.md): Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - actions [Add repository access to a self-hosted runner group in an organization](https://github.apifox.cn/api-5363330.md): Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." - actions [List self-hosted runners in a group for an organization](https://github.apifox.cn/api-5363331.md): Lists self-hosted runners that are in a specific organization group. - actions [Set self-hosted runners in a group for an organization](https://github.apifox.cn/api-5363332.md): Replaces the list of self-hosted runners that are part of an organization runner group. - actions [Remove a self-hosted runner from a group for an organization](https://github.apifox.cn/api-5363333.md): Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. - actions [Add a self-hosted runner to a group for an organization](https://github.apifox.cn/api-5363334.md): Adds a self-hosted runner to a runner group configured in an organization. - actions [List self-hosted runners for an organization](https://github.apifox.cn/api-5363335.md): Lists all self-hosted runners configured in an organization. - actions [List runner applications for an organization](https://github.apifox.cn/api-5363336.md): Lists binaries for the runner application that you can download and run. - actions [Create a registration token for an organization](https://github.apifox.cn/api-5363337.md): Returns a token that you can pass to the `config` script. The token expires after one hour. - actions [Create a remove token for an organization](https://github.apifox.cn/api-5363338.md): Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. - actions [Delete a self-hosted runner from an organization](https://github.apifox.cn/api-5363339.md): Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - actions [Get a self-hosted runner for an organization](https://github.apifox.cn/api-5363340.md): Gets a specific self-hosted runner configured in an organization. - actions [List organization secrets](https://github.apifox.cn/api-5363341.md): Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. - actions [Get an organization public key](https://github.apifox.cn/api-5363342.md): Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. - actions [Delete an organization secret](https://github.apifox.cn/api-5363343.md): Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. - actions [Get an organization secret](https://github.apifox.cn/api-5363344.md): Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. - actions [Create or update an organization secret](https://github.apifox.cn/api-5363345.md): Creates or updates an organization secret with an encrypted value. Encrypt your secret using - actions [List selected repositories for an organization secret](https://github.apifox.cn/api-5363346.md): Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. - actions [Set selected repositories for an organization secret](https://github.apifox.cn/api-5363347.md): Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/enterprise-server@2.22/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. - actions [Remove selected repository from an organization secret](https://github.apifox.cn/api-5363348.md): Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/enterprise-server@2.22/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. - actions [Add selected repository to an organization secret](https://github.apifox.cn/api-5363349.md): Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/enterprise-server@2.22/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. - actions [List artifacts for a repository](https://github.apifox.cn/api-5363350.md): Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - actions [Delete an artifact](https://github.apifox.cn/api-5363351.md): Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - actions [Get an artifact](https://github.apifox.cn/api-5363352.md): Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - actions [Download an artifact](https://github.apifox.cn/api-5363353.md): Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in - actions [Get a job for a workflow run](https://github.apifox.cn/api-5363354.md): Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - actions [Download job logs for a workflow run](https://github.apifox.cn/api-5363355.md): Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look - actions [List self-hosted runners for a repository](https://github.apifox.cn/api-5363356.md): Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. - actions [List runner applications for a repository](https://github.apifox.cn/api-5363357.md): Lists binaries for the runner application that you can download and run. - actions [Create a registration token for a repository](https://github.apifox.cn/api-5363358.md): Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate - actions [Create a remove token for a repository](https://github.apifox.cn/api-5363359.md): Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. - actions [Delete a self-hosted runner from a repository](https://github.apifox.cn/api-5363360.md): Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - actions [Get a self-hosted runner for a repository](https://github.apifox.cn/api-5363361.md): Gets a specific self-hosted runner configured in a repository. - actions [List workflow runs for a repository](https://github.apifox.cn/api-5363362.md): Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#parameters). - actions [Delete a workflow run](https://github.apifox.cn/api-5363363.md): Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is - actions [Get a workflow run](https://github.apifox.cn/api-5363364.md): Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - actions [List workflow run artifacts](https://github.apifox.cn/api-5363365.md): Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - actions [Cancel a workflow run](https://github.apifox.cn/api-5363366.md): Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - actions [List jobs for a workflow run](https://github.apifox.cn/api-5363367.md): Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#parameters). - actions [Delete workflow run logs](https://github.apifox.cn/api-5363368.md): Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - actions [Download workflow run logs](https://github.apifox.cn/api-5363369.md): Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for - actions [Re-run a workflow](https://github.apifox.cn/api-5363370.md): Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - actions [List repository secrets](https://github.apifox.cn/api-5363371.md): Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. - actions [Get a repository public key](https://github.apifox.cn/api-5363372.md): Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. - actions [Delete a repository secret](https://github.apifox.cn/api-5363373.md): Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. - actions [Get a repository secret](https://github.apifox.cn/api-5363374.md): Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. - actions [Create or update a repository secret](https://github.apifox.cn/api-5363375.md): Creates or updates a repository secret with an encrypted value. Encrypt your secret using - actions [List repository workflows](https://github.apifox.cn/api-5363376.md): Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - actions [Get a workflow](https://github.apifox.cn/api-5363377.md): Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - actions [Create a workflow dispatch event](https://github.apifox.cn/api-5363378.md): You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - actions [List workflow runs](https://github.apifox.cn/api-5363379.md): List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#parameters). - projects [List organization projects](https://github.apifox.cn/api-5363380.md): Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - projects [Create an organization project](https://github.apifox.cn/api-5363381.md): Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - projects [Delete a project card](https://github.apifox.cn/api-5363382.md): - projects [Get a project card](https://github.apifox.cn/api-5363383.md): - projects [Update an existing project card](https://github.apifox.cn/api-5363384.md): - projects [Move a project card](https://github.apifox.cn/api-5363385.md): - projects [Delete a project column](https://github.apifox.cn/api-5363386.md): - projects [Get a project column](https://github.apifox.cn/api-5363387.md): - projects [Update an existing project column](https://github.apifox.cn/api-5363388.md): - projects [List project cards](https://github.apifox.cn/api-5363389.md): - projects [Create a project card](https://github.apifox.cn/api-5363390.md): - projects [Move a project column](https://github.apifox.cn/api-5363391.md): - projects [Delete a project](https://github.apifox.cn/api-5363392.md): Deletes a project board. Returns a `404 Not Found` status if projects are disabled. - projects [Get a project](https://github.apifox.cn/api-5363393.md): Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - projects [Update a project](https://github.apifox.cn/api-5363394.md): Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - projects [List project collaborators](https://github.apifox.cn/api-5363395.md): Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. - projects [Remove user as a collaborator](https://github.apifox.cn/api-5363396.md): Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. - projects [Add project collaborator](https://github.apifox.cn/api-5363397.md): Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. - projects [Get project permission for a user](https://github.apifox.cn/api-5363398.md): Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. - projects [List project columns](https://github.apifox.cn/api-5363399.md): - projects [Create a project column](https://github.apifox.cn/api-5363400.md): - projects [List repository projects](https://github.apifox.cn/api-5363401.md): Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - projects [Create a repository project](https://github.apifox.cn/api-5363402.md): Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - projects [Create a user project](https://github.apifox.cn/api-5363403.md): - projects [List user projects](https://github.apifox.cn/api-5363404.md): - repos [List organization repositories](https://github.apifox.cn/api-5363405.md): Lists repositories for the specified organization. - repos [Create an organization repository](https://github.apifox.cn/api-5363406.md): Creates a new repository in the specified organization. The authenticated user must be a member of the organization. - repos [Delete a repository](https://github.apifox.cn/api-5363407.md): Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. - repos [Get a repository](https://github.apifox.cn/api-5363408.md): When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file. - repos [Update a repository](https://github.apifox.cn/api-5363409.md): **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@2.22/rest/reference/repos#replace-all-repository-topics) endpoint. - repos [List branches](https://github.apifox.cn/api-5363410.md): - repos [Get a branch](https://github.apifox.cn/api-5363411.md): - repos [Delete branch protection](https://github.apifox.cn/api-5363412.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get branch protection](https://github.apifox.cn/api-5363413.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Update branch protection](https://github.apifox.cn/api-5363414.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Delete admin branch protection](https://github.apifox.cn/api-5363415.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get admin branch protection](https://github.apifox.cn/api-5363416.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Set admin branch protection](https://github.apifox.cn/api-5363417.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Delete pull request review protection](https://github.apifox.cn/api-5363418.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get pull request review protection](https://github.apifox.cn/api-5363419.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Update pull request review protection](https://github.apifox.cn/api-5363420.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Delete commit signature protection](https://github.apifox.cn/api-5363421.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get commit signature protection](https://github.apifox.cn/api-5363422.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Create commit signature protection](https://github.apifox.cn/api-5363423.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Remove status check protection](https://github.apifox.cn/api-5363424.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get status checks protection](https://github.apifox.cn/api-5363425.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Update status check protection](https://github.apifox.cn/api-5363426.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Remove status check contexts](https://github.apifox.cn/api-5363427.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get all status check contexts](https://github.apifox.cn/api-5363428.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Add status check contexts](https://github.apifox.cn/api-5363429.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Set status check contexts](https://github.apifox.cn/api-5363430.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Delete access restrictions](https://github.apifox.cn/api-5363431.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get access restrictions](https://github.apifox.cn/api-5363432.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Remove app access restrictions](https://github.apifox.cn/api-5363433.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get apps with access to the protected branch](https://github.apifox.cn/api-5363434.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Add app access restrictions](https://github.apifox.cn/api-5363435.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Set app access restrictions](https://github.apifox.cn/api-5363436.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Remove team access restrictions](https://github.apifox.cn/api-5363437.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get teams with access to the protected branch](https://github.apifox.cn/api-5363438.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Add team access restrictions](https://github.apifox.cn/api-5363439.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Set team access restrictions](https://github.apifox.cn/api-5363441.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Remove user access restrictions](https://github.apifox.cn/api-5363442.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Get users with access to the protected branch](https://github.apifox.cn/api-5363443.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Add user access restrictions](https://github.apifox.cn/api-5363444.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [Set user access restrictions](https://github.apifox.cn/api-5363445.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [List repository collaborators](https://github.apifox.cn/api-5363446.md): For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - repos [Remove a repository collaborator](https://github.apifox.cn/api-5363447.md): - repos [Check if a user is a repository collaborator](https://github.apifox.cn/api-5363448.md): For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - repos [Add a repository collaborator](https://github.apifox.cn/api-5363449.md): This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - repos [Get repository permissions for a user](https://github.apifox.cn/api-5363450.md): Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. - repos [List commit comments for a repository](https://github.apifox.cn/api-5363451.md): Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@2.22/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types/). - repos [Delete a commit comment](https://github.apifox.cn/api-5363452.md): - repos [Get a commit comment](https://github.apifox.cn/api-5363453.md): - repos [Update a commit comment](https://github.apifox.cn/api-5363454.md): - repos [List commits](https://github.apifox.cn/api-5363455.md): **Signature verification object** - repos [List branches for HEAD commit](https://github.apifox.cn/api-5363456.md): Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - repos [List commit comments](https://github.apifox.cn/api-5363457.md): Use the `:commit_sha` to specify the commit that will have its comments listed. - repos [Create a commit comment](https://github.apifox.cn/api-5363458.md): Create a comment for a commit using its `:commit_sha`. - repos [List pull requests associated with a commit](https://github.apifox.cn/api-5363459.md): Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/enterprise-server@2.22/rest/reference/pulls#list-pull-requests) endpoint. - repos [Get a commit](https://github.apifox.cn/api-5363460.md): Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - repos [Get the combined status for a specific reference](https://github.apifox.cn/api-5363461.md): Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. - repos [List commit statuses for a reference](https://github.apifox.cn/api-5363462.md): Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. - repos [Compare two commits](https://github.apifox.cn/api-5363463.md): The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. - repos [Delete a file](https://github.apifox.cn/api-5363464.md): Deletes a file in a repository. - repos [Get repository content](https://github.apifox.cn/api-5363465.md): Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit - repos [Create or update file contents](https://github.apifox.cn/api-5363466.md): Creates a new file or replaces an existing file in a repository. - repos [List repository contributors](https://github.apifox.cn/api-5363467.md): Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. - repos [List deployments](https://github.apifox.cn/api-5363468.md): Simple filtering of deployments is available via query parameters: - repos [Create a deployment](https://github.apifox.cn/api-5363469.md): Deployments offer a few configurable parameters with certain defaults. - repos [Delete a deployment](https://github.apifox.cn/api-5363470.md): To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive deployment. - repos [Get a deployment](https://github.apifox.cn/api-5363471.md): - repos [List deployment statuses](https://github.apifox.cn/api-5363472.md): Users with pull access can view deployment statuses for a deployment: - repos [Create a deployment status](https://github.apifox.cn/api-5363473.md): Users with `push` access can create deployment statuses for a given deployment. - repos [Get a deployment status](https://github.apifox.cn/api-5363474.md): Users with pull access can view a deployment status for a deployment: - repos [Create a repository dispatch event](https://github.apifox.cn/api-5363475.md): You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#repository_dispatch)." - repos [List forks](https://github.apifox.cn/api-5363476.md): - repos [Create a fork](https://github.apifox.cn/api-5363477.md): Create a fork for the authenticated user. - repos [List repository webhooks](https://github.apifox.cn/api-5363478.md): - repos [Create a repository webhook](https://github.apifox.cn/api-5363479.md): Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can - repos [Delete a repository webhook](https://github.apifox.cn/api-5363480.md): - repos [Get a repository webhook](https://github.apifox.cn/api-5363481.md): Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." - repos [Update a repository webhook](https://github.apifox.cn/api-5363482.md): Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." - repos [Ping a repository webhook](https://github.apifox.cn/api-5363483.md): This will trigger a [ping event](https://docs.github.com/enterprise-server@2.22/webhooks/#ping-event) to be sent to the hook. - repos [Test the push repository webhook](https://github.apifox.cn/api-5363484.md): This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. - repos [List repository invitations](https://github.apifox.cn/api-5363485.md): When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. - repos [Delete a repository invitation](https://github.apifox.cn/api-5363486.md): - repos [Update a repository invitation](https://github.apifox.cn/api-5363487.md): - repos [List deploy keys](https://github.apifox.cn/api-5363488.md): - repos [Create a deploy key](https://github.apifox.cn/api-5363489.md): You can create a read-only deploy key. - repos [Delete a deploy key](https://github.apifox.cn/api-5363490.md): Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. - repos [Get a deploy key](https://github.apifox.cn/api-5363491.md): - repos [List repository languages](https://github.apifox.cn/api-5363492.md): Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. - repos [Merge a branch](https://github.apifox.cn/api-5363493.md): - repos [Delete a GitHub Enterprise Server Pages site](https://github.apifox.cn/api-5363494.md): - repos [Get a GitHub Enterprise Server Pages site](https://github.apifox.cn/api-5363495.md): - repos [Create a GitHub Enterprise Server Pages site](https://github.apifox.cn/api-5363496.md): Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." - repos [Update information about a GitHub Enterprise Server Pages site](https://github.apifox.cn/api-5363497.md): Updates information for a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). - repos [List GitHub Enterprise Server Pages builds](https://github.apifox.cn/api-5363498.md): - repos [Request a GitHub Enterprise Server Pages build](https://github.apifox.cn/api-5363499.md): You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. - repos [Get latest Pages build](https://github.apifox.cn/api-5363500.md): - repos [Get GitHub Enterprise Server Pages build](https://github.apifox.cn/api-5363501.md): - repos [Get a repository README](https://github.apifox.cn/api-5363502.md): Gets the preferred README for a repository. - repos [Get a repository README for a directory](https://github.apifox.cn/api-5363503.md): Gets the README from a repository directory. - repos [List releases](https://github.apifox.cn/api-5363504.md): This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/enterprise-server@2.22/rest/reference/repos#list-repository-tags). - repos [Create a release](https://github.apifox.cn/api-5363505.md): Users with push access to the repository can create a release. - repos [Delete a release asset](https://github.apifox.cn/api-5363506.md): - repos [Get a release asset](https://github.apifox.cn/api-5363507.md): To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. - repos [Update a release asset](https://github.apifox.cn/api-5363508.md): Users with push access to the repository can edit a release asset. - repos [Get the latest release](https://github.apifox.cn/api-5363509.md): View the latest published full release for the repository. - repos [Get a release by tag name](https://github.apifox.cn/api-5363510.md): Get a published release with the specified tag. - repos [Delete a release](https://github.apifox.cn/api-5363511.md): Users with push access to the repository can delete a release. - repos [Get a release](https://github.apifox.cn/api-5363512.md): **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#hypermedia). - repos [Update a release](https://github.apifox.cn/api-5363513.md): Users with push access to the repository can edit a release. - repos [List release assets](https://github.apifox.cn/api-5363514.md): - repos [Upload a release asset](https://github.apifox.cn/api-5363515.md): This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - repos [Get the weekly commit activity](https://github.apifox.cn/api-5363516.md): Returns a weekly aggregate of the number of additions and deletions pushed to a repository. - repos [Get the last year of commit activity](https://github.apifox.cn/api-5363517.md): Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. - repos [Get all contributor commit activity](https://github.apifox.cn/api-5363518.md): - repos [Get the weekly commit count](https://github.apifox.cn/api-5363519.md): Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. - repos [Get the hourly commit count for each day](https://github.apifox.cn/api-5363520.md): Each array contains the day number, hour number, and number of commits: - repos [Create a commit status](https://github.apifox.cn/api-5363521.md): Users with push access in a repository can create commit statuses for a given SHA. - repos [List repository tags](https://github.apifox.cn/api-5363522.md): - repos [Download a repository archive (tar)](https://github.apifox.cn/api-5363523.md): Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually - repos [List repository teams](https://github.apifox.cn/api-5363524.md): - repos [Get all repository topics](https://github.apifox.cn/api-5363525.md): - repos [Replace all repository topics](https://github.apifox.cn/api-5363526.md): - repos [Transfer a repository](https://github.apifox.cn/api-5363527.md): A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/). - repos [Download a repository archive (zip)](https://github.apifox.cn/api-5363528.md): Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually - repos [Create a repository using a template](https://github.apifox.cn/api-5363529.md): Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/enterprise-server@2.22/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - repos [List public repositories](https://github.apifox.cn/api-5363530.md): Lists all public repositories in the order that they were created. - repos [List repositories for the authenticated user](https://github.apifox.cn/api-5363531.md): Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - repos [Create a repository for the authenticated user](https://github.apifox.cn/api-5363532.md): Creates a new repository for the authenticated user. - repos [List repository invitations for the authenticated user](https://github.apifox.cn/api-5363533.md): When authenticating as a user, this endpoint will list all currently open repository invitations for that user. - repos [Decline a repository invitation](https://github.apifox.cn/api-5363534.md): - repos [Accept a repository invitation](https://github.apifox.cn/api-5363535.md): - repos [List repositories for a user](https://github.apifox.cn/api-5363536.md): Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. - teams [List teams](https://github.apifox.cn/api-5363537.md): Lists all teams in an organization that are visible to the authenticated user. - teams [Create a team](https://github.apifox.cn/api-5363538.md): To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." - teams [Delete a team](https://github.apifox.cn/api-5363539.md): To delete a team, the authenticated user must be an organization owner or team maintainer. - teams [Get a team by name](https://github.apifox.cn/api-5363540.md): Gets a team using the team's `slug`. GitHub Enterprise Server generates the `slug` from the team `name`. - teams [Update a team](https://github.apifox.cn/api-5363541.md): To edit a team, the authenticated user must either be an organization owner or a team maintainer. - teams [List discussions](https://github.apifox.cn/api-5363542.md): List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [Create a discussion](https://github.apifox.cn/api-5363543.md): Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [Delete a discussion](https://github.apifox.cn/api-5363544.md): Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [Get a discussion](https://github.apifox.cn/api-5363545.md): Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [Update a discussion](https://github.apifox.cn/api-5363546.md): Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [List discussion comments](https://github.apifox.cn/api-5363547.md): List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [Create a discussion comment](https://github.apifox.cn/api-5363548.md): Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [Delete a discussion comment](https://github.apifox.cn/api-5363549.md): Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [Get a discussion comment](https://github.apifox.cn/api-5363550.md): Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [Update a discussion comment](https://github.apifox.cn/api-5363551.md): Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - teams [List team members](https://github.apifox.cn/api-5363552.md): Team members will include the members of child teams. - teams [Remove team membership for a user](https://github.apifox.cn/api-5363553.md): Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - teams [Get team membership for a user](https://github.apifox.cn/api-5363554.md): Team members will include the members of child teams. - teams [Add or update team membership for a user](https://github.apifox.cn/api-5363555.md): Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - teams [List team projects](https://github.apifox.cn/api-5363556.md): Lists the organization projects for a team. - teams [Remove a project from a team](https://github.apifox.cn/api-5363557.md): Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. - teams [Check team permissions for a project](https://github.apifox.cn/api-5363558.md): Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - teams [Add or update team project permissions](https://github.apifox.cn/api-5363559.md): Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. - teams [List team repositories](https://github.apifox.cn/api-5363560.md): Lists a team's repositories visible to the authenticated user. - teams [Remove a repository from a team](https://github.apifox.cn/api-5363561.md): If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. - teams [Check team permissions for a repository](https://github.apifox.cn/api-5363562.md): Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. - teams [Add or update team repository permissions](https://github.apifox.cn/api-5363563.md): To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#http-verbs)." - teams [List child teams](https://github.apifox.cn/api-5363564.md): Lists the child teams of the team specified by `{team_slug}`. - teams [Delete a team (Legacy)](https://github.apifox.cn/api-5363565.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#delete-a-team) endpoint. - teams [Get a team (Legacy)](https://github.apifox.cn/api-5363566.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#get-a-team-by-name) endpoint. - teams [Update a team (Legacy)](https://github.apifox.cn/api-5363567.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#update-a-team) endpoint. - teams [List discussions (Legacy)](https://github.apifox.cn/api-5363568.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#list-discussions) endpoint. - teams [Create a discussion (Legacy)](https://github.apifox.cn/api-5363569.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#create-a-discussion) endpoint. - teams [Delete a discussion (Legacy)](https://github.apifox.cn/api-5363570.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#delete-a-discussion) endpoint. - teams [Get a discussion (Legacy)](https://github.apifox.cn/api-5363571.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#get-a-discussion) endpoint. - teams [Update a discussion (Legacy)](https://github.apifox.cn/api-5363572.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#update-a-discussion) endpoint. - teams [List discussion comments (Legacy)](https://github.apifox.cn/api-5363573.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#list-discussion-comments) endpoint. - teams [Create a discussion comment (Legacy)](https://github.apifox.cn/api-5363574.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#create-a-discussion-comment) endpoint. - teams [Delete a discussion comment (Legacy)](https://github.apifox.cn/api-5363575.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#delete-a-discussion-comment) endpoint. - teams [Get a discussion comment (Legacy)](https://github.apifox.cn/api-5363576.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#get-a-discussion-comment) endpoint. - teams [Update a discussion comment (Legacy)](https://github.apifox.cn/api-5363577.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#update-a-discussion-comment) endpoint. - teams [List team members (Legacy)](https://github.apifox.cn/api-5363578.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#list-team-members) endpoint. - teams [Remove team member (Legacy)](https://github.apifox.cn/api-5363579.md): The "Remove team member" endpoint (described below) is deprecated. - teams [Get team member (Legacy)](https://github.apifox.cn/api-5363580.md): The "Get team member" endpoint (described below) is deprecated. - teams [Add team member (Legacy)](https://github.apifox.cn/api-5363581.md): The "Add team member" endpoint (described below) is deprecated. - teams [Remove team membership for a user (Legacy)](https://github.apifox.cn/api-5363582.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#remove-team-membership-for-a-user) endpoint. - teams [Get team membership for a user (Legacy)](https://github.apifox.cn/api-5363583.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#get-team-membership-for-a-user) endpoint. - teams [Add or update team membership for a user (Legacy)](https://github.apifox.cn/api-5363584.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - teams [List team projects (Legacy)](https://github.apifox.cn/api-5363585.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#list-team-projects) endpoint. - teams [Remove a project from a team (Legacy)](https://github.apifox.cn/api-5363586.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#remove-a-project-from-a-team) endpoint. - teams [Check team permissions for a project (Legacy)](https://github.apifox.cn/api-5363587.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#check-team-permissions-for-a-project) endpoint. - teams [Add or update team project permissions (Legacy)](https://github.apifox.cn/api-5363588.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#add-or-update-team-project-permissions) endpoint. - teams [List team repositories (Legacy)](https://github.apifox.cn/api-5363589.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#list-team-repositories) endpoint. - teams [Remove a repository from a team (Legacy)](https://github.apifox.cn/api-5363590.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#remove-a-repository-from-a-team) endpoint. - teams [Check team permissions for a repository (Legacy)](https://github.apifox.cn/api-5363591.md): **Note**: Repositories inherited through a parent team will also be checked. - teams [Add or update team repository permissions (Legacy)](https://github.apifox.cn/api-5363592.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. - teams [List child teams (Legacy)](https://github.apifox.cn/api-5363593.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#list-child-teams) endpoint. - teams [List teams for the authenticated user](https://github.apifox.cn/api-5363594.md): List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/). - reactions [List reactions for a team discussion comment](https://github.apifox.cn/api-5363595.md): List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - reactions [Create reaction for a team discussion comment](https://github.apifox.cn/api-5363596.md): Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. - reactions [Delete team discussion comment reaction](https://github.apifox.cn/api-5363597.md): **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. - reactions [List reactions for a team discussion](https://github.apifox.cn/api-5363598.md): List the reactions to a [team discussion](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - reactions [Create reaction for a team discussion](https://github.apifox.cn/api-5363599.md): Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@2.22/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. - reactions [Delete team discussion reaction](https://github.apifox.cn/api-5363600.md): **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. - reactions [Delete a reaction (Legacy)](https://github.apifox.cn/api-5363601.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - reactions [List reactions for a commit comment](https://github.apifox.cn/api-5363602.md): List the reactions to a [commit comment](https://docs.github.com/enterprise-server@2.22/rest/reference/repos#comments). - reactions [Create reaction for a commit comment](https://github.apifox.cn/api-5363603.md): Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@2.22/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. - reactions [Delete a commit comment reaction](https://github.apifox.cn/api-5363604.md): **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. - reactions [List reactions for an issue comment](https://github.apifox.cn/api-5363605.md): List the reactions to an [issue comment](https://docs.github.com/enterprise-server@2.22/rest/reference/issues#comments). - reactions [Create reaction for an issue comment](https://github.apifox.cn/api-5363606.md): Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@2.22/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. - reactions [Delete an issue comment reaction](https://github.apifox.cn/api-5363607.md): **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. - reactions [List reactions for an issue](https://github.apifox.cn/api-5363608.md): List the reactions to an [issue](https://docs.github.com/enterprise-server@2.22/rest/reference/issues). - reactions [Create reaction for an issue](https://github.apifox.cn/api-5363609.md): Create a reaction to an [issue](https://docs.github.com/enterprise-server@2.22/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. - reactions [Delete an issue reaction](https://github.apifox.cn/api-5363610.md): **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. - reactions [List reactions for a pull request review comment](https://github.apifox.cn/api-5363611.md): List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@2.22/rest/reference/pulls#review-comments). - reactions [Create reaction for a pull request review comment](https://github.apifox.cn/api-5363612.md): Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@2.22/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. - reactions [Delete a pull request comment reaction](https://github.apifox.cn/api-5363613.md): **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` - reactions [List reactions for a team discussion comment (Legacy)](https://github.apifox.cn/api-5363614.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/enterprise-server@2.22/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - reactions [Create reaction for a team discussion comment (Legacy)](https://github.apifox.cn/api-5363615.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/enterprise-server@2.22/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. - reactions [List reactions for a team discussion (Legacy)](https://github.apifox.cn/api-5363616.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/enterprise-server@2.22/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. - reactions [Create reaction for a team discussion (Legacy)](https://github.apifox.cn/api-5363617.md): **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/enterprise-server@2.22/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. - rate-limit [Get rate limit status for the authenticated user](https://github.apifox.cn/api-5363618.md): **Note:** Accessing this endpoint does not count against your REST API rate limit. - checks [Create a check run](https://github.apifox.cn/api-5363619.md): **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - checks [Get a check run](https://github.apifox.cn/api-5363620.md): **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - checks [Update a check run](https://github.apifox.cn/api-5363621.md): **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - checks [List check run annotations](https://github.apifox.cn/api-5363622.md): Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. - checks [Create a check suite](https://github.apifox.cn/api-5363623.md): **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - checks [Update repository preferences for check suites](https://github.apifox.cn/api-5363624.md): Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/enterprise-server@2.22/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. - checks [Get a check suite](https://github.apifox.cn/api-5363625.md): **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - checks [List check runs in a check suite](https://github.apifox.cn/api-5363626.md): **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - checks [Rerequest a check suite](https://github.apifox.cn/api-5363627.md): Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - checks [List check runs for a Git reference](https://github.apifox.cn/api-5363628.md): **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - checks [List check suites for a Git reference](https://github.apifox.cn/api-5363629.md): **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - code-scanning [List code scanning alerts for a repository](https://github.apifox.cn/api-5363630.md): Lists all open code scanning alerts for the default branch (usually `main` - code-scanning [Get a code scanning alert](https://github.apifox.cn/api-5363631.md): Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. - code-scanning [Update a code scanning alert](https://github.apifox.cn/api-5363632.md): Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. - code-scanning [List code scanning analyses for a repository](https://github.apifox.cn/api-5363633.md): Lists the details of all code scanning analyses for a repository, - code-scanning [Upload an analysis as SARIF data](https://github.apifox.cn/api-5363634.md): Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint. - git [Create a blob](https://github.apifox.cn/api-5363635.md): - git [Get a blob](https://github.apifox.cn/api-5363636.md): The `content` in the response will always be Base64 encoded. - git [Create a commit](https://github.apifox.cn/api-5363637.md): Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - git [Get a commit](https://github.apifox.cn/api-5363638.md): Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - git [List matching references](https://github.apifox.cn/api-5363639.md): Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. - git [Get a reference](https://github.apifox.cn/api-5363640.md): Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. - git [Create a reference](https://github.apifox.cn/api-5363641.md): Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. - git [Delete a reference](https://github.apifox.cn/api-5363642.md): - git [Update a reference](https://github.apifox.cn/api-5363643.md): - git [Create a tag object](https://github.apifox.cn/api-5363644.md): Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-server@2.22/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-server@2.22/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. - git [Get a tag](https://github.apifox.cn/api-5363645.md): **Signature verification object** - git [Create a tree](https://github.apifox.cn/api-5363646.md): The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. - git [Get a tree](https://github.apifox.cn/api-5363647.md): Returns a single tree using the SHA1 value for that tree. - pulls [List pull requests](https://github.apifox.cn/api-5363648.md): Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - pulls [Create a pull request](https://github.apifox.cn/api-5363649.md): Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - pulls [List review comments in a repository](https://github.apifox.cn/api-5363650.md): Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. - pulls [Delete a review comment for a pull request](https://github.apifox.cn/api-5363651.md): Deletes a review comment. - pulls [Get a review comment for a pull request](https://github.apifox.cn/api-5363652.md): Provides details for a review comment. - pulls [Update a review comment for a pull request](https://github.apifox.cn/api-5363653.md): Enables you to edit a review comment. - pulls [Get a pull request](https://github.apifox.cn/api-5363654.md): Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - pulls [Update a pull request](https://github.apifox.cn/api-5363655.md): Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - pulls [List review comments on a pull request](https://github.apifox.cn/api-5363656.md): Lists all review comments for a pull request. By default, review comments are in ascending order by ID. - pulls [Create a review comment for a pull request](https://github.apifox.cn/api-5363657.md): - pulls [Create a reply for a review comment](https://github.apifox.cn/api-5363658.md): Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - pulls [List commits on a pull request](https://github.apifox.cn/api-5363659.md): Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/enterprise-server@2.22/rest/reference/repos#list-commits) endpoint. - pulls [List pull requests files](https://github.apifox.cn/api-5363660.md): **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. - pulls [Check if a pull request has been merged](https://github.apifox.cn/api-5363661.md): - pulls [Merge a pull request](https://github.apifox.cn/api-5363662.md): This endpoint triggers [notifications](https://docs.github.com/enterprise-server@2.22/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. - pulls [Remove requested reviewers from a pull request](https://github.apifox.cn/api-5363663.md): - pulls [List requested reviewers for a pull request](https://github.apifox.cn/api-5363664.md): - pulls [Request reviewers for a pull request](https://github.apifox.cn/api-5363665.md): This endpoint triggers [notifications](https://docs.github.com/enterprise-server@2.22/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. - pulls [List reviews for a pull request](https://github.apifox.cn/api-5363666.md): The list of reviews returns in chronological order. - pulls [Create a review for a pull request](https://github.apifox.cn/api-5363667.md): This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/enterprise-server@2.22/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - pulls [Delete a pending review for a pull request](https://github.apifox.cn/api-5363668.md): - pulls [Get a review for a pull request](https://github.apifox.cn/api-5363669.md): - pulls [Update a review for a pull request](https://github.apifox.cn/api-5363670.md): Update the review summary comment with new text. - pulls [List comments for a pull request review](https://github.apifox.cn/api-5363671.md): List comments for a specific pull request review. - pulls [Dismiss a review for a pull request](https://github.apifox.cn/api-5363672.md): **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@2.22/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. - pulls [Submit a review for a pull request](https://github.apifox.cn/api-5363673.md): - pulls [Update a pull request branch](https://github.apifox.cn/api-5363674.md): Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. - search [Search code](https://github.apifox.cn/api-5363675.md): Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#pagination). - search [Search commits](https://github.apifox.cn/api-5363676.md): Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#pagination). - search [Search issues and pull requests](https://github.apifox.cn/api-5363677.md): Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#pagination). - search [Search labels](https://github.apifox.cn/api-5363678.md): Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#pagination). - search [Search repositories](https://github.apifox.cn/api-5363679.md): Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#pagination). - search [Search topics](https://github.apifox.cn/api-5363680.md): Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - search [Search users](https://github.apifox.cn/api-5363681.md): Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#pagination). - users [Get the authenticated user](https://github.apifox.cn/api-5363682.md): If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. - users [Update the authenticated user](https://github.apifox.cn/api-5363683.md): **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. - users [Delete an email address for the authenticated user](https://github.apifox.cn/api-5363684.md): This endpoint is accessible with the `user` scope. - users [List email addresses for the authenticated user](https://github.apifox.cn/api-5363685.md): Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. - users [Add an email address for the authenticated user](https://github.apifox.cn/api-5363686.md): This endpoint is accessible with the `user` scope. - users [List followers of the authenticated user](https://github.apifox.cn/api-5363687.md): Lists the people following the authenticated user. - users [List the people the authenticated user follows](https://github.apifox.cn/api-5363688.md): Lists the people who the authenticated user follows. - users [Unfollow a user](https://github.apifox.cn/api-5363689.md): Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. - users [Check if a person is followed by the authenticated user](https://github.apifox.cn/api-5363690.md): - users [Follow a user](https://github.apifox.cn/api-5363691.md): Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@2.22/rest/overview/resources-in-the-rest-api#http-verbs)." - users [List GPG keys for the authenticated user](https://github.apifox.cn/api-5363692.md): Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - users [Create a GPG key for the authenticated user](https://github.apifox.cn/api-5363693.md): Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - users [Delete a GPG key for the authenticated user](https://github.apifox.cn/api-5363694.md): Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - users [Get a GPG key for the authenticated user](https://github.apifox.cn/api-5363695.md): View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - users [List public SSH keys for the authenticated user](https://github.apifox.cn/api-5363696.md): Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - users [Create a public SSH key for the authenticated user](https://github.apifox.cn/api-5363697.md): Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - users [Delete a public SSH key for the authenticated user](https://github.apifox.cn/api-5363698.md): Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - users [Get a public SSH key for the authenticated user](https://github.apifox.cn/api-5363699.md): View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/enterprise-server@2.22/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - users [List public email addresses for the authenticated user](https://github.apifox.cn/api-5363700.md): Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@2.22/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. - users [List users](https://github.apifox.cn/api-5363701.md): Lists all users, in the order that they signed up on GitHub Enterprise Server. This list includes personal user accounts and organization accounts. - users [Get a user](https://github.apifox.cn/api-5363702.md): Provides publicly available information about someone with a GitHub account. - users [List followers of a user](https://github.apifox.cn/api-5363703.md): Lists the people following the specified user. - users [List the people a user follows](https://github.apifox.cn/api-5363704.md): Lists the people who the specified user follows. - users [Check if a user follows another user](https://github.apifox.cn/api-5363705.md): - users [List GPG keys for a user](https://github.apifox.cn/api-5363706.md): Lists the GPG keys for a user. This information is accessible by anyone. - users [Get contextual information for a user](https://github.apifox.cn/api-5363707.md): Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. - users [List public keys for a user](https://github.apifox.cn/api-5363708.md): Lists the _verified_ public SSH keys for a user. This is accessible by anyone.