8000 Sync upstream changes · sutt0n/developer.github.com@902531e · GitHub
[go: up one dir, main page]

Skip to content

Commit 902531e

Browse files
committed
Sync upstream changes
1 parent 18c804c commit 902531e

File tree

14 files changed

+224
-146
lines changed

14 files changed

+224
-146
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ group :development do
2020
end
2121

2222
group :test do
23-
gem 'html-proofer', '~> 0.6.1'
23+
gem 'html-proofer'
2424
end

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ GEM
2626
guard-nanoc (1.0.2)
2727
guard (>= 1.8.0)
2828
nanoc (>= 3.6.3)
29-
html-proofer (0.6.8)
29+
html-proofer (0.7.1)
3030
colored (~> 1.2)
3131
mercenary (~> 0.3.2)
3232
nokogiri (~> 1.6.0)
@@ -42,7 +42,7 @@ GEM
4242
method_source (0.8.2)
4343
mime-types (1.25.1)
4444
mini_portile (0.6.0)
45-
nanoc (3.7.0)
45+
nanoc (3.7.1)
4646
cri (~> 2.3)
4747
nokogiri (1.6.2.1)
4848
mini_portile (= 0.6.0)
@@ -77,7 +77,7 @@ DEPENDENCIES
7777
coderay
7878
fssm
7979
guard-nanoc
80-
html-proofer (~> 0.6.1)
80+
html-proofer
8181
kramdown (~> 0.13.2)
8282
mime-types (~> 1.16)
8383
nanoc (~> 3.7)

content/v3/enterprise.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,35 @@ GitHub Enterprise supports the same powerful API available on GitHub.com as well
1313
- Use the [License][] API to get license information
1414
- Use the [Search Indexing][] API to queue up search indexing jobs
1515
- Use the [Management Console][] API to perform common administrative tasks
16+
- Use the [User Administration][] API to promote, demote, suspend, and unsuspend users
1617

1718
[Admin Stats]: admin_stats/
1819
[License]: license/
1920
[Search Indexing]: search_indexing/
2021
[Management Console]: management_console/
22+
[User Administration]: /v3/users/administration/
2123

2224
## Endpoint URLs
2325

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:
26+
All API endpoints—except [Management Console][] API endpoints—are prefixed with the following URL:
2727

2828
<pre class="terminal">
2929
http(s)://<em>hostname</em>/api/v3/
3030
</pre>
3131

32-
Endpoints for the [Search Indexing][] API start with the following URL:
32+
[Management Console][] API endpoints are only prefixed with a hostname:
3333

3434
<pre class="terminal">
35-
http(s)://<em>hostname</em>/api/v3/staff/
35+
http(s)://<em>hostname</em>/
3636
</pre>
3737

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-
4838
## Authentication
4939

5040
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][]**.
5141

5242
[OAuth tokens]: /v3/oauth/
5343
[basic authentication]: /v3/#basic-authentication
5444

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.
45+
The [Admin Stats][], [License][], [Search Indexing][], and [User Administration][] API endpoints are only accessible to GitHub Enterprise site administrators. The [Management Console][] API endpoints are only accessible with a valid license file.
5646

5747
[Authorizations API]: /v3/oauth_authorizations/#create-a-new-authorization

