@@ -14,22 +14,24 @@ You must explicitly set the port number when making API calls to the Management
14
14
15
15
If you don't want to provide a port number, you'll need to configure your tool to automatically follow redirects.
16
16
17
+ You may also need to add the[ ` -k ` flag] ( http://curl.haxx.se/docs/manpage.html#-k ) when using` curl ` , since GitHub Enterprise uses a self-signed certificate before you[ add your own SSL certificate] ( https://help.github.com/enterprise/admin/guides/installation/dns-hostname-subdomain-isolation-and-ssl/#ssl ) .
18
+
17
19
{{/tip}}
18
20
19
21
##Authentication
20
22
21
- You need to pass your[ Management Console password] ( https://help.github.com/enterprise/2.0/ admin/articles/accessing-the-management-console/ ) as an authentication token to every Management Console API endpoint except[ ` /setup/api/start ` ] ( #upload-a-license-for-the-first-time ) .
23
+ You need to pass your[ Management Console password] ( https://help.github.com/enterprise/admin/articles/accessing-the-management-console/ ) as an authentication token to every Management Console API endpoint except[ ` /setup/api/start ` ] ( #upload-a-license-for-the-first-time ) .
22
24
23
25
Use the` api_key ` parameter to send this token with each request. For example:
24
26
25
27
``` command-line
26
- $ curl -L 'http ://<em>hostname</em>:<em>admin_port</em>/setup/api?api_key=<em>your-amazing-password</em>'
28
+ $ curl -L 'https ://<em>hostname</em>:<em>admin_port</em>/setup/api?api_key=<em>your-amazing-password</em>'
27
29
```
28
30
29
31
You can also use standard HTTP authentication to send this token. For example:
30
32
31
33
``` command-line
32
- $ curl -L 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api'
34
+ $ curl -L 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api'
33
35
```
34
36
35
37
##Upload a license for the first time
@@ -69,7 +71,7 @@ For a list of the available settings, see [the `/setup/api/settings` endpoint](#
69
71
###Example
70
72
71
73
``` command-line
72
- $ curl -L -X POST 'http ://<em>hostname</em>:<em>admin_port</em>/setup/api/start' -F license=@<em>/path/to/github-enterprise.ghl</em> -F "password=<em>your-amazing-password</em>" -F settings=<<em>/path/to/settings.json</em>
74
+ $ curl -L -X POST 'https ://<em>hostname</em>:<em>admin_port</em>/setup/api/start' -F license=@<em>/path/to/github-enterprise.ghl</em> -F "password=<em>your-amazing-password</em>" -F settings=<<em>/path/to/settings.json</em>
73
75
```
74
76
75
77
##Upgrade a license
@@ -94,7 +96,7 @@ Name | Type | Description
94
96
###Example
95
97
96
98
``` command-line
97
- $ curl -L -X POST 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/upgrade'
99
+ $ curl -L -X POST 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/upgrade'
98
100
```
99
101
100
102
##Check configuration status
@@ -123,7 +125,7 @@ Status | Description
123
125
###Example
124
126
125
127
``` command-line
126
- $ curl -L 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/configcheck'
128
+ $ curl -L 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/configcheck'
127
129
```
128
130
129
131
##Start a configuration process
@@ -142,7 +144,7 @@ This endpoint allows you to start a configuration process at any time for your u
142
144
###Example
143
145
144
146
``` command-line
145
- $ curl -L -X POST 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/configure'
147
+ $ curl -L -X POST 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/configure'
146
148
```
147
149
148
150
##Retrieve settings
@@ -157,7 +159,7 @@ $ curl -L -X POST 'http://api_key:<em>your-amazing-password</em>@<em>hostname</e
157
159
###Example
158
160
159
161
``` command-line
160
- $ curl -L 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings'
162
+ $ curl -L 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings'
161
163
```
162
164
163
165
##Modify settings
@@ -179,7 +181,7 @@ Name | Type | Description
179
181
###Example
180
182
181
183
``` command-line
182
- $ curl -L -X PUT 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings' --data-urlencode "settings=`cat /path/to/settings.json`"
184
+ $ curl -L -X PUT 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings' --data-urlencode "settings=`cat /path/to/settings.json`"
183
185
```
184
186
185
187
##Check maintenance status
@@ -196,7 +198,7 @@ Check your installation's maintenance status:
196
198
###Example
197
199
198
200
``` command-line
199
- $ curl -L 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/maintenance'
201
+ $ curl -L 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/maintenance'
200
202
```
201
203
202
204
##Enable or disable maintenance mode
@@ -223,7 +225,7 @@ The possible values for `when` are `now` or any date parseable by
223
225
###Example
224
226
225
227
``` command-line
226
- $ curl -L -X POST 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/maintenance' -d 'maintenance=<em>{"enabled":true, "when":"now"}</em>'
228
+ $ curl -L -X POST 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/maintenance' -d 'maintenance=<em>{"enabled":true, "when":"now"}</em>'
227
229
```
228
230
229
231
##Retrieve authorized SSH keys
@@ -238,7 +240,7 @@ $ curl -L -X POST 'http://api_key:<em>your-amazing-password</em>@<em>hostname</e
238
240
###Example
239
241
240
242
``` command-line
241
- $ curl -L 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings/authorized-keys'
243
+ $ curl -L 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings/authorized-keys'
242
244
```
243
245
244
246
##Add a new authorized SSH key
@@ -259,7 +261,7 @@ Name | Type | Description
259
261
###Example
260
262
261
263
``` command-line
262
- $ curl -L -X POST 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings/authorized-keys' -F authorized_key=@<em>/path/to/key.pub</em>
264
+ $ curl -L -X POST 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings/authorized-keys' -F authorized_key=@<em>/path/to/key.pub</em>
263
265
```
264
266
265
267
##Remove an authorized SSH key
@@ -280,5 +282,5 @@ Name | Type | Description
280
282
###Example
281
283
282
284
``` command-line
283
- $ curl -L -X DELETE 'http ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings/authorized-keys' -F authorized_key=@<em>/path/to/key.pub</em>
285
+ $ curl -L -X DELETE 'https ://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings/authorized-keys' -F authorized_key=@<em>/path/to/key.pub</em>
284
286
```