UNPKG

@octokit/openapi-types

Version:

Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com

836 lines (834 loc) 4.55 MB
/** * 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/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/rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint. * * You must use a [JWT](https://docs.github.com/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/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/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/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/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/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/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/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/rest/apps/apps#suspend-an-app-installation)" endpoint. * * You must use a [JWT](https://docs.github.com/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/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 API or webhook events is blocked for that account. * * You must use a [JWT](https://docs.github.com/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/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"]; }; "/emojis": { /** * Get emojis * @description Lists all the emojis available to use on GitHub. */ get: operations["emojis/get"]; }; "/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 configuration from an enterprise. * Repositories attached to the configuration will retain their settings but will no longer be associated with * the configuration. * * The authenticated user must be an administrator for the enterprise to use this endpoint. * * OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. */ delete: operations["code-security/delete-configuration-for-enterprise"]; /** * Update a custom code security configuration for an enterprise * @description Updates 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. */ patch: operations["code-security/update-enterprise-configuration"]; }; "/enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach": { /** * Attach an enterprise configuration to repositories * @description Attaches an enterprise code security configuration to repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. * * If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. * * The authenticated user must be an administrator for the enterprise 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/attach-enterprise-configuration"]; }; "/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults": { /** * Set a code security configuration as a default for an enterprise * @description Sets a code security configuration as a default to be applied to new repositories in your enterprise. * * This configuration will be applied by default to the matching repository type when created, but only for organizations within the enterprise that do not already have a default code security configuration set. * * The authenticated user must be an administrator for the enterprise to use this endpoint. * * OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. */ put: operations["code-security/set-configuration-as-default-for-enterprise"]; }; "/enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories": { /** * Get repositories associated with an enterprise code security configuration * @description Lists the repositories associated with an enterprise code security configuration in an organization. * * 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-repositories-for-enterprise-configuration"]; }; "/enterprises/{enterprise}/dependabot/alerts": { /** * List Dependabot alerts for an enterprise * @description Lists Dependabot alerts for repositories that are owned by the specified enterprise. * * The authenticated user must be a member of the enterprise to use this endpoint. * * Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." * * OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. */ get: operations["dependabot/list-alerts-for-enterprise"]; }; "/enterprises/{enterprise}/secret-scanning/alerts": { /** * List secret scanning alerts for an enterprise * @description Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. * * Alerts are only returned for organizations in the enterprise for which the authenticated user is an organization owner or a [security manager](https://docs.github.com/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 in order to use this endpoint. * * OAuth app tokens and personal access tokens (classic) need the `repo` scope or `security_events` scope to use this endpoint. */ get: operations["secret-scanning/list-alerts-for-enterprise"]; }; "/events": { /** * List public events * @description > [!NOTE] * > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. */ get: operations["activity/list-public-events"]; }; "/feeds": { /** * Get feeds * @description Lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs. * * * **Timeline**: The GitHub global public timeline * * **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)." * * **Current user public**: The public timeline for the authenticated user * * **Current user**: The private timeline for the authenticated user * * **Current user actor**: The private timeline for activity created by the authenticated user * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. * * By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * > [!NOTE] * > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ get: operations["activity/get-feeds"]; }; "/gists": { /** * List gists for the authenticated user * @description Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ get: operations["gists/list"]; /** * Create a gist * @description Allows you to add a new gist with one or more files. * * > [!NOTE] * > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. */ post: operations["gists/create"]; }; "/gists/public": { /** * List public gists * @description List public gists sorted by most recently updated to least recently updated. * * Note: With [pagination](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. */ get: operations["gists/list-public"]; }; "/gists/starred": { /** * List starred gists * @description List the authenticated user's starred gists: */ get: operations["gists/list-starred"]; }; "/gists/{gist_id}": { /** * Get a gist * @description Gets a specified gist. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. * - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. */ get: operations["gists/get"]; /** Delete a gist */ delete: operations["gists/delete"]; /** * Update a gist * @description Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ patch: operations["gists/update"]; }; "/gists/{gist_id}/comments": { /** * List gist comments * @description Lists the comments on a gist. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. * - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. */ get: operations["gists/list-comments"]; /** * Create a gist comment * @description Creates a comment on a gist. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. * - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. */ post: operations["gists/create-comment"]; }; "/gists/{gist_id}/comments/{comment_id}": { /** * Get a gist comment * @description Gets a comment on a gist. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. * - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. */ get: operations["gists/get-comment"]; /** Delete a gist comment */ delete: operations["gists/delete-comment"]; /** * Update a gist comment * @description Updates a comment on a gist. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. * - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. */ patch: operations["gists/update-comment"]; }; "/gists/{gist_id}/commits": { /** List gist commits */ get: operations["gists/list-commits"]; }; "/gists/{gist_id}/forks": { /** List gist forks */ get: operations["gists/list-forks"]; /** Fork a gist */ post: operations["gists/fork"]; }; "/gists/{gist_id}/star": { /** Check if a gist is starred */ get: operations["gists/check-is-starred"]; /** * Star a gist * @description Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)." */ put: operations["gists/star"]; /** Unstar a gist */ delete: operations["gists/unstar"]; }; "/gists/{gist_id}/{sha}": { /** * Get a gist revision * @description Gets a specified gist revision. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type. * - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences. */ get: operations["gists/get-revision"]; }; "/gitignore/templates": { /** * Get all gitignore templates * @description List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user). */ get: operations["gitignore/get-all-templates"]; }; "/gitignore/templates/{name}": { /** * Get a gitignore template * @description Get the content of a gitignore template. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.raw+json`**: Returns the raw .gitignore contents. */ get: operations["gitignore/get-template"]; }; "/installation/repositories": { /** * List repositories accessible to the app installation * @description List repositories that an app installation can access. */ get: operations["apps/list-repos-accessible-to-installation"]; }; "/installation/token": { /** * Revoke an installation access token * @description Revokes the installation token you're using to authenticate as an installation and access this endpoint. * * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app)" endpoint. */ delete: operations["apps/revoke-installation-access-token"]; }; "/issues": { /** * List issues assigned to the authenticated user * @description List issues assigned to the authenticated user across all visible repositories including owned repositories, member * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not * necessarily assigned to you. * * > [!NOTE] * > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint. * * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." * * - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type. * - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`. * - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`. * - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. */ get: operations["issues/list"]; }; "/licenses": { /** * Get all commonly used licenses * @description Lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." */ get: operations["licenses/get-all-commonly-used"]; }; "/licenses/{license}": { /** * Get a license * @description Gets information about a specific license. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)." */ get: operations["licenses/get"]; }; "/markdown": { /** Render a Markdown document */ post: operations["markdown/render"]; }; "/markdown/raw": { /** * Render a Markdown document in raw mode * @description You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ post: operations["markdown/render-raw"]; }; "/marketplace_listing/accounts/{account_id}": { /** * Get a subscription plan for an account * @description Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. * * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. */ get: operations["apps/get-subscription-plan-for-account"]; }; "/marketplace_listing/plans": { /** * List plans * @description Lists all plans that are part of your GitHub Marketplace listing. * * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. */ get: operations["apps/list-plans"]; }; "/marketplace_listing/plans/{plan_id}/accounts": { /** * List accounts for a plan * @description Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. * * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. */ get: operations["apps/list-accounts-for-plan"]; }; "/marketplace_listing/stubbed/accounts/{account_id}": { /** * Get a subscription plan for an account (stubbed) * @description Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. * * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. */ get: operations["apps/get-subscription-plan-for-account-stubbed"]; }; "/marketplace_listing/stubbed/plans": { /** * List plans (stubbed) * @description Lists all plans that are part of your GitHub Marketplace listing. * * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. */ get: operations["apps/list-plans-stubbed"]; }; "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { /** * List accounts for a plan (stubbed) * @description Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. * * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint. */ get: operations["apps/list-accounts-for-plan-stubbed"]; }; "/meta": { /** * Get GitHub meta information * @description Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." * * The API's response also includes a list of GitHub's domain names. * * The values shown in the documentation's response are example values. You must always query the API directly to get the latest values. * * > [!NOTE] * > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported. */ get: operations["meta/get"]; }; "/networks/{owner}/{repo}/events": { /** * List public events for a network of repositories * @description > [!NOTE] * > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. */ get: operations["activity/list-public-events-for-repo-network"]; }; "/notifications": { /** * List notifications for the authenticated user * @description List all notifications for the current user, sorted by most recently updated. */ get: operations["activity/list-notifications-for-authenticated-user"]; /** * Mark notifications as read * @description Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ put: operations["activity/mark-notifications-as-read"]; }; "/notifications/threads/{thread_id}": { /** * Get a thread * @description Gets information about a notification thread. */ get: operations["activity/get-thread"]; /** * Mark a thread as done * @description Marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub as done: https://github.com/notifications. */ delete: operations["activity/mark-thread-as-done"]; /** * Mark a thread as read * @description Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications. */ patch: operations["activity/mark-thread-as-read"]; }; "/notifications/threads/{thread_id}/subscription": { /** * Get a thread subscription for the authenticated user * @description This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/activity/watching#get-a-repository-subscription). * * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. */ get: operations["activity/get-thread-subscription-for-authenticated-user"]; /** * Set a thread subscription * @description If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. * * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. * * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/activity/notifications#delete-a-thread-subscription) endpoint. */ put: operations["activity/set-thread-subscription"]; /** * Delete a thread subscription * @description Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ delete: operations["activity/delete-thread-subscription"]; }; "/octocat": { /** * Get Octocat * @description Get the octocat as ASCII art */ get: operations["meta/get-octocat"]; }; "/organizations": { /** * List organizations * @description Lists all organizations, in the order that they were created. * * > [!NOTE] * > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations. */ get: operations["orgs/list"]; }; "/organizations/{org}/settings/billing/usage": { /** * Get billing usage report for an organization * @description Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account. * * **Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)." */ get: operations["billing/get-github-billing-usage-report-org"]; }; "/orgs/{org}": { /** * Get an organization * @description Gets information about an organization. * * When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * * To see the full details about an organization, the authenticated user must be an organization owner. * * OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization. * * To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission. */ get: operations["orgs/get"]; /** * Delete an organization * @description Deletes an organization and all its repositories. * * The organization login will be unavailable for 90 days after deletion. * * Please review the Terms of Service regarding account deletion before using this endpoint: * * https://docs.github.com/site-policy/github-terms/github-terms-of-service */ delete: operations["orgs/delete"]; /** * Update an organization * @description > [!WARNING] * > **Closing down notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). * * > [!WARNING] * > **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/). * * Updates the organization's profile and member privileges. * * The authenticated user must be an organization owner to use this endpoint. * * OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint. */ patch: operations["orgs/update"]; }; "/orgs/{org}/actions/cache/usage": { /** * Get GitHub Actions cache usage for an organization * @description Gets the total GitHub Actions cache usage for an organization. * 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 `read:org` scope to use this endpoint. */ get: operations["actions/get-actions-cache-usage-for-org"]; }; "/orgs/{org}/actions/cache/usage-by-repository": { /** * List repositories with GitHub Actions cache usage for an organization * @description Lists repositories and their GitHub Actions cache usage fo