5.2 KiB
title | shortTitle | allowTitleToDifferFromFilename | intro | versions | topics | autogenerated | |||
---|---|---|---|---|---|---|---|---|---|
REST API endpoints for Management Console | Management Console | true | Use the REST API to manage your {% data variables.product.product_name %} installation. |
|
|
rest |
About the Management Console endpoints
The full functionality of the Management Console endpoints was added to the Manage GHES endpoints in {% data variables.product.prodname_ghe_server %} version 3.12. With feature parity achieved, the Management Console API endpoints {% ifversion ghes < 3.15 %}will be{% else %}were{% endif %} removed in version 3.15.
{% ifversion management-console-manage-ghes-parity %}
To help you migrate, the mapping table below shows the equivalent Manage GHES operation for each Management Console operation.{% ifversion ghes < 3.15 %} Please migrate to the Manage GHES API endpoints as soon as possible.{% endif %}
Purpose | Management Console API operation | Manage GHES API operation |
---|---|---|
Get the configuration status | GET /setup/api/configcheck |
GET /manage/v1/config/apply |
Start a configuration process | POST /setup/api/configure |
POST /manage/v1/config/apply |
Get the maintenance status | GET /setup/api/maintenance |
GET /manage/v1/maintenance |
Enable or disable maintenance mode | POST /setup/api/maintenance |
POST /manage/v1/maintenance |
Get settings | GET /setup/api/settings |
GET /manage/v1/config/settings |
Set settings | PUT /setup/api/settings |
PUT /manage/v1/config/settings |
Get all authorized SSH keys | GET /setup/api/settings/authorized-keys |
GET /manage/v1/access/ssh |
Add an authorized SSH key | POST /setup/api/settings/authorized-keys |
POST /manage/v1/access/ssh |
Remove an authorized SSH key | DELETE /setup/api/settings/authorized-keys |
DELETE /manage/v1/access/ssh |
Create a GitHub license | POST /setup/api/start |
POST /manage/v1/config/init |
Upgrade a license | POST /setup/api/upgrade |
PUT /manage/v1/config/license |
{% endif %}
About the {% data variables.enterprise.management_console %}
You should explicitly set the port number when making API calls to the Management Console. If TLS is enabled on your enterprise, the port number is 8443
. Otherwise, the port number is 8080
.
If you cannot provide a port number, you'll need to configure your tool to automatically follow redirects.
You may also need to add the -k
flag when using curl
, since {% data variables.product.product_name %} uses a self-signed certificate before you add your own TLS certificate.
Authentication {% ifversion enterprise-management-console-multi-user-auth %}as the root site administrator{% endif %}
You need to pass your {% ifversion enterprise-management-console-multi-user-auth %}root site administrator{% else %}{% data variables.enterprise.management_console %}{% endif %} password as an authentication token to every endpoint in this category except "Create a GitHub license."
Use the api_key
parameter to send this token with each request. For example:
curl -L 'https://HOSTNAME:ADMIN-PORT/setup/api?api_key=YOUR_PASSWORD'
You can also use standard HTTP authentication to send this token. For example:
curl -L -u "api_key:YOUR_PASSWORD" 'https://HOSTNAME:ADMIN-PORT/setup/api'
{% ifversion enterprise-management-console-multi-user-auth %}
Authentication as a {% data variables.enterprise.management_console %} user
Management Console user accounts can also authenticate to access this endpoint.
To authenticate with the password for a {% data variables.enterprise.management_console %} user account, use standard HTTP authentication. In the following example, replace YOUR_USER_NAME and YOUR_PASSWORD with the account's user name and password.
curl -L -u "YOUR_USER_NAME:YOUR_PASSWORD" 'https://HOSTNAME:ADMIN-PORT/setup/api'
{% endif %}