You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/v3/enterprise.md
+6-16Lines changed: 6 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,45 +13,35 @@ GitHub Enterprise supports the same powerful API available on GitHub.com as well
13
13
- Use the [License][] API to get license information
14
14
- Use the [Search Indexing][] API to queue up search indexing jobs
15
15
- Use the [Management Console][] API to perform common administrative tasks
16
+
- Use the [User Administration][] API to promote, demote, suspend, and unsuspend users
16
17
17
18
[Admin Stats]: admin_stats/
18
19
[License]: license/
19
20
[Search Indexing]: search_indexing/
20
21
[Management Console]: management_console/
22
+
[User Administration]: /v3/users/administration/
21
23
22
24
## Endpoint URLs
23
25
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:
27
27
28
28
<preclass="terminal">
29
29
http(s)://<em>hostname</em>/api/v3/
30
30
</pre>
31
31
32
-
Endpoints for the [Search Indexing][] API start with the following URL:
32
+
[Management Console][] API endpoints are only prefixed with a hostname:
33
33
34
34
<preclass="terminal">
35
-
http(s)://<em>hostname</em>/api/v3/staff/
35
+
http(s)://<em>hostname</em>/
36
36
</pre>
37
37
38
-
Endpoints for the [Management Console][] API start with the following URL:
39
-
40
-
<preclass="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
38
## Authentication
49
39
50
40
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
41
52
42
[OAuth tokens]: /v3/oauth/
53
43
[basic authentication]: /v3/#basic-authentication
54
44
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.
Copy file name to clipboardExpand all lines: content/v3/enterprise/admin_stats.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,19 @@ title: Admin Stats | GitHub API
7
7
* TOC
8
8
{:toc}
9
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.
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:
Copy file name to clipboardExpand all lines: content/v3/enterprise/license.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,19 @@ title: License | GitHub API
7
7
* TOC
8
8
{:toc}
9
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.
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:
Copy file name to clipboardExpand all lines: content/v3/enterprise/search_indexing.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,17 @@ title: Search Indexing | GitHub API
7
7
* TOC
8
8
{:toc}
9
9
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:
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
+
<preclass="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
0 commit comments