Skip to content

Commit da1eb9b

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent e34c209 commit da1eb9b

File tree

9 files changed

+738
-2
lines changed

9 files changed

+738
-2
lines changed

content/v3/enterprise.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Admin Stats | GitHub API
3+
---
4+
5+
# Admin Stats
6+
7+
* TOC
8+
{:toc}
9+
10+
The Admin Stats API provides a variety of metrics about your installation. *It is only available to site admins.* Normal users will receive a `404` response if they try to access it.
11+
12+
## Get statistics
13+
14+
### Request
15+
16+
GET /api/v3/enterprise/stats/:type
17+
18+
There are a variety of types to choose from:
19+
20+
Type | Description
21+
-------------|-------------------------------------
22+
`issues` | The number of open and closed issues.
23+
`hooks` | The number of active and inactive hooks.
24+
`milestones` | The number of open and closed milestones.
25+
`orgs` | The number of organizations, teams, team members, and disabled organizations.
26+
`comments` | The number of comments on issues, pull requests, commits, and gists.
27+
`pages` | The number of GitHub Pages sites.
28+
`users` | The number of suspended and admin users.
29+
`gists` | The number of private and public gists.
30+
`pulls` | The number of merged, mergeable, and unmergeable pull requests.
31+
`repos` | The number of organization-owned repositories, root repositories, forks, pushed commits, and wikis.
32+
`all` | All of the statistics listed above.
33+
34+
These statistics are cached and will be updated approximately every 10 minutes.
35+
36+
### Response
37+
38+
<%= headers 200 %>
39+
<%= json(:admin_stats) %>

content/v3/enterprise/license.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: License | GitHub API
3+
---
4+
5+
# License
6+
7+
* TOC
8+
{:toc}
9+
10+
The License API provides information on your Enterprise license. *It is only available to site admins.* Normal users will receive a `404` response if they try to access it.
11+
12+
## Get license information
13+
14+
### Request
15+
16+
GET /api/v3/enterprise/settings/license
17+
18+
### Response
19+
20+
<%= headers 200 %>
21+
<%= json(:licensing) %>

0 commit comments

Comments
 (0)