{"meta":{"title":"REST API endpoints for managing GitHub Enterprise Server","intro":"Use the REST API to manage your GitHub Enterprise Server instance.","product":"REST API","breadcrumbs":[{"href":"/en/enterprise-server@3.22/rest","title":"REST API"},{"href":"/en/enterprise-server@3.22/rest/enterprise-admin","title":"Enterprise administration"},{"href":"/en/enterprise-server@3.22/rest/enterprise-admin/manage-ghes","title":"Manage GHES"}],"documentType":"article"},"body":"# REST API endpoints for managing GitHub Enterprise Server\n\nUse the REST API to manage your GitHub Enterprise Server instance.\n\n## About the Manage GitHub Enterprise Server API\n\nYou can manage your GitHub Enterprise Server instance using the Manage GitHub Enterprise Server API. For example, you can retrieve information about the version of the GitHub Enterprise Server software running on the instance, or on instances with multiple nodes, view the status of replication.\n\n> \\[!TIP] You can use this API to replace the functionality of the **Management Console API**, which was removed in GitHub Enterprise Server version 3.15.\n\nSpecify the port number when making API calls to endpoints for the Manage GitHub Enterprise Server API. If your instance uses TLS, the port number is 8443. Otherwise, the port number is 8080. If you cannot provide a port number, you'll need to configure your client to automatically follow redirects. For more information, see [Configuring TLS](/en/enterprise-server@3.22/admin/configuring-settings/hardening-security-for-your-enterprise/configuring-tls).\n\nYou can also use the GitHub Enterprise Server extension of the GitHub CLI to invoke endpoints in the Manage GitHub Enterprise Server API. For more information, see the [`github/gh-es`](https://github.com/github/gh-es/blob/main/README.md) repository.\n\n### Authentication\n\nTo authenticate requests to endpoints for the Manage GitHub Enterprise Server API, specify the password for the instance's root site administrator account as an authentication token. Use standard HTTP authentication to send the password. The `api_key` user identifies the root site administrator. The following example demonstrates authentication for this API. Replace ROOT-SITE-ADMINISTRATOR-PASSWORD with the password, and ADMINISTRATION-PORT with either 8443 or 8080.\n\n```shell\ncurl -L -u \"api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD\" 'http(s)://HOSTNAME:ADMINISTRATION-PORT/manage'\n```\n\n### Authentication as a Management Console user\n\nManagement Console user accounts can also authenticate to access these endpoints. For more information, see [Managing access to the Management Console](/en/enterprise-server@3.22/admin/administering-your-instance/administering-your-instance-from-the-web-ui/managing-access-to-the-management-console#management-console-user).\n\nTo authenticate with the password for a 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.\n\n```shell\ncurl -L -u \"YOUR_USER_NAME:YOUR_PASSWORD\" 'http(s)://HOSTNAME:ADMINISTRATION-PORT/manage'\n```\n\n### Query parameters\n\nBy default, the response includes information from about all configured nodes for the instance. On an instance with multiple nodes, the details originate from `/data/user/common/cluster.conf`. You can use the following query parameters to filter the response for information about specific nodes.\n\n| Query parameter | Description                                                                                                                                                                                                                   |\n| :-------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `uuid`          | Unique identifier for the node.                                                                                                                                                                                               |\n| `cluster_role`  | For nodes in a cluster, the roles that apply to the node. For more information, see [About cluster nodes](/en/enterprise-server@3.22/admin/monitoring-and-managing-your-instance/configuring-clustering/about-cluster-nodes). |\n\nYou can specify multiple values for the query parameter by delimiting the values with a comma. For example, the following request uses curl to return any nodes with the `web-server` or `storage-server` role.\n\n```shell\ncurl -L -u \"api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD\" 'http(s)://HOSTNAME:ADMINISTRATION-PORT/manage/v1/config/nodes?cluster_role=WebServer,StorageServer'\n```\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## Get the configured SSH keys\n\n```\nGET /manage/v1/access/ssh\n```\n\nGets the configured SSH keys on all available nodes. For more information, see \"Accessing the administrative shell (SSH).\"\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/access/ssh\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n\n* `key`: string, format: ssh-key\n* `fingerprint`: string, format: ssh-key fingerprint\n\n## Set a new SSH key\n\n```\nPOST /manage/v1/access/ssh\n```\n\nAdds a SSH key to the authorized\\_keys file for your GitHub Enterprise Server instance. This will grant access via SSH to your instance. For more information, see \"Accessing the administrative shell (SSH).\"\n\n### Parameters\n\n#### Body parameters\n\n* **`key`** (string) (required)\n  The public SSH key to add to the authorized\\_keys file.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  http(s)://HOSTNAME/manage/v1/access/ssh \\\n  -d '{\n  \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADCIABAAAAgQCY/ZiDDOFWcZnYXPwMbvwQDofXPdHxLfxPK+HWGVPd1DLcDncYBUSB0bmCU2g9Sc+oHKLoHhXp0ivau9h+EpmQJ7V8vqsRdD9pc4aL/WAnUyF4o3Y7xL94rlRpVbVo/tNjzcvqxxyzBiYyy3GciCMpYQh/uKt56B94/5PNyIGEEw==\"\n}'\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n\n* `hostname`: string, format: hostname\n* `uuid`: string, format: uuid\n* `message`: string\n* `error`: string\n* `modified`: boolean\n\n## Delete a SSH key\n\n```\nDELETE /manage/v1/access/ssh\n```\n\nDeletes a SSH key from the authorized\\_keys file for your GitHub Enterprise Server instance. This will remove access via SSH to your instance. For more information, see \"Accessing the administrative shell (SSH).\"\n\n### Parameters\n\n#### Body parameters\n\n* **`key`** (string) (required)\n  The public SSH key to remove from the authorized\\_keys file.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  http(s)://HOSTNAME/manage/v1/access/ssh \\\n  -d '{\n  \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADCIABAAAAgQCY/ZiDDOFWcZnYXPwMbvwQDofXPdHxLfxPK+HWGVPd1DLcDncYBUSB0bmCU2g9Sc+oHKLoHhXp0ivau9h+EpmQJ7V8vqsRdD9pc4aL/WAnUyF4o3Y7xL94rlRpVbVo/tNjzcvqxxyzBiYyy3GciCMpYQh/uKt56B94/5PNyIGEEw==\"\n}'\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n\n* `hostname`: string, format: hostname\n* `uuid`: string, format: uuid\n* `message`: string\n* `error`: string\n\n## Get the system requirement check results for configured cluster nodes\n\n```\nGET /manage/v1/checks/system-requirements\n```\n\nChecks if the minimum requirements for system hardware resources are met on each configured cluster node.\nThis endpoint may take several seconds to reply.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/checks/system-requirements\n```\n\n**Response schema (Status: 200):**\n\n* `status`: string, enum: `OK`, `FAILED`\n* `nodes`: array of objects:\n  * `hostname`: string\n  * `status`: string, enum: `OK`, `FAILED`\n  * `roles_status`: array of objects:\n    * `status`: string, enum: `OK`, `FAILED`\n    * `role`: string\n\n## Get the status of services running on all cluster nodes\n\n```\nGET /manage/v1/cluster/status\n```\n\nGets the status of all services running on each cluster node.\nThis endpoint may take several seconds to reply.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/cluster/status\n```\n\n**Response schema (Status: 200):**\n\n* `status`: string, enum: `UNKNOWN`, `OK`, `WARNING`, `CRITICAL`\n* `nodes`: array of objects:\n  * `hostname`: string\n  * `status`: string, enum: `UNKNOWN`, `OK`, `WARNING`, `CRITICAL`\n  * `services`: array of objects:\n    * `status`: string, enum: `UNKNOWN`, `OK`, `WARNING`, `CRITICAL`\n    * `name`: string\n    * `details`: string\n\n## Get the status of a ghe-config-apply run\n\n```\nGET /manage/v1/config/apply\n```\n\nDisplays the current status of ghe-config-apply in the environment or the status of a historical run by ID.\n\n### Parameters\n\n#### Path and query parameters\n\n* **`run_id`** (string)\n  The unique run ID of the ghe-config-apply run.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/config/apply\n```\n\n**Response schema (Status: 200):**\n\n* `running`: boolean\n* `successful`: boolean\n* `nodes`: array of objects:\n  * `run_id`: string\n  * `hostname`: string\n  * `running`: boolean\n  * `successful`: boolean\n\n## Trigger a ghe-config-apply run\n\n```\nPOST /manage/v1/config/apply\n```\n\nTriggers a run of ghe-config-apply from the ghes-manage agent on your Nomad Delegate instance.\nYou can provide a run ID or allow one to be generated randomly.\n\n### Parameters\n\n#### Body parameters\n\n* **`run_id`** (string)\n  The run ID to execute ghe-config-apply with. If not provided, a run ID will be generated randomly.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  http(s)://HOSTNAME/manage/v1/config/apply \\\n  -d '{\n  \"run_id\": \"d34db33f\"\n}'\n```\n\n**Response schema (Status: 200):**\n\n* `run_id`: string\n\n## List events from ghe-config-apply\n\n```\nGET /manage/v1/config/apply/events\n```\n\nLists events from an in-process ghe-config-apply run on your Github Enterprise Server instance.\n\n### Parameters\n\n#### Path and query parameters\n\n* **`last_request_id`** (string)\n  The unique ID of the last response from a host, used for pagination.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/config/apply/events\n```\n\n**Response schema (Status: 200):**\n\n* `nodes`: array of objects:\n  * `node`: string\n  * `last_request_id`: string\n  * `events`: array of objects:\n    * `timestamp`: string\n    * `severity_text`: string\n    * `body`: string\n    * `event_name`: string\n    * `topology`: string\n    * `hostname`: string\n    * `config_run_id`: string\n    * `trace_id`: string\n    * `span_id`: string\n    * `span_parent_id`: string\n    * `span_depth`: integer\n\n## Initialize instance configuration with license and password\n\n```\nPOST /manage/v1/config/init\n```\n\nWhen you boot and set up a GitHub instance for the first time, you can use this endpoint to upload a license and set the initial root site administrator password.\nImportant\n\nTo start the configuration process and apply the license, you need to POST to /manage/v1/config/apply\n\nThe root site administrator password provided when calling this endpoint is used to authenticate for all other endpoints in the GHES Manage API and the Management Console UI.\nNote\n\nThe request body for this operation must be submitted as multipart/form-data data. You can can reference the license file by prefixing the filename with the @ symbol using curl. For more information, see the curl documentation.\n\n### Parameters\n\n#### Body parameters\n\n* **`license`** (string) (required)\n  The content of your .ghl license file.\n\n* **`password`** (string) (required)\n  The root site administrator password.\n\n### HTTP response status codes\n\n* **202** - Accepted\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  http(s)://HOSTNAME/manage/v1/config/init \\\n  -d '{\n  \"license\": \"@enterprise.ghl\",\n  \"password\": \"provide-password-here!\"\n}'\n```\n\n**Response schema (Status: 202):**\n\n## Get the enterprise license information\n\n```\nGET /manage/v1/config/license\n```\n\nGets information about the license that is currently set for the enterprise.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/config/license\n```\n\n**Response schema (Status: 200):**\n\n* `advancedSecurityEnabled`: boolean\n* `advancedSecuritySeats`: integer\n* `clusterSupport`: boolean\n* `company`: string\n* `croquetSupport`: boolean\n* `customTerms`: boolean\n* `evaluation`: boolean\n* `expireAt`: string, format: date-time\n* `insightsEnabled`: boolean\n* `insightsExpireAt`: string, format: date-time\n* `learningLabEvaluationExpires`: string, format: date-time\n* `learningLabSeats`: integer\n* `perpetual`: boolean\n* `referenceNumber`: string\n* `seats`: integer\n* `sshAllowed`: boolean\n* `supportKey`: string\n* `unlimitedSeating`: boolean\n\n## Upload an enterprise license\n\n```\nPUT /manage/v1/config/license\n```\n\nUploads a new enterprise license. In order to apply it right away, use the apply query parameter.\nNote\n\nThe request body for this operation must be submitted as multipart/form-data data. You can can reference the license file by prefixing the filename with the @ symbol using curl. For more information, see the curl documentation.\n\n### Parameters\n\n#### Path and query parameters\n\n* **`apply`** (boolean)\n  Whether to instantly apply changes from the license. Otherwise the new license can be applied using the /manage/v1/config/apply endpoint.\n\n#### Body parameters\n\n* **`license`** (string) (required)\n  The content of your .ghl license file.\n\n### HTTP response status codes\n\n* **201** - Created\n\n* **202** - Accepted\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example 1: Status Code 201\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  http(s)://HOSTNAME/manage/v1/config/license \\\n  -d '{\n  \"license\": \"@enterprise.ghl\"\n}'\n```\n\n**Response schema (Status: 201):**\n\n#### Example 2: Status Code 202\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  http(s)://HOSTNAME/manage/v1/config/license \\\n  -d '{\n  \"license\": \"@enterprise.ghl\"\n}'\n```\n\n**Response schema (Status: 202):**\n\n## Check a license\n\n```\nGET /manage/v1/config/license/check\n```\n\nCheck the status of the license that is currently set for the enterprise.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/config/license/check\n```\n\n**Response schema (Status: 200):**\n\n* `status`: string, enum: `valid`, `invalid`, `expired`, `cluster mode not supported`\n\n## Get GHES node metadata for all nodes\n\n```\nGET /manage/v1/config/nodes\n```\n\nGet node metadata for all configured nodes in the current cluster. For more information, see \"About clustering.\"\n\n### Parameters\n\n#### Path and query parameters\n\n* **`uuid`** (string)\n  The UUID which identifies a node.\n\n* **`cluster_roles`** (string)\n  The cluster roles from the cluster configuration file.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/config/nodes\n```\n\n**Response schema (Status: 200):**\n\n* `topology`: string, enum: `SingleNode`, `Ha`, `Cluster`\n* `nodes`: array of objects:\n  * `hostname`: string\n  * `uuid`: string\n  * `replica`: boolean\n  * `cluster_roles`: array of string, enum: `Blank`, `ActionsServer`, `ConsulServer`, `ElasticsearchServer`, `GitServer`, `JobServer`, `LaunchServer`, `MemcacheServer`, `MetricsServer`, `MssqlServer`, `MysqlServer`, `PagesServer`, `RedisServer`, `StorageServer`, `WebServer`\n\n## Get the GHES settings\n\n```\nGET /manage/v1/config/settings\n```\n\nGets a list of settings for a GitHub Enterprise Server instance.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/config/settings\n```\n\n**Response schema (Status: 200):**\n\n* `private_mode`: boolean\n* `public_pages`: boolean\n* `subdomain_isolation`: boolean\n* `signup_enabled`: boolean\n* `github_hostname`: string\n* `identicons_host`: string\n* `http_proxy`: string or null\n* `auth_mode`: string\n* `expire_sessions`: boolean\n* `admin_password`: string or null\n* `configuration_id`: integer\n* `configuration_run_count`: integer\n* `avatar`: object:\n  * `enabled`: boolean\n  * `uri`: string\n* `customer`: object:\n  * `name`: string\n  * `email`: string\n  * `uuid`: string\n  * `secret_key_data`: string\n  * `public_key_data`: string\n* `license`: object:\n  * `seats`: integer\n  * `evaluation`: boolean\n  * `perpetual`: boolean\n  * `unlimited_seating`: boolean\n  * `support_key`: string\n  * `ssh_allowed`: boolean\n  * `cluster_support`: boolean\n  * `expire_at`: string\n* `github_ssl`: object:\n  * `enabled`: boolean\n  * `cert`: string or null\n  * `key`: string or null\n* `ldap`: object:\n  * `host`: string or null\n  * `port`: integer\n  * `base`: array of string\n  * `uid`: string or null\n  * `bind_dn`: string or null\n  * `password`: string or null\n  * `method`: string\n  * `search_strategy`: string\n  * `user_groups`: array of string\n  * `admin_group`: string or null\n  * `virtual_attribute_enabled`: boolean\n  * `recursive_group_search`: boolean\n  * `posix_support`: boolean\n  * `user_sync_emails`: boolean\n  * `user_sync_keys`: boolean\n  * `user_sync_interval`: integer\n  * `team_sync_interval`: integer\n  * `sync_enabled`: boolean\n  * `reconciliation`: object:\n    * `user`: string or null\n    * `org`: string or null\n  * `profile`: object:\n    * `uid`: string\n    * `name`: string or null\n    * `mail`: string or null\n    * `key`: string or null\n* `cas`: object:\n  * `url`: string or null\n* `saml`: object:\n  * `sso_url`: string or null\n  * `certificate`: string or null\n  * `certificate_path`: string or null\n  * `issuer`: string or null\n  * `idp_initiated_sso`: boolean\n  * `disable_admin_demote`: boolean\n* `github_oauth`: object:\n  * `client_id`: string\n  * `client_secret`: string\n  * `organization_name`: string\n  * `organization_team`: string\n* `smtp`: object:\n  * `enabled`: boolean\n  * `address`: string\n  * `authentication`: string\n  * `port`: string\n  * `domain`: string\n  * `username`: string\n  * `user_name`: string\n  * `enable_starttls_auto`: boolean\n  * `password`: string\n  * `discard-to-noreply-address`: boolean\n  * `support_address`: string\n  * `support_address_type`: string\n  * `noreply_address`: string\n* `ntp`: object:\n  * `primary_server`: string\n  * `secondary_server`: string\n* `timezone`: string or null\n* `snmp`: object:\n  * `enabled`: boolean\n  * `community`: string\n* `syslog`: object:\n  * `enabled`: boolean\n  * `server`: string or null\n  * `protocol_name`: string\n* `assets`: string or null\n* `pages`: object:\n  * `enabled`: boolean\n* `collectd`: object:\n  * `enabled`: boolean\n  * `server`: string or null\n  * `port`: integer\n  * `encryption`: string or null\n  * `username`: string or null\n  * `password`: string or null\n* `mapping`: object:\n  * `enabled`: boolean\n  * `tileserver`: string or null\n  * `basemap`: string\n  * `token`: string or null\n* `load_balancer`: string or null\n* `prometheus`: object:\n  * `enabled`: boolean\n  * `trusted_ips`: string or null\n\n## Set settings\n\n```\nPUT /manage/v1/config/settings\n```\n\nUpdates the settings on your instance. For a list of the available settings, see the Get settings endpoint.\nNotes:\n\nThe request body only requires the settings parameters that should be updated to be specified, all other parameters will be unmodified or populated from the default values.\nYou cannot set the Management Console root site administrator password with this API endpoint. Use the ghe-set-password utility to change the management console password. For more information, see \"Command-line utilities.\"\n\n### HTTP response status codes\n\n* **204** - No Content\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  http(s)://HOSTNAME/manage/v1/config/settings \\\n  -d '{\n  \"public_pages\": true\n}'\n```\n\n**Response schema (Status: 204):**\n\n## Get the status of maintenance mode\n\n```\nGET /manage/v1/maintenance\n```\n\nGets the status and details of maintenance mode on all available nodes. For more information, see \"Enabling and scheduling maintenance mode.\"\n\n### Parameters\n\n#### Path and query parameters\n\n* **`uuid`** (string)\n  The UUID which identifies a node.\n\n* **`cluster_roles`** (string)\n  The cluster roles from the cluster configuration file.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/maintenance\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n\n* `hostname`: string, format: hostname\n* `uuid`: string, format: uuid\n* `status`: string, enum: `on`, `off`, `scheduled`\n* `scheduled_time`: string, format: date\n* `connection_services`: array of objects:\n  * `name`: string\n  * `number`: integer\n* `can_unset_maintenance`: boolean\n* `ip_exception_list`: array of string, format: ip/cidr\n* `maintenance_mode_message`: string\n\n## Set the status of maintenance mode\n\n```\nPOST /manage/v1/maintenance\n```\n\nSets or schedules the maintenance mode. For more information, see \"Enabling and scheduling maintenance mode.\"\n\n### Parameters\n\n#### Body parameters\n\n* **`enabled`** (boolean) (required)\n  Whether to enable maintenance mode.\n\n* **`uuid`** (string)\n  The UUID of the node to target. This parameter is incompatible with maintenance mode scheduling. Only use uuid if the value of when is empty or now.\n\n* **`when`** (string)\n  The time to enable maintenance mode. If this parameter is empty or set to now, maintenance mode is enabled immediately. Otherwise, maintenance mode is enabled at the specified time. The format is ISO 8601.\n\n* **`ip_exception_list`** (array of strings)\n  The list of IP addresses to exclude from maintenance mode. IPv4, IPv6, and CIDR addresses are supported.\n\n* **`maintenance_mode_message`** (string)\n  The message to display to users when maintenance mode is enabled.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  http(s)://HOSTNAME/manage/v1/maintenance \\\n  -d '{\n  \"enabled\": true,\n  \"when\": \"2006-01-02T15:04:05+00:00\",\n  \"ip_exception_list\": [\n    \"192.168.1.0/24\",\n    \"1.1.1.1\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Delete a SSH key](#delete-a-ssh-key).\n\n## Get the status of services running on all replica nodes\n\n```\nGET /manage/v1/replication/status\n```\n\nGets the status of all services running on each replica node.\nThis endpoint may take several seconds to reply.\n\n### Parameters\n\n#### Path and query parameters\n\n* **`uuid`** (string)\n  The UUID which identifies a node.\n\n* **`cluster_roles`** (string)\n  The cluster roles from the cluster configuration file.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/replication/status\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Get the status of services running on all cluster nodes](#get-the-status-of-services-running-on-all-cluster-nodes).\n\n## Apply an upgrade\n\n```\nPOST /manage/v1/upgrade/apply\n```\n\nApplies an upgrade package on a GitHub Enterprise Server node. You can run a full upgrade (pre-upgrade + upgrade), or a specific phase. Either upgrade\\_package\\_file or version is required. When phase is omitted, both pre-upgrade and upgrade phases run sequentially.\n\n### Parameters\n\n#### Body parameters\n\n* **`upgrade_package_file`** (string)\n  Absolute path to the upgrade package file. Must be under /var/lib/ghe-updates/ and the path must be canonical (no .. or duplicate slashes).\n\n* **`version`** (string)\n  Target upgrade version in semantic version format (e.g. 3.19.3). The version is normalized to major.minor.patch format.\n\n* **`target_partition`** (string)\n  Target block device partition for the upgrade.\n\n* **`phase`** (string)\n  Upgrade phase to run. Valid values are pre-upgrade or upgrade. Omit for a full upgrade.\n  Can be one of: `pre-upgrade`, `upgrade`\n\n* **`skip_reboot`** (boolean)\n  Whether to skip the reboot after the upgrade completes. Default is false.\n  Default: `false`\n\n* **`uuid`** (string)\n  The UUID of a specific node to upgrade. When omitted, the upgrade is applied to all nodes.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **404** - Not found\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://HOSTNAME/manage/v1/upgrade/apply \\\n  -d '{\n  \"version\": \"3.19.3\"\n}'\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n\n* `hostname`: string\n* `uuid`: string\n* `message`: string\n* `error`: string\n\n## Download an upgrade package\n\n```\nPOST /manage/v1/upgrade/download\n```\n\nStarts an asynchronous GitHub Enterprise Server upgrade package download on the\ntargeted node set.\nOn single-node and high availability topologies, the gateway fans out directly\nto the targeted nodes and returns a 200 OK response containing one result per\nnode, unless an orchestration option is provided. On cluster topologies, or\nwhenever max\\_parallel, node\\_timeout, or max\\_attempts is provided, the\ngateway starts an in-memory throttled orchestration and returns 202 Accepted.\nIf version is omitted, each agent resolves the latest eligible upgrade\npackage version for that node. The download runs in the background; use the\nupgrade download status endpoint to monitor progress.\n\n### Parameters\n\n#### Body parameters\n\n* **`version`** (string)\n  Semantic version of the upgrade package to download. If omitted, the agent resolves the latest eligible version.\n\n* **`force`** (boolean)\n  Whether to remove an existing package file before starting a new download.\n  Default: `false`\n\n* **`uuids`** (array of strings)\n  Node UUIDs to target after gateway query filters are applied. Blank values are ignored; if all supplied values are blank, the request is rejected.\n\n* **`max_parallel`** (integer)\n  Selects gateway-side orchestration and limits the number of nodes downloading at the same time. Non-positive values use the gateway default, and values above the target node count are capped to that count.\n  Default: `2`\n\n* **`node_timeout`** (string)\n  Selects gateway-side orchestration and marks an in-flight node download as stuck after this Go duration. Defaults to 30m and must be at most 2h.\n  Default: `30m0s`\n\n* **`max_attempts`** (integer)\n  Selects gateway-side orchestration and sets the maximum number of attempts per node. Non-positive values use the gateway default. The maximum accepted value is 5.\n  Default: `3`\n\n### HTTP response status codes\n\n* **200** - Direct fan-out accepted the download request on the targeted nodes. Individual node failures are returned in each node result and do not change the HTTP status code.\n\n* **202** - Gateway-side throttled orchestration was accepted and started in the background.\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **404** - Not found\n\n* **409** - Download orchestration could not start because another orchestration is running, or because a targeted node is already downloading a package.\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://HOSTNAME/manage/v1/upgrade/download \\\n  -d '{\n  \"version\": \"3.19.3\",\n  \"force\": false\n}'\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n\n* `hostname`: string\n* `uuid`: string\n* `download_id`: string\n* `message`: string\n* `error`: string\n\n## Get the upgrade package download status\n\n```\nGET /manage/v1/upgrade/download/status\n```\n\nReturns the aggregate and per-node status for GitHub Enterprise Server upgrade\npackage downloads.\nWhile a gateway-side throttled orchestration is running, the response includes\nan orchestration object with queue-level counts and the status is scoped to\nthe gateway-filtered node set. When no orchestration is active, the gateway\nfans out to the targeted agents and aggregates their per-node download status.\nUse uuid query filters to inspect a subset of\nnodes.\n\n### Parameters\n\n#### Path and query parameters\n\n* **`uuid`** (string)\n  The UUID which identifies a node.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example 1: Status Code 200\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://HOSTNAME/manage/v1/upgrade/download/status\n```\n\n**Response schema (Status: 200):**\n\n* `download_id`: string\n* `package_name`: string\n* `status`: string, enum: `not_started`, `downloading`, `completed`, `failed`\n* `error_message`: string\n* `nodes`: array of objects:\n  * `hostname`: string\n  * `uuid`: string\n  * `download_id`: string\n  * `package_name`: string\n  * `status`: string, enum: `not_started`, `downloading`, `completed`, `failed`\n  * `progress`: string\n  * `error`: string\n* `orchestration`: object:\n  * `phase`: string, enum: `running`, `completed`, `failed`\n  * `error_message`: string\n  * `max_parallel`: integer\n  * `queued`: integer\n  * `in_flight`: integer\n  * `completed`: integer\n  * `failed`: integer\n  * `total`: integer\n\n#### Example 2: Status Code 200\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://HOSTNAME/manage/v1/upgrade/download/status\n```\n\n**Response schema (Status: 200):**\n\n* `download_id`: string\n* `package_name`: string\n* `status`: string, enum: `not_started`, `downloading`, `completed`, `failed`\n* `error_message`: string\n* `nodes`: array of objects:\n  * `hostname`: string\n  * `uuid`: string\n  * `download_id`: string\n  * `package_name`: string\n  * `status`: string, enum: `not_started`, `downloading`, `completed`, `failed`\n  * `progress`: string\n  * `error`: string\n* `orchestration`: object:\n  * `phase`: string, enum: `running`, `completed`, `failed`\n  * `error_message`: string\n  * `max_parallel`: integer\n  * `queued`: integer\n  * `in_flight`: integer\n  * `completed`: integer\n  * `failed`: integer\n  * `total`: integer\n\n## Get the upgrade status\n\n```\nGET /manage/v1/upgrade/status\n```\n\nGets the upgrade status from all configured nodes of a GitHub Enterprise Server instance. Returns information about the current upgrade phase, completion status, and individual step details when is\\_verbose mode is enabled.\n\n### Parameters\n\n#### Path and query parameters\n\n* **`uuid`** (string)\n  The UUID which identifies a node.\n\n* **`is_verbose`** (boolean)\n  Whether to include detailed step information.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad request\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://HOSTNAME/manage/v1/upgrade/status\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n\n* `hostname`: string\n* `uuid`: string\n* `release_version`: string or null\n* `release_sha`: string or null\n* `status`: string, enum: `not_started`, `in_progress`, `completed`, `failed`\n* `pre_upgrade_status`: string, enum: `not_started`, `in_progress`, `completed`, `failed`\n* `upgrade_last_completed_step`: string or null\n* `is_running`: boolean\n* `failed`: boolean\n* `steps`: array of objects:\n  * `phase`: string\n  * `step`: string\n  * `status`: string\n  * `started_at`: string, format: date-time\n  * `ended_at`: string, format: date-time\n  * `error`: string\n* `messages`: array of string\n* `error`: string\n\n## Get all GHES release versions for all nodes\n\n```\nGET /manage/v1/version\n```\n\nGets the GitHub Enterprise Server release versions that are currently installed on all available nodes. For more information, see \"GitHub Enterprise Server releases.\"\n\n### Parameters\n\n#### Path and query parameters\n\n* **`uuid`** (string)\n  The UUID which identifies a node.\n\n* **`cluster_roles`** (string)\n  The cluster roles from the cluster configuration file.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **401** - Unauthorized\n\n* **500** - Internal error\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/manage/v1/version\n```\n\n**Response schema (Status: 200):**\n\nArray of objects:\n\n* `hostname`: string, format: hostname\n* `version`: object:\n  * `version`: string, pattern: `[0-9]\\.[0-9]{2}\\.[0-9]`\n  * `platform`: string, enum: `ami`, `azure`, `esx`, `gce`, `hyperv`, `kvm`\n  * `build_id`: string, pattern: `[0-9a-f]{8}`\n  * `build_date`: string, format: date"}