@octokit/openapi-types-ghec
Version:
Generated TypeScript definitions based on GitHub's OpenAPI spec for ghec
839 lines (837 loc) • 4.98 MB
TypeScript
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
/** OneOf type helpers */
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
type XOR<T, U> = T | U extends object
? (Without<T, U> & U) | (Without<U, T> & T)
: T | U;
type OneOf<T extends any[]> = T extends [infer Only]
? Only
: T extends [infer A, infer B, ...infer Rest]
? OneOf<[XOR<A, B>, ...Rest]>
: never;
export interface paths {
"/": {
/**
* GitHub API Root
* @description Get Hypermedia links to resources accessible in GitHub's REST API
*/
get: operations["meta/root"];
};
"/advisories": {
/**
* List global security advisories
* @description Lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.
*
* By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/enterprise-cloud@latest//code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)."
*/
get: operations["security-advisories/list-global-advisories"];
};
"/advisories/{ghsa_id}": {
/**
* Get a global security advisory
* @description Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.
*/
get: operations["security-advisories/get-global-advisory"];
};
"/app": {
/**
* Get the authenticated app
* @description Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint.
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: operations["apps/get-authenticated"];
};
"/app-manifests/{code}/conversions": {
/**
* Create a GitHub App from a manifest
* @description Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`.
*/
post: operations["apps/create-from-manifest"];
};
"/app/hook/config": {
/**
* Get a webhook configuration for an app
* @description Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: operations["apps/get-webhook-config-for-app"];
/**
* Update a webhook configuration for an app
* @description Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
patch: operations["apps/update-webhook-config-for-app"];
};
"/app/hook/deliveries": {
/**
* List deliveries for an app webhook
* @description Returns a list of webhook deliveries for the webhook configured for a GitHub App.
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: operations["apps/list-webhook-deliveries"];
};
"/app/hook/deliveries/{delivery_id}": {
/**
* Get a delivery for an app webhook
* @description Returns a delivery for the webhook configured for a GitHub App.
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: operations["apps/get-webhook-delivery"];
};
"/app/hook/deliveries/{delivery_id}/attempts": {
/**
* Redeliver a delivery for an app webhook
* @description Redeliver a delivery for the webhook configured for a GitHub App.
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
post: operations["apps/redeliver-webhook-delivery"];
};
"/app/installation-requests": {
/**
* List installation requests for the authenticated app
* @description Lists all the pending installation requests for the authenticated GitHub App.
*/
get: operations["apps/list-installation-requests-for-authenticated-app"];
};
"/app/installations": {
/**
* List installations for the authenticated app
* @description You must use a [JWT](https://docs.github.com/enterprise-server@3.9/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*
* The permissions the installation has are included under the `permissions` key.
*/
get: operations["apps/list-installations"];
};
"/app/installations/{installation_id}": {
/**
* Get an installation for the authenticated app
* @description Enables an authenticated GitHub App to find an installation's information using the installation id.
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
get: operations["apps/get-installation"];
/**
* Delete an installation for the authenticated app
* @description Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#suspend-an-app-installation)" endpoint.
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
delete: operations["apps/delete-installation"];
};
"/app/installations/{installation_id}/access_tokens": {
/**
* Create an installation access token for an app
* @description Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.
*
* Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.
*
* Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
post: operations["apps/create-installation-access-token"];
};
"/app/installations/{installation_id}/suspended": {
/**
* Suspend an app installation
* @description Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub Enterprise Cloud API or webhook events is blocked for that account.
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
put: operations["apps/suspend-installation"];
/**
* Unsuspend an app installation
* @description Removes a GitHub App installation suspension.
*
* You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
*/
delete: operations["apps/unsuspend-installation"];
};
"/applications/{client_id}/grant": {
/**
* Delete an app authorization
* @description OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.
* Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
*/
delete: operations["apps/delete-authorization"];
};
"/applications/{client_id}/token": {
/**
* Check a token
* @description OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`.
*/
post: operations["apps/check-token"];
/**
* Delete an app token
* @description OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization.
*/
delete: operations["apps/delete-token"];
/**
* Reset a token
* @description OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`.
*/
patch: operations["apps/reset-token"];
};
"/applications/{client_id}/token/scoped": {
/**
* Create a scoped access token
* @description Use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specify
* which repositories the token can access and which permissions are granted to the
* token.
*
* Invalid tokens will return `404 NOT FOUND`.
*/
post: operations["apps/scope-token"];
};
"/apps/{app_slug}": {
/**
* Get an app
* @description > [!NOTE]
* > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).
*/
get: operations["apps/get-by-slug"];
};
"/assignments/{assignment_id}": {
/**
* Get an assignment
* @description Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
*/
get: operations["classroom/get-an-assignment"];
};
"/assignments/{assignment_id}/accepted_assignments": {
/**
* List accepted assignments for an assignment
* @description Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
*/
get: operations["classroom/list-accepted-assignments-for-an-assignment"];
};
"/assignments/{assignment_id}/grades": {
/**
* Get assignment grades
* @description Gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.
*/
get: operations["classroom/get-assignment-grades"];
};
"/classrooms": {
/**
* List classrooms
* @description Lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms.
*/
get: operations["classroom/list-classrooms"];
};
"/classrooms/{classroom_id}": {
/**
* Get a classroom
* @description Gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom.
*/
get: operations["classroom/get-a-classroom"];
};
"/classrooms/{classroom_id}/assignments": {
/**
* List assignments for a classroom
* @description Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom.
*/
get: operations["classroom/list-assignments-for-a-classroom"];
};
"/codes_of_conduct": {
/**
* Get all codes of conduct
* @description Returns array of all GitHub's codes of conduct.
*/
get: operations["codes-of-conduct/get-all-codes-of-conduct"];
};
"/codes_of_conduct/{key}": {
/**
* Get a code of conduct
* @description Returns information about the specified GitHub code of conduct.
*/
get: operations["codes-of-conduct/get-conduct-code"];
};
"/credentials/revoke": {
/**
* Revoke a list of credentials
* @description Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation.
*
* This endpoint currently accepts the following credential types:
* - Personal access tokens (classic)
* - Fine-grained personal access tokens
*
* Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.
* GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.
*
* To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.
*
* > [!NOTE]
* > Any authenticated requests will return a 403.
*/
post: operations["credentials/revoke"];
};
"/emojis": {
/**
* Get emojis
* @description Lists all the emojis available to use on GitHub Enterprise Cloud.
*/
get: operations["emojis/get"];
};
"/enterprise-installation/{enterprise_or_org}/server-statistics": {
/**
* Get GitHub Enterprise Server statistics
* @description Returns aggregate usage metrics for your GitHub Enterprise Server 3.5+ instance for a specified time period up to 365 days.
*
* To use this endpoint, your GitHub Enterprise Server instance must be connected to GitHub Enterprise Cloud using GitHub Connect. You must enable Server Statistics, and for the API request provide your enterprise account name or organization name connected to the GitHub Enterprise Server. For more information, see "[Enabling Server Statistics for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)" in the GitHub Enterprise Server documentation.
*
* OAuth app tokens and personal access tokens (classic) need:
* - the `read:enterprise` scope if you connected your GitHub Enterprise Server to an enterprise account and enabled Server Statistics
* - the `read:org` scope if you connected your GitHub Enterprise Server to an organization account and enabled Server Statistics
*/
get: operations["enterprise-admin/get-server-statistics"];
};
"/enterprises/{enterprise}/actions/cache/usage": {
/**
* Get GitHub Actions cache usage for an enterprise
* @description Gets the total GitHub Actions cache usage for an enterprise.
* The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.
*
* OAuth tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
get: operations["actions/get-actions-cache-usage-for-enterprise"];
};
"/enterprises/{enterprise}/actions/hosted-runners": {
/**
* List GitHub-hosted runners for an enterprise
* @description Lists all GitHub-hosted runners configured in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["actions/list-hosted-runners-for-enterprise"];
/**
* Create a GitHub-hosted runner for an enterprise
* @description Creates a GitHub-hosted runner for an enterprise.
* OAuth tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
post: operations["actions/create-hosted-runner-for-enterprise"];
};
"/enterprises/{enterprise}/actions/hosted-runners/images/github-owned": {
/**
* Get GitHub-owned images for GitHub-hosted runners in an enterprise
* @description Get the list of GitHub-owned images available for GitHub-hosted runners for an enterprise.
*/
get: operations["actions/get-hosted-runners-github-owned-images-for-enterprise"];
};
"/enterprises/{enterprise}/actions/hosted-runners/images/partner": {
/**
* Get partner images for GitHub-hosted runners in an enterprise
* @description Get the list of partner images available for GitHub-hosted runners for an enterprise.
*/
get: operations["actions/get-hosted-runners-partner-images-for-enterprise"];
};
"/enterprises/{enterprise}/actions/hosted-runners/limits": {
/**
* Get limits on GitHub-hosted runners for an enterprise
* @description Get the GitHub-hosted runners limits for an enterprise.
*/
get: operations["actions/get-hosted-runners-limits-for-enterprise"];
};
"/enterprises/{enterprise}/actions/hosted-runners/machine-sizes": {
/**
* Get GitHub-hosted runners machine specs for an enterprise
* @description Get the list of machine specs available for GitHub-hosted runners for an enterprise.
*/
get: operations["actions/get-hosted-runners-machine-specs-for-enterprise"];
};
"/enterprises/{enterprise}/actions/hosted-runners/platforms": {
/**
* Get platforms for GitHub-hosted runners in an enterprise
* @description Get the list of platforms available for GitHub-hosted runners for an enterprise.
*/
get: operations["actions/get-hosted-runners-platforms-for-enterprise"];
};
"/enterprises/{enterprise}/actions/hosted-runners/{hosted_runner_id}": {
/**
* Get a GitHub-hosted runner for an enterprise
* @description Gets a GitHub-hosted runner configured in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["actions/get-hosted-runner-for-enterprise"];
/**
* Delete a GitHub-hosted runner for an enterprise
* @description Deletes a GitHub-hosted runner for an enterprise.
*/
delete: operations["actions/delete-hosted-runner-for-enterprise"];
/**
* Update a GitHub-hosted runner for an enterprise
* @description Updates a GitHub-hosted runner for an enterprise.
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
patch: operations["actions/update-hosted-runner-for-enterprise"];
};
"/enterprises/{enterprise}/actions/oidc/customization/issuer": {
/**
* Set the GitHub Actions OIDC custom issuer policy for an enterprise
* @description Sets the GitHub Actions OpenID Connect (OIDC) custom issuer policy for an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
put: operations["actions/set-actions-oidc-custom-issuer-policy-for-enterprise"];
};
"/enterprises/{enterprise}/actions/permissions": {
/**
* Get GitHub Actions permissions for an enterprise
* @description Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/get-github-actions-permissions-enterprise"];
/**
* Set GitHub Actions permissions for an enterprise
* @description Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/set-github-actions-permissions-enterprise"];
};
"/enterprises/{enterprise}/actions/permissions/organizations": {
/**
* List selected organizations enabled for GitHub Actions in an enterprise
* @description Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise"];
/**
* Set selected organizations enabled for GitHub Actions in an enterprise
* @description Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise"];
};
"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": {
/**
* Enable a selected organization for GitHub Actions in an enterprise
* @description Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"];
/**
* Disable a selected organization for GitHub Actions in an enterprise
* @description Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
delete: operations["enterprise-admin/disable-selected-organization-github-actions-enterprise"];
};
"/enterprises/{enterprise}/actions/permissions/selected-actions": {
/**
* Get allowed actions and reusable workflows for an enterprise
* @description Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/get-allowed-actions-enterprise"];
/**
* Set allowed actions and reusable workflows for an enterprise
* @description Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/set-allowed-actions-enterprise"];
};
"/enterprises/{enterprise}/actions/permissions/workflow": {
/**
* Get default workflow permissions for an enterprise
* @description Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise,
* as well as whether GitHub Actions can submit approving pull request reviews. For more information, see
* "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)."
*
* OAuth tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
get: operations["actions/get-github-actions-default-workflow-permissions-enterprise"];
/**
* Set default workflow permissions for an enterprise
* @description Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets
* whether GitHub Actions can submit approving pull request reviews. For more information, see
* "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest//admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)."
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
put: operations["actions/set-github-actions-default-workflow-permissions-enterprise"];
};
"/enterprises/{enterprise}/actions/runner-groups": {
/**
* List self-hosted runner groups for an enterprise
* @description Lists all self-hosted runner groups for an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/list-self-hosted-runner-groups-for-enterprise"];
/**
* Create a self-hosted runner group for an enterprise
* @description Creates a new self-hosted runner group for an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
post: operations["enterprise-admin/create-self-hosted-runner-group-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": {
/**
* Get a self-hosted runner group for an enterprise
* @description Gets a specific self-hosted runner group for an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/get-self-hosted-runner-group-for-enterprise"];
/**
* Delete a self-hosted runner group from an enterprise
* @description Deletes a self-hosted runner group for an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
delete: operations["enterprise-admin/delete-self-hosted-runner-group-from-enterprise"];
/**
* Update a self-hosted runner group for an enterprise
* @description Updates the `name` and `visibility` of a self-hosted runner group in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
patch: operations["enterprise-admin/update-self-hosted-runner-group-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": {
/**
* List organization access to a self-hosted runner group in an enterprise
* @description Lists the organizations with access to a self-hosted runner group.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise"];
/**
* Set organization access for a self-hosted runner group in an enterprise
* @description Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise"];
};
"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": {
/**
* Add organization access to a self-hosted runner group in an enterprise
* @description Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise"];
/**
* Remove organization access to a self-hosted runner group in an enterprise
* @description Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
delete: operations["enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise"];
};
"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": {
/**
* List self-hosted runners in a group for an enterprise
* @description Lists the self-hosted runners that are in a specific enterprise group.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/list-self-hosted-runners-in-group-for-enterprise"];
/**
* Set self-hosted runners in a group for an enterprise
* @description Replaces the list of self-hosted runners that are part of an enterprise runner group.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/set-self-hosted-runners-in-group-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": {
/**
* Add a self-hosted runner to a group for an enterprise
* @description Adds a self-hosted runner to a runner group configured in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/add-self-hosted-runner-to-group-for-enterprise"];
/**
* Remove a self-hosted runner from a group for an enterprise
* @description Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
delete: operations["enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runners": {
/**
* List self-hosted runners for an enterprise
* @description Lists all self-hosted runners configured for an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/list-self-hosted-runners-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runners/downloads": {
/**
* List runner applications for an enterprise
* @description Lists binaries for the runner application that you can download and run.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/list-runner-applications-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runners/generate-jitconfig": {
/**
* Create configuration for a just-in-time runner for an Enterprise
* @description Generates a configuration that can be passed to the runner application at startup.
*
* OAuth tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
post: operations["actions/generate-runner-jitconfig-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runners/registration-token": {
/**
* Create a registration token for an enterprise
* @description Returns a token that you can pass to the `config` script. The token expires after one hour.
*
* Example using registration token:
*
* Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
*
* ```
* ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN
* ```
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
post: operations["enterprise-admin/create-registration-token-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runners/remove-token": {
/**
* Create a remove token for an enterprise
* @description Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour.
*
* Example using remove token:
*
* To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this
* endpoint.
*
* ```
* ./config.sh remove --token TOKEN
* ```
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
post: operations["enterprise-admin/create-remove-token-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runners/{runner_id}": {
/**
* Get a self-hosted runner for an enterprise
* @description Gets a specific self-hosted runner configured in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/get-self-hosted-runner-for-enterprise"];
/**
* Delete a self-hosted runner from an enterprise
* @description Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"];
};
"/enterprises/{enterprise}/actions/runners/{runner_id}/labels": {
/**
* List labels for a self-hosted runner for an enterprise
* @description Lists all labels for a self-hosted runner configured in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
get: operations["enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise"];
/**
* Set custom labels for a self-hosted runner for an enterprise
* @description Remove all previous custom labels and set the new custom labels for a specific
* self-hosted runner configured in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
put: operations["enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise"];
/**
* Add custom labels to a self-hosted runner for an enterprise
* @description Add custom labels to a self-hosted runner configured in an enterprise.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
post: operations["enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise"];
/**
* Remove all custom labels from a self-hosted runner for an enterprise
* @description Remove all custom labels from a self-hosted runner configured in an
* enterprise. Returns the remaining read-only labels from the runner.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
delete: operations["enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise"];
};
"/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": {
/**
* Remove a custom label from a self-hosted runner for an enterprise
* @description Remove a custom label from a self-hosted runner configured
* in an enterprise. Returns the remaining labels from the runner.
*
* This endpoint returns a `404 Not Found` status if the custom label is not
* present on the runner.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:enterprise` scope to use this endpoint.
*/
delete: operations["enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise"];
};
"/enterprises/{enterprise}/announcement": {
/**
* Get announcement banner for enterprise
* @description Gets the announcement banner currently set for the enterprise.
*/
get: operations["announcement-banners/get-announcement-banner-for-enterprise"];
/**
* Remove announcement banner from enterprise
* @description Removes the announcement banner currently set for the enterprise.
*/
delete: operations["announcement-banners/remove-announcement-banner-for-enterprise"];
/**
* Set announcement banner for enterprise
* @description Sets the announcement banner to display for the enterprise.
*/
patch: operations["announcement-banners/set-announcement-banner-for-enterprise"];
};
"/enterprises/{enterprise}/audit-log": {
/**
* Get the audit log for an enterprise
* @description Gets the audit log for an enterprise.
*
* This endpoint has a rate limit of 1,750 queries per hour per user and IP address. If your integration receives a rate limit error (typically a 403 or 429 response), it should wait before making another request to the GitHub API. For more information, see "[Rate limits for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api)" and "[Best practices for integrators](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-integrators)."
*
* The authenticated user must be an enterprise admin to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `read:audit_log` scope to use this endpoint.
*/
get: operations["enterprise-admin/get-audit-log"];
};
"/enterprises/{enterprise}/audit-log/stream-key": {
/**
* Get the audit log stream key for encrypting secrets
* @description Retrieves the audit log streaming public key for encrypting secrets.
*
* When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)."
*/
get: operations["enterprise-admin/get-audit-log-stream-key"];
};
"/enterprises/{enterprise}/audit-log/streams": {
/**
* List audit log stream configurations for an enterprise
* @description Lists the configured audit log streaming configurations for an enterprise.
* This only lists configured streams for supported providers.
*
* When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)."
*/
get: operations["enterprise-admin/get-audit-log-streams"];
/**
* Create an audit log streaming configuration for an enterprise
* @description Creates an audit log streaming configuration for any of the supported streaming endpoints: Azure Blob Storage, Azure Event Hubs, Amazon S3, Splunk, Google Cloud Storage, Datadog.
*
* When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)."
*/
post: operations["enterprise-admin/create-audit-log-stream"];
};
"/enterprises/{enterprise}/audit-log/streams/{stream_id}": {
/**
* List one audit log streaming configuration via a stream ID
* @description Lists one audit log stream configuration via a stream ID.
*
* When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)."
*/
get: operations["enterprise-admin/get-one-audit-log-stream"];
/**
* Update an existing audit log stream configuration
* @description Updates an existing audit log stream configuration for an enterprise.
*
* When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)."
*/
put: operations["enterprise-admin/update-audit-log-stream"];
/**
* Delete an audit log streaming configuration for an enterprise
* @description Deletes an existing audit log stream configuration for an enterprise.
*
* When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)."
*/
delete: operations["enterprise-admin/delete-audit-log-stream"];
};
"/enterprises/{enterprise}/bypass-requests/push-rules": {
/**
* List push rule bypass requests within an enterprise
* @description Lists the requests made by users of a repository to bypass push protection rules within an enterprise.
*/
get: operations["enterprise-admin/list-push-bypass-requests"];
};
"/enterprises/{enterprise}/code-scanning/alerts": {
/**
* List code scanning alerts for an enterprise
* @description Lists code scanning alerts for the default branch for all eligible repositories in an enterprise. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
*
* The authenticated user must be a member of the enterprise to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo` scope to use this endpoint.
*/
get: operations["code-scanning/list-alerts-for-enterprise"];
};
"/enterprises/{enterprise}/code-security/configurations": {
/**
* Get code security configurations for an enterprise
* @description Lists all code security configurations available in an enterprise.
*
* The authenticated user must be an administrator of the enterprise in order to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint.
*/
get: operations["code-security/get-configurations-for-enterprise"];
/**
* Create a code security configuration for an enterprise
* @description Creates a code security configuration in an enterprise.
*
* The authenticated user must be an administrator of the enterprise in order to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.
*/
post: operations["code-security/create-configuration-for-enterprise"];
};
"/enterprises/{enterprise}/code-security/configurations/defaults": {
/**
* Get default code security configurations for an enterprise
* @description Lists the default code security configurations for an enterprise.
*
* The authenticated user must be an administrator of the enterprise in order to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint.
*/
get: operations["code-security/get-default-configurations-for-enterprise"];
};
"/enterprises/{enterprise}/code-security/configurations/{configuration_id}": {
/**
* Retrieve a code security configuration of an enterprise
* @description Gets a code security configuration available in an enterprise.
*
* The authenticated user must be an administrator of the enterprise in order to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint.
*/
get: operations["code-security/get-single-configuration-for-enterprise"];
/**
* Delete a code security configuration for an enterprise
* @description Deletes a code security