Skip to main content

此版本的 GitHub Enterprise Server 将于以下日期停止服务 2026-03-17. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

REST API 现已经过版本控制。 有关详细信息,请参阅“关于 API 版本控制”。

适用于 GitHub Enterprise 管理的 REST API 终结点

使用 REST API 管理企业。

注意

These endpoints only support authentication using a personal access token (classic). For more information, see Managing your personal access tokens.

Endpoint URLs

These endpoints, except the Manage GitHub Enterprise Server API and Management Console API, are prefixed with the following URL:

http(s)://HOSTNAME/api/v3

Endpoints for the Manage GitHub Enterprise Server API and Management Console API are only prefixed with a hostname and administration port:

http(s)://HOSTNAME:ADMINISTRATION-PORT/

Authentication

Your GitHub Enterprise Server installation's API endpoints accept the same authentication methods as the GitHub API. For more information, see Authenticating to the REST API.

OAuth tokens must have the site_admin OAuth scope when used with these endpoints.

These endpoints are only accessible to authenticated GitHub Enterprise Server site administrators, except for endpoints of the REST API endpoints for managing GitHub Enterprise Server API and REST API endpoints for Management Console API, which allow authentication as a Management Console user. See Administering your instance from the web UI.

注意

The Management Console endpoints will be deprecated in a future version of GitHub Enterprise Server. You can access the same functionality using the Manage GitHub Enterprise Server endpoints. For more information, see REST API endpoints for managing GitHub Enterprise Server.

Version information

The current version of your enterprise is returned in the REST API response header: X-GitHub-Enterprise-Version: enterprise-server@3.14.0 You can also read the current version by calling GET /meta. For more information, see REST API endpoints for meta data.

Endpoints