Signed-off-by: Meredith Lancaster <malancas@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com> Co-authored-by: Felicity Chapman <felicitymay@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Laura Coursen <lecoursen@github.com> Co-authored-by: AlonaHlobina <54394529+AlonaHlobina@users.noreply.github.com> Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com> Co-authored-by: Jules <19994093+jules-p@users.noreply.github.com> Co-authored-by: Siara <108543037+SiaraMist@users.noreply.github.com> Co-authored-by: Kelly Arwine <kellyarwine@github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com> Co-authored-by: Jon Janego <jonjanego@github.com> Co-authored-by: Jules Porter <jules-p@users.noreply.github.com> Co-authored-by: hubwriter <hubwriter@github.com> Co-authored-by: Laurenzo <lsto@github.com> Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com> Co-authored-by: Vanessa <vgrl@github.com> Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com> Co-authored-by: Claire W <78226508+crwaters16@users.noreply.github.com> Co-authored-by: Felix Guntrip <guntrip@github.com> Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com> Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com> Co-authored-by: Tim Rogers <timrogers@github.com> Co-authored-by: docs-bot <77750099+docs-bot@users.noreply.github.com> Co-authored-by: Guillaume Perrot <guperrot@github.com> Co-authored-by: Mark Tareshawty <tarebyte@github.com> Co-authored-by: Hirsch Singhal <1666363+hpsin@users.noreply.github.com> Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com> Co-authored-by: Sunbrye Ly <56200261+sunbrye@users.noreply.github.com> Co-authored-by: PJ Quirk <pjquirk@github.com> Co-authored-by: Steve Ward <steveward@github.com> Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com> Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com> Co-authored-by: SiaraMist <siaramist@github.com> Co-authored-by: Tomoko Tanaka <28242405+tallzeebaa@users.noreply.github.com> Co-authored-by: a1exmozz <187176404+a1exmozz@users.noreply.github.com> Co-authored-by: Meredith Lancaster <malancas@users.noreply.github.com> Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com> Co-authored-by: Andy Barnes <kurgol@github.com> Co-authored-by: Sheena Ganju <sheenyg@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sydney Wilson <86739163+swilson15@users.noreply.github.com> Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com> Co-authored-by: Vimala Moger <166641453+VimalaMoger@users.noreply.github.com> Co-authored-by: Sharra-writes <sharra-writes@github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jenni C <97056108+dihydroJenoxide@users.noreply.github.com> Co-authored-by: Greg Mondello <72952982+gmondello@users.noreply.github.com> Co-authored-by: Mia Arts <107727642+its-mia@users.noreply.github.com> Co-authored-by: sunbrye <sunbrye@github.com> Co-authored-by: Lorenz Vanthillo <lorenz.vanthillo@gmail.com> Co-authored-by: Eboni <32157169+EboniLM@users.noreply.github.com> Co-authored-by: Junko Suzuki <pnsk@github.com> Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com> Co-authored-by: heiskr <1221423+heiskr@users.noreply.github.com> Co-authored-by: Patrick Knight <patrick-knight@github.com> Co-authored-by: T. Greg Doucette <58960990+LawDevNull@users.noreply.github.com> Co-authored-by: Evan Bonsignori <ebonsignori@github.com> Co-authored-by: Robert Justin Monzingo <robertjmonzingo@gmail.com> Co-authored-by: John Coleman <thenewcoke@gmail.com> Co-authored-by: Brendan Scott-Smith <117171930+bss-mc@users.noreply.github.com> Co-authored-by: Chad Bentz <1760475+felickz@users.noreply.github.com> Co-authored-by: Justin Alex <1155821+jusuchin85@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: azenMatt <7584089+azenMatt@users.noreply.github.com> Co-authored-by: Felix Guntrip <stevecat@github.com> Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com> Co-authored-by: John Clement <70238417+jclement136@users.noreply.github.com> Co-authored-by: vaindil <vaindil@github.com> Co-authored-by: Matthew Isabel <matthewisabel@github.com> Co-authored-by: Matthew Isabel <matthew.isabel@gmail.com>
101 lines
3.4 KiB
Markdown
101 lines
3.4 KiB
Markdown
---
|
|
title: REST API endpoints for GitHub Enterprise administration
|
|
intro: Use the REST API to administer your enterprise.
|
|
allowTitleToDifferFromFilename: true
|
|
redirect_from:
|
|
- /v3/enterprise-admin
|
|
- /v3/enterprise
|
|
- /rest/reference/enterprise-admin
|
|
versions:
|
|
ghes: '*'
|
|
ghec: '*'
|
|
topics:
|
|
- API
|
|
shortTitle: Enterprise administration
|
|
children:
|
|
- /admin-stats
|
|
- /announcement
|
|
- /audit-log
|
|
- /billing
|
|
- /bypass-requests
|
|
- /code-security-and-analysis
|
|
- /custom-properties
|
|
- /custom-properties-for-orgs
|
|
- /enterprise-roles
|
|
- /enterprises
|
|
- /global-webhooks
|
|
- /ldap
|
|
- /license
|
|
- /manage-ghes
|
|
- /management-console
|
|
- /network-configurations
|
|
- /org-pre-receive-hooks
|
|
- /organization-installations
|
|
- /orgs
|
|
- /pre-receive-environments
|
|
- /pre-receive-hooks
|
|
- /repo-pre-receive-hooks
|
|
- /rules
|
|
- /scim
|
|
- /users
|
|
autogenerated: rest
|
|
---
|
|
|
|
{% ifversion ghec %}
|
|
|
|
> [!NOTE]
|
|
> This information applies to {% data variables.product.prodname_ghe_cloud %}. To see the {% data variables.product.prodname_ghe_server %} version, use the **{% data ui.pages.article_version %}** drop-down menu.
|
|
|
|
{% endif %}
|
|
|
|
{% data reusables.user-settings.enterprise-admin-api-classic-pat-only %}
|
|
|
|
## Endpoint URLs
|
|
|
|
These endpoints{% ifversion ghes %}, except the Manage GitHub Enterprise Server API {% ifversion ghes < 3.15 %} and Management Console API{% endif %},{% endif %} are prefixed with the following URL:
|
|
|
|
```shell
|
|
{% data variables.product.rest_url %}
|
|
```
|
|
|
|
{% ifversion ghec %}
|
|
When endpoints include `{enterprise}`, replace `{enterprise}` with the handle for your enterprise account, which is included in the URL for your enterprise settings. For example, if your enterprise account is located at `https://github.com/enterprises/octo-enterprise`, replace `{enterprise}` with `octo-enterprise`.
|
|
{% endif %}
|
|
|
|
{% ifversion ghes %}
|
|
|
|
Endpoints for the Manage GitHub Enterprise Server API{% ifversion ghes < 3.15 %} and Management Console API{% endif %} are only prefixed with a hostname and administration port:
|
|
|
|
```shell
|
|
http(s)://HOSTNAME:ADMINISTRATION-PORT/
|
|
```
|
|
|
|
{% endif %}
|
|
{% ifversion ghes %}
|
|
|
|
## Authentication
|
|
|
|
Your {% data variables.product.prodname_ghe_server %} installation's API endpoints accept the same authentication methods as the {% data variables.product.github %} API. For more information, see [AUTOTITLE](/rest/overview/authenticating-to-the-rest-api).
|
|
|
|
OAuth tokens must have the `site_admin` [OAuth scope](/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes) when used with these endpoints.
|
|
|
|
These endpoints are only accessible to authenticated {% data variables.product.prodname_ghe_server %} site administrators, except for endpoints of the [AUTOTITLE](/rest/enterprise-admin/manage-ghes) API{% ifversion ghes < 3.15 %} and [AUTOTITLE](/rest/enterprise-admin/management-console) API{% endif %}, which allow authentication as a Management Console user. See [AUTOTITLE](/admin/configuration/administering-your-instance-from-the-management-console).
|
|
|
|
{% data reusables.enterprise_management_console.api-deprecation %}
|
|
|
|
{% endif %}
|
|
|
|
{% ifversion ghes %}
|
|
|
|
## Version information
|
|
|
|
The current version of your enterprise is returned in the REST API response header:
|
|
`X-GitHub-Enterprise-Version: {{currentVersion}}.0`
|
|
You can also read the current version by calling `GET /meta`. For more information, see [AUTOTITLE](/rest/meta).
|
|
|
|
{% endif %}
|
|
|
|
## Endpoints
|
|
|
|
<!-- Content after this section is automatically generated -->
|