content/v3/enterprise/admin_stats.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ title: Admin Stats | GitHub API
77
* TOC
88
{:toc}
99

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.
10+
The Admin Stats API provides a variety of metrics about your installation. *It is only available to [authenticated](/v3/#authentication) site administrators.* Normal users will receive a `404` response if they try to access it.
11+
12+
Prefix all the endpoints for this API with the following URL:
13+
14+
<pre class="terminal">
15+
http(s)://<em>hostname</em>/api/v3
16+
</pre>
1117

1218
## Get statistics
1319

1420
### Request
1521

16-
GET /api/v3/enterprise/stats/:type
22+
GET /enterprise/stats/:type
1723

1824
There are a variety of types to choose from:
1925

content/v3/enterprise/license.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ title: License | GitHub API
77
* TOC
88
{:toc}
99

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.
10+
The License API provides information on your Enterprise license. *It is only available to [authenticated](/v3/#authentication) site administrators.* Normal users will receive a `404` response if they try to access it.
11+
12+
Prefix all the endpoints for this API with the following URL:
13+
14+
<pre class="terminal">
15+
http(s)://<em>hostname</em>/api/v3
16+
</pre>
1117

1218
## Get license information
1319

1420
### Request
1521

16-
GET /api/v3/enterprise/settings/license
22+
GET /enterprise/settings/license
1723

1824
### Response
1925

content/v3/enterprise/search_indexing.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ title: Search Indexing | GitHub API
77
* TOC
88
{:toc}
99

10-
The Search Indexing API allows you to queue up a variety of search indexing tasks. *It is only available to site admins.* Normal users will receive a `404` response if they try to access it.
10+
The Search Indexing API allows you to queue up a variety of search indexing tasks. *It is only available to [authenticated](/v3/#authentication) site administrators.* Normal users will receive a `404` response if they try to access it.
11+
12+
Prefix all the endpoints for this API with the following URL:
13+
14+
<pre class="terminal">
15+
http(s)://<em>hostname</em>/api/v3
16+
</pre>
1117

1218
## Queue an indexing job
1319

14-
POST /api/v3/staff/indexing_jobs
20+
POST /staff/indexing_jobs
1521

1622
### Parameters
1723

content/v3/users/administration.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: User Administration | GitHub API
3+
---
4+
5+
# Administration (Enterprise)
6+
7+
* TOC
8+
{:toc}
9+
10+
The User Administration API allows you to promote, demote, suspend, and unsuspend users on a GitHub Enterprise appliance. *It is only available to [authenticated](/v3/#authentication) site administrators.* Normal users will receive a `403` response if they try to access it.
11+
12+
Prefix all the endpoints for this API with the following URL:
13+
14+
<pre class="terminal">
15+
http(s)://<em>hostname</em>/api/v3
16+
</pre>
17+
18+
## Promote an ordinary user to a site administrator
19+
20+
PUT /user/:username/site_admin
21+
22+
<%= fetch_content(:put_content_length) %>
23+
24+
### Response
25+
26+
<%= headers 204 %>
27+
28+
## Demote a site administrator to an ordinary user
29+
30+
DELETE /user/:username/site_admin
31+
32+
You can demote any user account except your own.
33+
34+
### Response
35+
36+
<%= headers 204 %>
37+
38+
## Suspend a user
39+
40+
PUT /user/:username/suspended
41+
42+
You can suspend any user account except your own.
43+
44+
<%= fetch_content(:put_content_length) %>
45+
46+
### Response
47+
48+
<%= headers 204 %>
49+
50+
## Unsuspend a user
51+
52+
DELETE /user/:username/suspended
53+
54+
### Response
55+
56+
<%= headers 204 %>

layouts/sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ <h3><a href="#" class="js-expand-btn collapsed arrow-btn" data-proofer-ignore></
107107
<li><a href="/v3/users/emails/">Emails</a></li>
108108
<li><a href="/v3/users/followers/">Followers</a></li>
109109
<li><a href="/v3/users/keys/">Public Keys</a></li>
110+
<li><a href="/v3/users/administration/">Administration (Enterprise)</a></li>
110111
</ul>
111112
</li>
112113
<li class="js-topic">

layouts/webhooks.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ <h2><a href="/v3/">API</a></h2>
2424
<ul>
2525
<li><h3><a href="/webhooks">Overview</a></h3></li>
2626
<li><h3><a href="/webhooks/creating">Creating webhooks</a></h3></li>
27-
<li><h3><a href="/webhooks/configuring/">Configuring your Server</a></h3></li>
27+
<li><h3><a href="/webhooks/configuring/">Configuring your server</a></h3></li>
2828
<li><h3><a href="/webhooks/testing/">Testing webhooks</a></h3></li>
29-
<li><h3><a href="/webhooks/securing">Securing Your webhooks</a></h3></li>
29+
<li><h3><a href="/webhooks/securing">Securing your webhooks</a></h3></li>
3030
</ul>
3131
</div>
3232

lib/changes_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module ChangesHelper
2-
MimeFormat = "application/vnd.github.%s+json".freeze
2+
MimeFormat ||= "application/vnd.github.%s+json".freeze
33
# Public: Filters the change items out. If a version is given, show only the
44
# items related to that version.
55
#

0 commit comments

Comments
 (0)
0