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
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
-
- Use the [User Administration][] API to promote, demote, suspend, and unsuspend users
10
+
[GitHub Enterprise](https://enterprise.github.com/) supports the same powerful API available on GitHub.com as well as its own set of API endpoints. You can find a list of these endpoints on the sidebar, with the exception of the [User Administration][] API, which is within its own section.
17
11
18
12
## Endpoint URLs
19
13
@@ -33,21 +27,20 @@ http(s)://<em>hostname</em>/
33
27
34
28
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][]**.
35
29
36
-
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 via the [Management Console password][].
30
+
Every Enterprise API endpoint is only accessible to GitHub Enterprise site administrators, with the exception of the [Management Console][] API, which is only accessible via the [Management Console password][].
Documentation for the API that's bundled with your GitHub Enterprise appliance is available for the past two releases:
41
+
The latest release for GitHub Enterprise is <%= fetch_content(:latest_enterprise_version) %>. The GitHub APIs available to this release are located at <https://developer.github.com/enterprise/<%= fetch_content(:latest_enterprise_version) %>/>.
42
+
43
+
Documentation for the API that's bundled with your GitHub Enterprise appliance is available for past releases:
51
44
52
45
*[API documentation for 2.0](https://developer.github.com/enterprise/2.0/)
53
46
*[API documentation for 11.10.340](https://developer.github.com/enterprise/11.10.340/)
You can use the LDAP API to update account relationships between a GitHub Enterprise user and its linked LDAP entry or queue a new synchronization.
11
+
12
+
With the LDAP mapping endpoints, you're able to update the Distinguished Name (DN) that a user maps to. Note that the LDAP sync endpoints are only effective if your GitHub Enterprise appliance has [LDAP Sync enabled](https://help.github.com/enterprise/2.1/admin/guides/user-management/using-ldap).
13
+
14
+
## Update LDAP mapping for a user
15
+
16
+
PATCH /admin/ldap/user/:username/mapping
17
+
18
+
### Body parameters
19
+
20
+
Pass a JSON payload with the new LDAP Distinguished Name.
21
+
22
+
#### Example
23
+
24
+
#!javascript
25
+
{
26
+
"uid": "asdf",
27
+
"ou": "users",
28
+
"dc": "github",
29
+
"dc": "com"
30
+
}
31
+
32
+
### Response
33
+
34
+
<%= headers 200 %>
35
+
<%= json :ldap_user_update %>
36
+
37
+
## Sync LDAP mapping for a user
38
+
39
+
{{#tip}}
40
+
41
+
Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready.
42
+
43
+
{{/tip}}
44
+
45
+
POST /admin/ldap/user/:username/sync
46
+
47
+
### Response
48
+
49
+
<%= headers 201 %>
50
+
<%= json :ldap_sync_confirm %>
51
+
52
+
## Update LDAP mapping for a team
53
+
54
+
PATCH /admin/ldap/teams/:team_id/mapping
55
+
56
+
### Body parameters
57
+
58
+
Pass a JSON payload with the new LDAP Distinguished Name.
59
+
60
+
#### Example
61
+
62
+
#!javascript
63
+
{
64
+
"cn": "Enterprise Ops",
65
+
"ou": "teams",
66
+
"dc": "github",
67
+
"dc": "co"
68
+
}
69
+
70
+
### Response
71
+
72
+
<%= headers 200 %>
73
+
<%= json :ldap_team_update %>
74
+
75
+
## Sync LDAP mapping for a team
76
+
77
+
{{#tip}}
78
+
79
+
Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready.
Copy file name to clipboardExpand all lines: content/v3/users/administration.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,12 @@ You can demote any user account except your own.
37
37
38
38
## Suspend a user
39
39
40
+
{{#warning}}
41
+
42
+
If your GitHub Enterprise appliance has [LDAP Sync with Active Directory LDAP servers](https://help.github.com/enterprise/admin/guides/user-management/using-ldap), this API is disabled and will return a `403` response. Users managed by an external account cannot be suspended via the API.
43
+
44
+
{{/warning}}
45
+
40
46
PUT /users/:username/suspended
41
47
42
48
You can suspend any user account except your own.
@@ -49,6 +55,12 @@ You can suspend any user account except your own.
49
55
50
56
## Unsuspend a user
51
57
58
+
{{#warning}}
59
+
60
+
If your GitHub Enterprise appliance has [LDAP Sync with Active Directory LDAP servers](https://help.github.com/enterprise/admin/guides/user-management/using-ldap), this API is disabled and will return a `403` response. Users managed by an external account cannot be unsuspended via the API.
Copy file name to clipboardExpand all lines: content/v3/users/emails.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,16 @@ This endpoint is accessible with the user:email scope.
23
23
24
24
## Add email address(es)
25
25
26
+
{{#enterprise-only}}
27
+
28
+
{{#warning}}
29
+
30
+
If your GitHub Enterprise appliance has [LDAP Sync enabled](https://help.github.com/enterprise/admin/guides/user-management/using-ldap) and the option to synchronize emails enabled, this API is disabled and will return a `403` response. Users managed in LDAP won't be able to add an email address via the API with these options enabled.
31
+
32
+
{{/warning}}
33
+
34
+
{{/enterprise-only}}
35
+
26
36
POST /user/emails
27
37
28
38
### Input
@@ -49,6 +59,16 @@ You can post a single email address or an array of addresses:
49
59
50
60
## Delete email address(es)
51
61
62
+
{{#enterprise-only}}
63
+
64
+
{{#warning}}
65
+
66
+
If your GitHub Enterprise appliance has [LDAP Sync enabled](https://help.github.com/enterprise/admin/guides/user-management/using-ldap) and the option to synchronize emails enabled, this API is disabled and will return a `403` response. Users managed in LDAP won't be able to remove an email address via the API with these options enabled.
Copy file name to clipboardExpand all lines: content/v3/users/keys.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,16 @@ authenticated via Basic Auth or via OAuth with at least `read:public_key`
50
50
Creates a public key. Requires that you are authenticated via Basic Auth,
51
51
or OAuth with at least `write:public_key`[scope](/v3/oauth/#scopes).
52
52
53
+
{{#enterprise-only}}
54
+
55
+
{{#warning}}
56
+
57
+
If your GitHub Enterprise appliance has [LDAP Sync enabled](https://help.github.com/enterprise/2.1/admin/guides/user-management/using-ldap) and the option to synchronize SSH keys enabled, this API is disabled and will return a `403` response. Users managed in LDAP won't be able to add an SSH key address via the API with these options enabled.
58
+
59
+
{{/warning}}
60
+
61
+
{{/enterprise-only}}
62
+
53
63
POST /user/keys
54
64
55
65
### Input
@@ -72,6 +82,16 @@ instead.
72
82
Removes a public key. Requires that you are authenticated via Basic Auth
73
83
or via OAuth with at least `admin:public_key`[scope](/v3/oauth/#scopes).
74
84
85
+
{{#enterprise-only}}
86
+
87
+
{{#warning}}
88
+
89
+
If your GitHub Enterprise appliance has [LDAP Sync enabled](https://help.github.com/enterprise/2.1/admin/guides/user-management/using-ldap) and the option to synchronize SSH keys enabled, this API is disabled and will return a `403` response. Users managed in LDAP won't be able to remove an SSH key address via the API with these options enabled.
"PUT_CONTENT_LENGTH"=>"Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](/v3/#http-verbs).\"",
0 commit comments