{"meta":{"title":"REST API endpoints для управления GitHub Enterprise Server","intro":"Используйте REST API для управления вашим GitHub Enterprise Server экземпляром.","product":"REST API","breadcrumbs":[{"href":"/ru/enterprise-server@3.19/rest","title":"REST API"},{"href":"/ru/enterprise-server@3.19/rest/enterprise-admin","title":"Администрирование предприятия"},{"href":"/ru/enterprise-server@3.19/rest/enterprise-admin/manage-ghes","title":"Управление GHES"}],"documentType":"article"},"body":"# REST API endpoints для управления GitHub Enterprise Server\n\nИспользуйте REST API для управления вашим GitHub Enterprise Server экземпляром.\n\n## О API управления GitHub Enterprise Server\n\nВы можете управлять ваш экземпляр GitHub Enterprise Server с помощью API управления GitHub Enterprise Server . Например, вы можете получить информацию о версии GitHub Enterprise Server программного обеспечения, работающей на экземпляре, или о экземплярах с несколькими узлами, просматривать статус репликации.\n\n> \\[!TIP] Вы можете использовать этот API для замены функционала **Management Console** API, который был удалён в GitHub Enterprise Server версии 3.15.\n\nУкажите номер порта при выполнении API-вызовов конечных точек Управления GitHub Enterprise Server API. Если экземпляр использует TLS, номер порта равен 8443. В противном случае номер порта равен 8080. Если вы не можете указать номер порта, необходимо настроить клиент для автоматического выполнения перенаправлений. Дополнительные сведения см. в разделе [Настройка TLS](/ru/enterprise-server@3.19/admin/configuring-settings/hardening-security-for-your-enterprise/configuring-tls).\n\nВы также можете использовать GitHub Enterprise Server расширение GitHub CLI для вызова конечных точек в API управления GitHub Enterprise Server . Дополнительные сведения см. в репозитории [`github/gh-es`](https://github.com/github/gh-es/blob/main/README.md).\n\n### Проверка подлинности\n\nДля аутентификации запросов к конечным точкам для API GitHub Enterprise Server управления укажите пароль от учетной записи администратора корневой сети экземпляра в качестве токена аутентификации. Используйте стандартную проверку подлинности HTTP для отправки пароля. Пользователь `api_key` определяет корневого администратора сайта. В следующем примере показана проверка подлинности для этого API. Замените ROOT-SITE-ADMINISTRATOR-PASSWORD паролем и ADMINISTRATION-PORT либо 8443, либо 8080.\n\n```shell\ncurl -L -u \"api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD\" 'http(s)://HOSTNAME:ADMINISTRATION-PORT/manage'\n```\n\n### Аутентификация как Консоль управления пользователя\n\nКонсоль управления Учетные записи пользователей также могут аутентифицироваться для доступа к этим конечным точкам. Дополнительные сведения см. в разделе [Управление доступом к консоли управления](/ru/enterprise-server@3.19/admin/administering-your-instance/administering-your-instance-from-the-web-ui/managing-access-to-the-management-console#management-console-user).\n\nДля аутентификации с паролем от Консоль управления учётной записи пользователя используйте стандартную HTTP-аутентификацию. В следующем примере замените YOUR\\_USER\\_NAME и YOUR\\_PASSWORD именем пользователя и паролем учетной записи.\n\n```shell\ncurl -L -u \"YOUR_USER_NAME:YOUR_PASSWORD\" 'http(s)://HOSTNAME:ADMINISTRATION-PORT/manage'\n```\n\n### Параметры запроса\n\nПо умолчанию ответ содержит сведения обо всех настроенных узлах для экземпляра. В экземпляре с несколькими узлами данные, полученные из `/data/user/common/cluster.conf`. Чтобы отфильтровать ответ по конкретным узлам, можно использовать следующие параметры запроса.\n\n| Параметр запроса | Description                                                                                                                                                                                                                                   |\n| :--------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `uuid`           | Уникальный идентификатор узла.                                                                                                                                                                                                                |\n| `cluster_role`   | Для узлов в кластере роли, которые применяются к узлу. Дополнительные сведения см. в разделе [Сведения об узлах кластера](/ru/enterprise-server@3.19/admin/monitoring-and-managing-your-instance/configuring-clustering/about-cluster-nodes). |\n\nМожно указать несколько значений для параметра запроса, разделив значения запятой. Например, следующий запрос использует curl для возврата всех узлов с `web-server` ролью или `storage-server` ролью.\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: 2022-11-28`. 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## 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"}