AbdulElahGwaith's picture
Upload folder using huggingface_hub
88df9e4 verified
metadata
title: REST API endpoints for Management Console
shortTitle: Management Console
allowTitleToDifferFromFilename: true
intro: >-
  Use the REST API to manage your {% data variables.product.prodname_ghe_server
  %} installation.
versions:
  ghes: <=3.14
topics:
  - API
autogenerated: 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 were 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. Please migrate to the Manage GHES API endpoints as soon as possible.

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.github %} uses a self-signed certificate before you add your own TLS certificate.

Authentication as the root site administrator

You need to pass your root site administrator password as an authentication token to every endpoint in this category except Create a {% data variables.product.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'

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'