|
| 1 | +--- |
| 2 | +title: Enterprise | GitHub API |
| 3 | +--- |
| 4 | + |
| 5 | +# Enterprise |
| 6 | + |
| 7 | +* TOC |
| 8 | +{:toc} |
| 9 | + |
| 10 | +GitHub Enterprise supports the same powerful API available on GitHub.com as well as its own set of API endpoints: |
| 11 | + |
| 12 | +- Use the [Admin Stats][] API to get usage statistics |
| 13 | +- Use the [License][] API to get license information |
| 14 | +- Use the [Search Indexing][] API to queue up search indexing jobs |
| 15 | +- Use the [Management Console][] API to perform common administrative tasks |
| 16 | + |
| 17 | +[Admin Stats]: admin_stats/ |
| 18 | +[License]: license/ |
| 19 | +[Search Indexing]: search_indexing/ |
| 20 | +[Management Console]: management_console/ |
| 21 | + |
| 22 | +## Endpoint URLs |
| 23 | + |
| 24 | +Every endpoint used by the GitHub API depends on your `hostname`, which is the name of your Enterprise installation. |
| 25 | + |
| 26 | +Endpoints for the GitHub.com API and most of the Enterprise API start with the following URL: |
| 27 | + |
| 28 | +<pre class="terminal"> |
| 29 | +http(s)://<em>hostname</em>/api/v3/ |
| 30 | +</pre> |
| 31 | + |
| 32 | +Endpoints for the [Search Indexing][] API start with the following URL: |
| 33 | + |
| 34 | +<pre class="terminal"> |
| 35 | +http(s)://<em>hostname</em>/api/v3/staff/ |
| 36 | +</pre> |
| 37 | + |
| 38 | +Endpoints for the [Management Console][] API start with the following URL: |
| 39 | + |
| 40 | +<pre class="terminal"> |
| 41 | +http(s)://<em>hostname</em>/setup/api/ |
| 42 | +</pre> |
| 43 | + |
| 44 | +### Example |
| 45 | + |
| 46 | +If your Enterprise host name is `ghe.local`, a call to [the Issues API](/v3/issues/) would be made to `https://ghe.local/api/v3/issues`. |
| 47 | + |
| 48 | +## Authentication |
| 49 | + |
| 50 | +Your Enterprise installation's API endpoints accept [the same authentication methods](http://developer.github.com/v3/#authentication) as the GitHub.com API. Specifically, you can authenticate yourself with **[OAuth tokens][]** (which can be created using the [Authorizations API][]) or **[basic authentication][]**. |
| 51 | + |
| 52 | +[OAuth tokens]: /v3/oauth/ |
| 53 | +[basic authentication]: /v3/#basic-authentication |
| 54 | + |
| 55 | +The [Admin Stats][], [License][], and [Search Indexing][] API endpoints are only accessible to GitHub Enterprise site admins. The [Management Console][] API endpoints are accessible to anyone with a valid license file. |
| 56 | + |
| 57 | +[Authorizations API]: /v3/oauth_authorizations/#create-a-new-authorization |
0 commit comments