Skip to content

Commit

Permalink
Make some versioning updates for GHES APIs (#53248)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacmbrown authored Nov 25, 2024
1 parent adaf227 commit f7a07d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
8 changes: 3 additions & 5 deletions content/admin/overview/about-the-github-enterprise-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ shortTitle: GitHub Enterprise API
---

With the APIs, you can automate many administrative tasks. Some examples include:
* Perform changes to the {% data variables.enterprise.management_console %}. For more information, see
{% ifversion management-console-manage-ghes-parity -%}
"[AUTOTITLE](/rest/enterprise-admin/manage-ghes)."
{%- else -%}
"[AUTOTITLE](/rest/enterprise-admin/management-console)."

{%- ifversion management-console-manage-ghes-parity %}
* Perform a configuration run to apply changes to {% data variables.enterprise.management_console %} settings. For more information, see "[AUTOTITLE](/rest/enterprise-admin/manage-ghes)."
{%- endif %}
* Configure LDAP sync. For more information, see "[AUTOTITLE](/rest/enterprise-admin/ldap)."
* Collect statistics about your enterprise. For more information, see "[AUTOTITLE](/rest/enterprise-admin/admin-stats)."
Expand Down
26 changes: 5 additions & 21 deletions content/rest/enterprise-admin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,7 @@ autogenerated: rest

## Endpoint URLs

These endpoints
{% ifversion management-console-manage-ghes-parity -%}
—except Manage GitHub Enterprise Server API—
{%- else -%}
—except Management Console API—
{%- endif -%}
are prefixed with the following URL:
These endpoints{% ifversion ghes %}, except the Manage GitHub Enterprise Server API {% ifversion ghes < 3.15 %} and Management Console API{% endif %},{% endif %} are prefixed with the following URL:

```shell
{% data variables.product.rest_url %}
Expand All @@ -61,15 +55,11 @@ When endpoints include `{enterprise}`, replace `{enterprise}` with the handle fo
{% endif %}

{% ifversion ghes %}
{% ifversion management-console-manage-ghes-parity -%}
Manage GitHub Enterprise Server API
{%- else -%}
Management Console API
{%- endif %}
endpoints are only prefixed with a hostname:

Endpoints for the Manage GitHub Enterprise Server API{% ifversion ghes < 3.15 %} and Management Console API{% endif %} are only prefixed with a hostname and administration port:

```shell
http(s)://HOSTNAME/
http(s)://HOSTNAME:ADMINISTRATION-PORT/
```

{% endif %}
Expand All @@ -81,13 +71,7 @@ Your {% data variables.product.product_name %} installation's API endpoints acce

OAuth tokens must have the `site_admin` [OAuth scope](/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes) when used with these endpoints.

These endpoints are only accessible to authenticated {% data variables.product.product_name %} site administrators, except for the
{% ifversion management-console-manage-ghes-parity -%}
[AUTOTITLE](/rest/enterprise-admin/manage-ghes),
{%- else -%}
[AUTOTITLE](/rest/enterprise-admin/management-console),
{%- endif %}
which requires the [Management Console password](/admin/configuration/administering-your-instance-from-the-management-console).
These endpoints are only accessible to authenticated {% data variables.product.product_name %} site administrators, except for endpoints of the [AUTOTITLE](/rest/enterprise-admin/manage-ghes) API{% ifversion ghes < 3.15 %} and [AUTOTITLE](/rest/enterprise-admin/management-console) API{% endif %}, which allow authentication as a Management Console user. See "[AUTOTITLE](/admin/configuration/administering-your-instance-from-the-management-console)."

{% data reusables.enterprise_management_console.api-deprecation %}

Expand Down
2 changes: 1 addition & 1 deletion content/rest/enterprise-admin/manage-ghes.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ By default, the response includes information from about all configured nodes fo
| Query parameter | Description |
| :- | :- |
| `uuid` | Unique identifier for the node. |
| `cluster_role` | For nodes in a cluster, the roles that apply to the node. For more information, see "[AUTOTITLE)(/admin/enterprise-management/configuring-clustering/about-cluster-nodes)." |
| `cluster_role` | For nodes in a cluster, the roles that apply to the node. For more information, see "[AUTOTITLE](/admin/enterprise-management/configuring-clustering/about-cluster-nodes)." |

You 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.

Expand Down

0 comments on commit f7a07d1

Please sign in to comment.