GitHub v3 REST API

Get the maintenance status

Check your installation’s maintenance status:

get
{protocol}://{hostname}/api/v3/setup/api/maintenance

Response

200 application/json

Response

maintenance-status

statusstring
scheduled_timestring
connection_servicesarray[object]
Show Child Parameters
get/setup/api/maintenance
 
200 application/json

Enable or disable maintenance mode

Note: The request body for this operation must be submitted as application/x-www-form-urlencoded data. You can submit a parameter value as a string, or you can use a tool such as curl to submit a parameter value as the contents of a text file. For more information, see the curl documentation.

post
{protocol}://{hostname}/api/v3/setup/api/maintenance

Body

application/x-www-form-urlencoded
maintenancestringrequired

A JSON string with the attributes enabled and when.

The possible values for enabled are true and false. When it’s false, the attribute when is ignored and the maintenance mode is turned off. when defines the time period when the maintenance was enabled.

The possible values for when are now or any date parseable by mojombo/chronic.

Response

200 application/json

Response

maintenance-status

statusstring
scheduled_timestring
connection_servicesarray[object]
Show Child Parameters
post/setup/api/maintenance

Body

{ "maintenance": "{\"enabled\":true, \"when\":\"now\"}" }
 
200 application/json

Get settings

get
{protocol}://{hostname}/api/v3/setup/api/settings

Response

200 application/json

Response

enterprise-settings

enterpriseobject
Show Child Parameters
run_listarray[string]
get/setup/api/settings
 
200 application/json

Set settings

For a list of the available settings, see the Get settings endpoint.

Note: The request body for this operation must be submitted as application/x-www-form-urlencoded data. You can submit a parameter value as a string, or you can use a tool such as curl to submit a parameter value as the contents of a text file. For more information, see the curl documentation.

put
{protocol}://{hostname}/api/v3/setup/api/settings

Body

application/x-www-form-urlencoded
settingsstringrequired

A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify. For a list of the available settings, see the Get settings endpoint.

Response

204

Response

put/setup/api/settings

Body

{ "settings": "{ \"enterprise\": { \"public_pages\": true }}" }
 
204

Get all authorized SSH keys

get
{protocol}://{hostname}/api/v3/setup/api/settings/authorized-keys

Response

200 application/json

Response

keystring
pretty-printstring
get/setup/api/settings/authorized-keys
 
200 application/json