diff --git a/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md b/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md index 3afc181c29f7..62c824e697ac 100644 --- a/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md +++ b/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md @@ -63,6 +63,7 @@ You can set up streaming to S3 with access keys or, to avoid storing long-lived - [Setting up streaming to S3 with access keys](#setting-up-streaming-to-s3-with-access-keys) - [Setting up streaming to S3 with OpenID Connect](#setting-up-streaming-to-s3-with-openid-connect) - [Disabling streaming to S3 with OpenID Connect](#disabling-streaming-to-s3-with-openid-connect) +- [Integrating with AWS CloudTrail Lake](#integrating-with-aws-cloudtrail-lake) #### Setting up streaming to S3 with access keys {% endif %} @@ -148,6 +149,9 @@ Then, set up streaming with access keys until the vulnerability is resolved. For {% endif %} +#### Integrating with AWS CloudTrail Lake +You can consolidate your audit logs from {% data variables.product.product_name %} with AWS activity logs by integrating audit log streaming to S3 with AWS CloudTrail Lake. For additional information, see the [AWS CloudTrail Documentation](https://docs.aws.amazon.com/cloudtrail/) or the [GitHub Audit Log to CloudTrail Open Audit](https://github.com/aws-samples/aws-cloudtrail-lake-github-audit-log) in the `aws-samples/aws-cloudtrail-lake-github-audit-log` repository. + ### Setting up streaming to Azure Blob Storage Before setting up a stream in {% data variables.product.prodname_dotcom %}, you must first have created a storage account and a container in Microsoft Azure. For details, see the Microsoft documentation, "[Introduction to Azure Blob Storage](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction)." diff --git a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md index 8a54f8d9b12d..59c4fc14b729 100644 --- a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md +++ b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md @@ -21,7 +21,7 @@ Gists provide a simple way to share code snippets with others. Every gist is a G Gists can be {% ifversion ghae %}internal{% else %}public{% endif %} or secret. {% ifversion ghae %}Internal{% else %}Public{% endif %} gists show up in {% data variables.gists.discover_url %}, where {% ifversion ghae %}enterprise members{% else %}people{% endif %} can browse new gists as they're created. They're also searchable, so you can use them if you'd like other people to find and see your work. -Secret gists don't show up in {% data variables.gists.discover_url %} and are not searchable unless you are logged in and are the author of the secret gist. Secret gists aren't private. If you send the URL of a secret gist to {% ifversion ghae %}another enterprise member{% else %}a friend{% endif %}, they'll be able to see it. However, if {% ifversion ghae %}any other enterprise member{% else %}someone you don't know{% endif %} discovers the URL, they'll also be able to see your gist. If you need to keep your code away from prying eyes, you may want to [create a private repository](/articles/creating-a-new-repository) instead. +Secret gists don't show up in {% data variables.gists.discover_url %} and are not searchable unless you are logged in and are the author of the secret gist. Secret gists aren't private. If you send the URL of a secret gist to {% ifversion ghae %}another enterprise member{% else %}a friend{% endif %}, they'll be able to see it. However, if {% ifversion ghae %}any other enterprise member{% else %}someone you don't know{% endif %} discovers the URL, they'll also be able to see your gist. If you need to keep your code away from prying eyes, you may want to [create a private repository](/repositories/creating-and-managing-repositories/creating-a-new-repository) instead. {% data reusables.gist.cannot-convert-public-gists-to-secret %} @@ -40,13 +40,13 @@ You'll receive a notification when: {% ifversion fpt or ghes or ghec %} -You can pin gists to your profile so other people can see them easily. For more information, see "[Pinning items to your profile](/articles/pinning-items-to-your-profile)." +You can pin gists to your profile so other people can see them easily. For more information, see "[Pinning items to your profile](/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/pinning-items-to-your-profile)." {% endif %} You can discover {% ifversion ghae %}internal{% else %}public{% endif %} gists others have created by going to the {% data variables.gists.gist_homepage %} and clicking **All Gists**. This will take you to a page of all gists sorted and displayed by time of creation or update. You can also search gists by language with {% data variables.gists.gist_search_url %}. Gist search uses the same search syntax as [code search](/search-github/searching-on-github/searching-code). -Since gists are Git repositories, you can view their full commit history, complete with diffs. You can also fork or clone gists. For more information, see ["Forking and cloning gists"](/articles/forking-and-cloning-gists). +Since gists are Git repositories, you can view their full commit history, complete with diffs. You can also fork or clone gists. For more information, see ["Forking and cloning gists"](/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists). You can download a ZIP file of a gist by clicking the **Download ZIP** button at the top of the gist. You can embed a gist in any text field that supports Javascript, such as a blog post. To get the embed code, click the clipboard icon next to the **Embed** URL of a gist. To embed a specific gist file, append the **Embed** URL with `?file=FILENAME`. diff --git a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists.md b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists.md index 0ce60ee5feed..6466958f7deb 100644 --- a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists.md +++ b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists.md @@ -20,7 +20,7 @@ Each gist indicates which forks have activity, making it easy to find interestin ## Cloning gists -If you want to make local changes to a gist and push them up to the web, you can clone a gist and make commits the same as you would with any Git repository. For more information, see "[Cloning a repository](/articles/cloning-a-repository)." +If you want to make local changes to a gist and push them up to the web, you can clone a gist and make commits the same as you would with any Git repository. For more information, see "[Cloning a repository](/repositories/creating-and-managing-repositories/cloning-a-repository)."  diff --git a/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md b/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md index ffec457383f4..39208df12c76 100644 --- a/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md +++ b/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md @@ -16,7 +16,7 @@ shortTitle: About writing & formatting We've added some custom functionality to create {% data variables.product.prodname_dotcom %} Flavored Markdown, used to format prose and code across our site. -You can also interact with other users in pull requests and issues using features like [@mentions](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams), [issue and PR references](/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests), and [emoji](/articles/basic-writing-and-formatting-syntax/#using-emoji). +You can also interact with other users in pull requests and issues using features like [@mentions](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#mentioning-people-and-teams), [issue and PR references](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#referencing-issues-and-pull-requests), and [emoji](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#using-emoji). ## Text formatting toolbar @@ -40,6 +40,6 @@ You can enable a fixed-width font in every comment field on {% data variables.pr ## Further reading - [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/) -- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)" -- "[Working with advanced formatting](/articles/working-with-advanced-formatting)" +- "[Basic writing and formatting syntax](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)" +- "[Working with advanced formatting](/get-started/writing-on-github/working-with-advanced-formatting)" - "[Quickstart for writing on {% data variables.product.prodname_dotcom %}](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github)" diff --git a/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md b/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md index d4029229f059..c331f954d75c 100644 --- a/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md +++ b/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md @@ -56,7 +56,7 @@ Text that is not a quote {% tip %} -**Tip:** When viewing a conversation, you can automatically quote text in a comment by highlighting the text, then typing R. You can quote an entire comment by clicking {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then **Quote reply**. For more information about keyboard shortcuts, see "[Keyboard shortcuts](/articles/keyboard-shortcuts/)." +**Tip:** When viewing a conversation, you can automatically quote text in a comment by highlighting the text, then typing R. You can quote an entire comment by clicking {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then **Quote reply**. For more information about keyboard shortcuts, see "[Keyboard shortcuts](/get-started/using-github/keyboard-shortcuts)." {% endtip %} @@ -83,7 +83,7 @@ git commit  -For more information, see "[Creating and highlighting code blocks](/articles/creating-and-highlighting-code-blocks)." +For more information, see "[Creating and highlighting code blocks](/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)." {% data reusables.user-settings.enabling-fixed-width-fonts %} @@ -126,7 +126,7 @@ You can create an inline link by wrapping link text in brackets `[ ]`, and then {% tip %} -**Tip:** {% data variables.product.product_name %} automatically creates links when valid URLs are written in a comment. For more information, see "[Autolinked references and URLs](/articles/autolinked-references-and-urls)." +**Tip:** {% data variables.product.product_name %} automatically creates links when valid URLs are written in a comment. For more information, see "[Autolinked references and URLs](/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls)." {% endtip %} @@ -259,11 +259,11 @@ If a task list item description begins with a parenthesis, you'll need to escape `- [ ] \(Optional) Open a followup issue` -For more information, see "[About task lists](/articles/about-task-lists)." +For more information, see "[About task lists](/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists)." ## Mentioning people and teams -You can mention a person or [team](/articles/setting-up-teams/) on {% data variables.product.product_name %} by typing @ plus their username or team name. This will trigger a notification and bring their attention to the conversation. People will also receive a notification if you edit a comment to mention their username or team name. For more information about notifications, see "[About notifications](/github/managing-subscriptions-and-notifications-on-github/about-notifications)." +You can mention a person or [team](/organizations/organizing-members-into-teams) on {% data variables.product.product_name %} by typing @ plus their username or team name. This will trigger a notification and bring their attention to the conversation. People will also receive a notification if you edit a comment to mention their username or team name. For more information about notifications, see "[About notifications](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications)." {% note %} @@ -275,7 +275,7 @@ You can mention a person or [team](/articles/setting-up-teams/) on {% data varia  -When you mention a parent team, members of its child teams also receive notifications, simplifying communication with multiple groups of people. For more information, see "[About teams](/articles/about-teams)." +When you mention a parent team, members of its child teams also receive notifications, simplifying communication with multiple groups of people. For more information, see "[About teams](/organizations/organizing-members-into-teams/about-teams)." Typing an @ symbol will bring up a list of people or teams on a project. The list filters as you type, so once you find the name of the person or team you are looking for, you can use the arrow keys to select it and press either tab or enter to complete the name. For teams, enter the @organization/team-name and all members of that team will get subscribed to the conversation. @@ -285,7 +285,7 @@ The autocomplete results are restricted to repository collaborators and any othe You can bring up a list of suggested issues and pull requests within the repository by typing #. Type the issue or pull request number or title to filter the list, and then press either tab or enter to complete the highlighted result. -For more information, see "[Autolinked references and URLs](/articles/autolinked-references-and-urls)." +For more information, see "[Autolinked references and URLs](/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls)." ## Referencing external resources @@ -298,11 +298,11 @@ Some {% data variables.product.prodname_github_apps %} provide information in {%  -To see content attachments, you must have a {% data variables.product.prodname_github_app %} that uses the Content Attachments API installed on the repository.{% ifversion fpt or ghec %} For more information, see "[Installing an app in your personal account](/articles/installing-an-app-in-your-personal-account)" and "[Installing an app in your organization](/articles/installing-an-app-in-your-organization)."{% endif %} +To see content attachments, you must have a {% data variables.product.prodname_github_app %} that uses the Content Attachments API installed on the repository.{% ifversion fpt or ghec %} For more information, see "[Installing an app in your personal account](/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-personal-account)" and "[Installing an app in your organization](/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-organization)."{% endif %} Content attachments will not be displayed for URLs that are part of a markdown link. -For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/apps/using-content-attachments)."{% endif %} +For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/developers/apps/guides/using-content-attachments)."{% endif %} ## Uploading assets @@ -380,6 +380,6 @@ For more information, see Daring Fireball's "[Markdown Syntax](https://daringfir ## Further reading - [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/) -- "[About writing and formatting on GitHub](/articles/about-writing-and-formatting-on-github)" -- "[Working with advanced formatting](/articles/working-with-advanced-formatting)" +- "[About writing and formatting on GitHub](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github)" +- "[Working with advanced formatting](/get-started/writing-on-github/working-with-advanced-formatting)" - "[Quickstart for writing on {% data variables.product.prodname_dotcom %}](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github)" diff --git a/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github.md b/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github.md index cff022aa8dcf..c53a68cf9347 100644 --- a/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github.md +++ b/content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github.md @@ -13,7 +13,7 @@ shortTitle: Quickstart Markdown is an easy-to-read, easy-to-write language for formatting plain text. You can use Markdown syntax, along with some additional HTML tags, to format your writing on {% data variables.product.prodname_dotcom %}, in places like repository READMEs and comments on pull requests and issues. In this guide, you'll learn some advanced formatting features by creating {% ifversion ghae %}a gist{% else %}or editing a README for your {% data variables.product.prodname_dotcom %} profile{% endif %}. -If you're new to Markdown, you might want to start with "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)" or the [Communicate using Markdown](https://github.com/skills/communicate-using-markdown) {% data variables.product.prodname_learning %} course. +If you're new to Markdown, you might want to start with "[Basic writing and formatting syntax](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)" or the [Communicate using Markdown](https://github.com/skills/communicate-using-markdown) {% data variables.product.prodname_learning %} course. {% ifversion not ghae %} diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists.md b/content/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists.md index 2b4495efc3c3..d85a906eb29c 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists.md @@ -41,7 +41,7 @@ If you add a task list to the body of an issue, the list has added functionality - To help you track your team's work on an issue, the progress of an issue's task list appears in various places on {% data variables.product.product_name %}, such as a repository's list of issues. - If a task references another issue and someone closes that issue, the task's checkbox will automatically be marked as complete. -- If a task requires further tracking or discussion, you can convert the task to an issue by hovering over the task and clicking {% octicon "issue-opened" aria-label="The issue opened icon" %} in the upper-right corner of the task. To add more details before creating the issue, you can use keyboard shortcuts to open the new issue form. For more information, see "[Keyboard shortcuts](/github/getting-started-with-github/using-github/keyboard-shortcuts#issues-and-pull-requests)." +- If a task requires further tracking or discussion, you can convert the task to an issue by hovering over the task and clicking {% octicon "issue-opened" aria-label="The issue opened icon" %} in the upper-right corner of the task. To add more details before creating the issue, you can use keyboard shortcuts to open the new issue form. For more information, see "[Keyboard shortcuts](/get-started/using-github/keyboard-shortcuts#issues-and-pull-requests)." - Any issues referenced in the task list will specify that they are tracked in the referencing issue.  diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/attaching-files.md b/content/get-started/writing-on-github/working-with-advanced-formatting/attaching-files.md index adbf4b8df0b8..4ef3d4c8ff68 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/attaching-files.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/attaching-files.md @@ -22,7 +22,7 @@ To attach a file to an issue or pull request conversation, drag and drop it into  -When you attach a file, it is uploaded immediately to {% data variables.product.product_name %} and the text field is updated to show the anonymized URL for the file. {% ifversion fpt or ghec %}For more information on anonymized URLs see "[About anonymized URLs](/github/authenticating-to-github/about-anonymized-urls)".{% endif %} +When you attach a file, it is uploaded immediately to {% data variables.product.product_name %} and the text field is updated to show the anonymized URL for the file. {% ifversion fpt or ghec %}For more information on anonymized URLs see "[About anonymized URLs](/authentication/keeping-your-account-and-data-secure/about-anonymized-urls)".{% endif %} {% tip %} diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md b/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md index 7898abc4e946..ee3a0d57ea18 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md @@ -20,7 +20,7 @@ shortTitle: Auto linked references  -For more information on creating links, see "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax/#links)." +For more information on creating links, see "[Basic writing and formatting syntax](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#links)." ## Issues and pull requests @@ -41,7 +41,7 @@ Within conversations on {% data variables.product.product_name %}, references to | `Organization_name/Repository#` and issue or pull request number | github/linguist#4039 | [github/linguist#4039](https://github.com/github/linguist/pull/4039) {% ifversion fpt or ghec %} -If you reference an issue, pull request, or discussion in a list, the reference will unfurl to show the title and state instead. For more information about task lists, see "[About task lists](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)." +If you reference an issue, pull request, or discussion in a list, the reference will unfurl to show the title and state instead. For more information about task lists, see "[About task lists](/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists)." {% endif %} ## Labels @@ -75,4 +75,4 @@ References to a commit's SHA hash are automatically converted into shortened lin ## Further reading -- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)" +- "[Basic writing and formatting syntax](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)" diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet.md b/content/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet.md index 1a4a29c27c08..68a6b5652a24 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet.md @@ -23,7 +23,7 @@ This type of permanent link will render as a code snippet only in the repository {% tip %} -**Tip:** To create a permalink for an entire file, see "[Getting permanent links to files](/articles/getting-permanent-links-to-files)." +**Tip:** To create a permalink for an entire file, see "[Getting permanent links to files](/repositories/working-with-files/using-files/getting-permanent-links-to-files)." {% endtip %} @@ -46,6 +46,5 @@ You can link to a specific line in the Markdown file the same way you can in cod ## Further reading -- "[Creating an issue](/articles/creating-an-issue/)" -- "[Opening an issue from code](/articles/opening-an-issue-from-code/)" -- "[Reviewing changes in pull requests](/articles/reviewing-changes-in-pull-requests/)" +- "[Creating an issue](/issues/tracking-your-work-with-issues/creating-an-issue)" +- "[Reviewing changes in pull requests](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests)" diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md b/content/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md index 6b44a19686e0..ecf030915d92 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md @@ -75,4 +75,4 @@ You can also use code blocks to create diagrams in Markdown. GitHub supports Mer ## Further reading - [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/) -- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)" +- "[Basic writing and formatting syntax](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)" diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md b/content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md index 05d74c1ce909..3ad5c1cc0f08 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md @@ -41,4 +41,4 @@ After a reader clicks {% octicon "triangle-right" aria-label="The right triange ## Further reading - [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/) -- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)" +- "[Basic writing and formatting syntax](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)" diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables.md b/content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables.md index eb932231ba86..18b7d558a6bf 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables.md @@ -43,7 +43,7 @@ Cells can vary in width and do not need to be perfectly aligned within columns. ## Formatting content within your table -You can use [formatting](/articles/basic-writing-and-formatting-syntax) such as links, inline code blocks, and text styling within your table: +You can use [formatting](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) such as links, inline code blocks, and text styling within your table: ```markdown | Command | Description | @@ -79,4 +79,4 @@ To include a pipe `|` as content within your cell, use a `\` before the pipe: ## Further reading - [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/) -- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)" +- "[Basic writing and formatting syntax](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)" diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests.md b/content/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests.md index 514684c33fd9..a36dc8b325da 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests.md @@ -27,7 +27,7 @@ To link a pull request to an issue to show that a fix is in progress and to auto * resolves * resolved -For more information, see "[Linking a pull request to an issue](/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)." +For more information, see "[Linking a pull request to an issue](/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)." ## Marking an issue or pull request as a duplicate diff --git a/content/get-started/writing-on-github/working-with-saved-replies/about-saved-replies.md b/content/get-started/writing-on-github/working-with-saved-replies/about-saved-replies.md index 63e7dda4b238..c2a35c78fe49 100644 --- a/content/get-started/writing-on-github/working-with-saved-replies/about-saved-replies.md +++ b/content/get-started/writing-on-github/working-with-saved-replies/about-saved-replies.md @@ -23,7 +23,7 @@ You can also use the {% data variables.product.product_name %}-provided "Duplica ## Further reading -- "[Creating a saved reply](/articles/creating-a-saved-reply)" -- "[Using saved replies](/articles/using-saved-replies)" -- "[Editing a saved reply](/articles/editing-a-saved-reply)" -- "[Deleting a saved reply](/articles/deleting-a-saved-reply)" +- "[Creating a saved reply](/get-started/writing-on-github/working-with-saved-replies/creating-a-saved-reply)" +- "[Using saved replies](/get-started/writing-on-github/working-with-saved-replies/using-saved-replies)" +- "[Editing a saved reply](/get-started/writing-on-github/working-with-saved-replies/editing-a-saved-reply)" +- "[Deleting a saved reply](/get-started/writing-on-github/working-with-saved-replies/deleting-a-saved-reply)" diff --git a/content/get-started/writing-on-github/working-with-saved-replies/creating-a-saved-reply.md b/content/get-started/writing-on-github/working-with-saved-replies/creating-a-saved-reply.md index f779c97172bb..0bccf9451ed6 100644 --- a/content/get-started/writing-on-github/working-with-saved-replies/creating-a-saved-reply.md +++ b/content/get-started/writing-on-github/working-with-saved-replies/creating-a-saved-reply.md @@ -15,7 +15,7 @@ versions: {% data reusables.user-settings.saved_replies %} 3. Under "Add a saved reply", add your saved reply title.  -4. In the "Write" field, add the content you'd like to use for the saved reply. For more information on writing on {% data variables.product.product_name %}, see "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)." +4. In the "Write" field, add the content you'd like to use for the saved reply. For more information on writing on {% data variables.product.product_name %}, see "[Basic writing and formatting syntax](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)."  5. To review your reply, click **Preview**.  @@ -24,6 +24,6 @@ versions: ## Further reading -- "[Using saved replies](/articles/using-saved-replies)" -- "[Editing a saved reply](/articles/editing-a-saved-reply)" -- "[Deleting a saved reply](/articles/deleting-a-saved-reply)" +- "[Using saved replies](/get-started/writing-on-github/working-with-saved-replies/using-saved-replies)" +- "[Editing a saved reply](/get-started/writing-on-github/working-with-saved-replies/editing-a-saved-reply)" +- "[Deleting a saved reply](/get-started/writing-on-github/working-with-saved-replies/deleting-a-saved-reply)" diff --git a/content/get-started/writing-on-github/working-with-saved-replies/editing-a-saved-reply.md b/content/get-started/writing-on-github/working-with-saved-replies/editing-a-saved-reply.md index 38989fb3d15a..cd696b4e1e5e 100644 --- a/content/get-started/writing-on-github/working-with-saved-replies/editing-a-saved-reply.md +++ b/content/get-started/writing-on-github/working-with-saved-replies/editing-a-saved-reply.md @@ -23,6 +23,6 @@ versions: ## Further reading -- "[Creating a saved reply](/articles/creating-a-saved-reply)" -- "[Deleting a saved reply](/articles/deleting-a-saved-reply)" -- "[Using saved replies](/articles/using-saved-replies)" +- "[Creating a saved reply](/get-started/writing-on-github/working-with-saved-replies/creating-a-saved-reply)" +- "[Deleting a saved reply](/get-started/writing-on-github/working-with-saved-replies/deleting-a-saved-reply)" +- "[Using saved replies](/get-started/writing-on-github/working-with-saved-replies/using-saved-replies)" diff --git a/content/get-started/writing-on-github/working-with-saved-replies/using-saved-replies.md b/content/get-started/writing-on-github/working-with-saved-replies/using-saved-replies.md index 55038a5bdee1..7a369237d437 100644 --- a/content/get-started/writing-on-github/working-with-saved-replies/using-saved-replies.md +++ b/content/get-started/writing-on-github/working-with-saved-replies/using-saved-replies.md @@ -22,13 +22,13 @@ versions: {% tip %} **Tips:** -- You can use a keyboard shortcut to autofill the comment with a saved reply. For more information, see "[Keyboard shortcuts](/articles/keyboard-shortcuts/#comments)." +- You can use a keyboard shortcut to autofill the comment with a saved reply. For more information, see "[Keyboard shortcuts](/get-started/using-github/keyboard-shortcuts#comments)." - You can filter the list by typing the title of the saved reply. {% endtip %} ## Further reading -- "[Creating a saved reply](/articles/creating-a-saved-reply)" -- "[Editing a saved reply](/articles/editing-a-saved-reply)" -- "[Deleting a saved reply](/articles/deleting-a-saved-reply)" +- "[Creating a saved reply](/get-started/writing-on-github/working-with-saved-replies/creating-a-saved-reply)" +- "[Editing a saved reply](/get-started/writing-on-github/working-with-saved-replies/editing-a-saved-reply)" +- "[Deleting a saved reply](/get-started/writing-on-github/working-with-saved-replies/deleting-a-saved-reply)" diff --git a/lib/redirects/static/client-side-rest-api-redirects.json b/lib/redirects/static/client-side-rest-api-redirects.json index 1d7fc167801f..3d74f8330598 100644 --- a/lib/redirects/static/client-side-rest-api-redirects.json +++ b/lib/redirects/static/client-side-rest-api-redirects.json @@ -176,7 +176,8 @@ "/rest/apps#check-a-token": "/rest/apps/oauth-applications#check-a-token", "/rest/apps#reset-a-token": "/rest/apps/oauth-applications#reset-a-token", "/rest/apps#delete-an-app-token": "/rest/apps/oauth-applications#delete-an-app-token", - "/rest/apps#create-a-scoped-access-token": "/rest/apps/oauth-applications#create-a-scoped-access-token", + "/rest/apps/apps#create-a-scoped-access-token": "/rest/apps/apps#create-a-scoped-access-token", + "/rest/apps#apps": "/rest/apps/apps", "/rest/apps/#get-an-app": "/rest/apps/apps#get-an-app", "/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise": "/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise", "/rest/dependabot#alerts": "/rest/dependabot/alerts", @@ -782,6 +783,7 @@ "/rest/repos#get-a-repository-readme": "/rest/repos/contents#get-a-repository-readme", "/rest/repos#get-a-repository-directory-readme": "/rest/repos/contents#get-a-repository-directory-readme", "/rest/releases#releases": "/rest/releases/releases", + "/rest/releases/releases#create-a-release": "/rest/releases/releases#create-a-release", "/rest/releases#assets": "/rest/releases/assets", "/rest/activity#list-stargazers": "/rest/activity/starring#list-stargazers", "/rest/activity#starring": "/rest/activity/starring", diff --git a/lib/rest/static/decorated/api.github.com.2022-11-28.json b/lib/rest/static/decorated/api.github.com.2022-11-28.json index fedddaf4c505..2f1a65d6b5cc 100644 --- a/lib/rest/static/decorated/api.github.com.2022-11-28.json +++ b/lib/rest/static/decorated/api.github.com.2022-11-28.json @@ -101679,6 +101679,1265 @@ ], "subcategory": "apps" }, + { + "serverUrl": "https://api.github.com", + "verb": "post", + "requestPath": "/applications/{client_id}/token/scoped", + "title": "Create a scoped access token", + "category": "apps", + "subcategory": "apps", + "parameters": [ + { + "name": "client_id", + "in": "path", + "required": true, + "description": "
The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "access_token", + "in": "body", + "description": "The access token used to authenticate to the GitHub API.
", + "isRequired": true + }, + { + "type": "string", + "name": "target", + "in": "body", + "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", + "childParamsGroups": [ + { + "type": "string", + "name": "actions", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "administration", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "checks", + "description": "The level of permission to grant the access token for checks on code.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "contents", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "deployments", + "description": "The level of permission to grant the access token for deployments and deployment statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "environments", + "description": "The level of permission to grant the access token for managing repository environments.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "issues", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "metadata", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "packages", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pages", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pull_requests", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_announcement_banners", + "description": "The level of permission to grant the access token to view and manage announcement banners for a repository.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_projects", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "secret_scanning_alerts", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "secrets", + "description": "The level of permission to grant the access token to manage repository secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "security_events", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "single_file", + "description": "The level of permission to grant the access token to manage just a single file.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "statuses", + "description": "The level of permission to grant the access token for commit statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "vulnerability_alerts", + "description": "The level of permission to grant the access token to manage Dependabot alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "workflows", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", + "enum": [ + "write" + ] + }, + { + "type": "string", + "name": "members", + "description": "The level of permission to grant the access token for organization teams and members.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_administration", + "description": "The level of permission to grant the access token to manage access to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_custom_roles", + "description": "The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_announcement_banners", + "description": "The level of permission to grant the access token to view and manage announcement banners for an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_plan", + "description": "The level of permission to grant the access token for viewing an organization's plan.
", + "enum": [ + "read" + ] + }, + { + "type": "string", + "name": "organization_projects", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "organization_packages", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_secrets", + "description": "The level of permission to grant the access token to manage organization secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_self_hosted_runners", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_user_blocking", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "team_discussions", + "description": "The level of permission to grant the access token to manage team discussions and related comments.
", + "enum": [ + "read", + "write" + ] + } + ] + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", + "target": "octocat", + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + } + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [], + "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", + "token_last_eight": "Ae178B4a", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "Iv1.8a61f9b3a7aba766" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "expires_at": "2011-09-08T17:26:27Z", + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + }, + "repository_selection": "selected", + "single_file_name": ".github/workflow.yml", + "repositories_url": "https://api.github.com/user/repos", + "account": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "has_multiple_single_files": false, + "single_file_paths": [] + } + }, + "schema": { + "title": "Authorization", + "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + }, + "scopes": { + "description": "A list of scopes that this authorization is in.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": [ + "string", + "null" + ] + }, + "hashed_token": { + "type": [ + "string", + "null" + ] + }, + "app": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "client_id", + "name", + "url" + ] + }, + "note": { + "type": [ + "string", + "null" + ] + }, + "note_url": { + "type": [ + "string", + "null" + ], + "format": "uri" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "user": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "installation": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Scoped Installation", + "type": "object", + "properties": { + "permissions": { + "title": "App Permissions", + "type": "object", + "description": "The permissions granted to the user-to-server access token.", + "properties": { + "actions": { + "type": "string", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", + "enum": [ + "read", + "write" + ] + }, + "administration": { + "type": "string", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", + "enum": [ + "read", + "write" + ] + }, + "checks": { + "type": "string", + "description": "The level of permission to grant the access token for checks on code.", + "enum": [ + "read", + "write" + ] + }, + "contents": { + "type": "string", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", + "enum": [ + "read", + "write" + ] + }, + "deployments": { + "type": "string", + "description": "The level of permission to grant the access token for deployments and deployment statuses.", + "enum": [ + "read", + "write" + ] + }, + "environments": { + "type": "string", + "description": "The level of permission to grant the access token for managing repository environments.", + "enum": [ + "read", + "write" + ] + }, + "issues": { + "type": "string", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", + "enum": [ + "read", + "write" + ] + }, + "metadata": { + "type": "string", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", + "enum": [ + "read", + "write" + ] + }, + "packages": { + "type": "string", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "pages": { + "type": "string", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", + "enum": [ + "read", + "write" + ] + }, + "pull_requests": { + "type": "string", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", + "enum": [ + "read", + "write" + ] + }, + "repository_announcement_banners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage announcement banners for a repository.", + "enum": [ + "read", + "write" + ] + }, + "repository_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", + "enum": [ + "read", + "write" + ] + }, + "repository_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", + "enum": [ + "read", + "write", + "admin" + ] + }, + "secret_scanning_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository secrets.", + "enum": [ + "read", + "write" + ] + }, + "security_events": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "single_file": { + "type": "string", + "description": "The level of permission to grant the access token to manage just a single file.", + "enum": [ + "read", + "write" + ] + }, + "statuses": { + "type": "string", + "description": "The level of permission to grant the access token for commit statuses.", + "enum": [ + "read", + "write" + ] + }, + "vulnerability_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to manage Dependabot alerts.", + "enum": [ + "read", + "write" + ] + }, + "workflows": { + "type": "string", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", + "enum": [ + "write" + ] + }, + "members": { + "type": "string", + "description": "The level of permission to grant the access token for organization teams and members.", + "enum": [ + "read", + "write" + ] + }, + "organization_administration": { + "type": "string", + "description": "The level of permission to grant the access token to manage access to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, + "organization_announcement_banners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage announcement banners for an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_plan": { + "type": "string", + "description": "The level of permission to grant the access token for viewing an organization's plan.", + "enum": [ + "read" + ] + }, + "organization_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", + "enum": [ + "read", + "write", + "admin" + ] + }, + "organization_packages": { + "type": "string", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "organization_secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization secrets.", + "enum": [ + "read", + "write" + ] + }, + "organization_self_hosted_runners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_user_blocking": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", + "enum": [ + "read", + "write" + ] + }, + "team_discussions": { + "type": "string", + "description": "The level of permission to grant the access token to manage team discussions and related comments.", + "enum": [ + "read", + "write" + ] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + } + }, + "repository_selection": { + "description": "Describe whether all repositories have been selected or there's a selection involved", + "type": "string", + "enum": [ + "all", + "selected" + ] + }, + "single_file_name": { + "type": [ + "string", + "null" + ], + "examples": [ + "config.yaml" + ] + }, + "has_multiple_single_files": { + "type": "boolean", + "examples": [ + true + ] + }, + "single_file_paths": { + "type": "array", + "items": { + "type": "string" + }, + "examples": [ + "config.yml", + ".github/issue_TEMPLATE.md" + ] + }, + "repositories_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "account": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + }, + "required": [ + "permissions", + "repository_selection", + "single_file_name", + "repositories_url", + "account" + ] + } + ] + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + }, + "required": [ + "app", + "id", + "note", + "note_url", + "scopes", + "token", + "hashed_token", + "token_last_eight", + "fingerprint", + "url", + "created_at", + "updated_at", + "expires_at" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Use a non-scoped user-to-server access token to create a repository scoped and/or permission scoped user-to-server access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the client_id and client_secret of the GitHub App as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" + }, + { + "httpStatusCode": "401", + "description": "Requires authentication
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, { "serverUrl": "https://api.github.com", "verb": "get", @@ -113323,1286 +114582,8 @@ "type": "string", "name": "access_token", "in": "body", - "description": "The access_token of the OAuth application.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "Response
", - "example": { - "id": 1, - "url": "https://api.github.com/authorizations/1", - "scopes": [ - "public_repo", - "user" - ], - "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", - "token_last_eight": "Ae178B4a", - "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", - "app": { - "url": "http://my-github-app.com", - "name": "my github app", - "client_id": "Iv1.8a61f9b3a7aba766" - }, - "note": "optional note", - "note_url": "http://optional/note/url", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "fingerprint": "jklmnop12345678", - "expires_at": "2011-09-08T17:26:27Z", - "user": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - } - }, - "schema": { - "title": "Authorization", - "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string", - "format": "uri" - }, - "scopes": { - "description": "A list of scopes that this authorization is in.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "token": { - "type": "string" - }, - "token_last_eight": { - "type": [ - "string", - "null" - ] - }, - "hashed_token": { - "type": [ - "string", - "null" - ] - }, - "app": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "client_id", - "name", - "url" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "note_url": { - "type": [ - "string", - "null" - ], - "format": "uri" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "fingerprint": { - "type": [ - "string", - "null" - ] - }, - "user": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "installation": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Scoped Installation", - "type": "object", - "properties": { - "permissions": { - "title": "App Permissions", - "type": "object", - "description": "The permissions granted to the user-to-server access token.", - "properties": { - "actions": { - "type": "string", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", - "enum": [ - "read", - "write" - ] - }, - "administration": { - "type": "string", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", - "enum": [ - "read", - "write" - ] - }, - "checks": { - "type": "string", - "description": "The level of permission to grant the access token for checks on code.", - "enum": [ - "read", - "write" - ] - }, - "contents": { - "type": "string", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", - "enum": [ - "read", - "write" - ] - }, - "deployments": { - "type": "string", - "description": "The level of permission to grant the access token for deployments and deployment statuses.", - "enum": [ - "read", - "write" - ] - }, - "environments": { - "type": "string", - "description": "The level of permission to grant the access token for managing repository environments.", - "enum": [ - "read", - "write" - ] - }, - "issues": { - "type": "string", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", - "enum": [ - "read", - "write" - ] - }, - "metadata": { - "type": "string", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", - "enum": [ - "read", - "write" - ] - }, - "packages": { - "type": "string", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "pages": { - "type": "string", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", - "enum": [ - "read", - "write" - ] - }, - "pull_requests": { - "type": "string", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", - "enum": [ - "read", - "write" - ] - }, - "repository_announcement_banners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage announcement banners for a repository.", - "enum": [ - "read", - "write" - ] - }, - "repository_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", - "enum": [ - "read", - "write" - ] - }, - "repository_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", - "enum": [ - "read", - "write", - "admin" - ] - }, - "secret_scanning_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository secrets.", - "enum": [ - "read", - "write" - ] - }, - "security_events": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "single_file": { - "type": "string", - "description": "The level of permission to grant the access token to manage just a single file.", - "enum": [ - "read", - "write" - ] - }, - "statuses": { - "type": "string", - "description": "The level of permission to grant the access token for commit statuses.", - "enum": [ - "read", - "write" - ] - }, - "vulnerability_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to manage Dependabot alerts.", - "enum": [ - "read", - "write" - ] - }, - "workflows": { - "type": "string", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", - "enum": [ - "write" - ] - }, - "members": { - "type": "string", - "description": "The level of permission to grant the access token for organization teams and members.", - "enum": [ - "read", - "write" - ] - }, - "organization_administration": { - "type": "string", - "description": "The level of permission to grant the access token to manage access to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.", - "enum": [ - "read", - "write" - ] - }, - "organization_announcement_banners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage announcement banners for an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_plan": { - "type": "string", - "description": "The level of permission to grant the access token for viewing an organization's plan.", - "enum": [ - "read" - ] - }, - "organization_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", - "enum": [ - "read", - "write", - "admin" - ] - }, - "organization_packages": { - "type": "string", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "organization_secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization secrets.", - "enum": [ - "read", - "write" - ] - }, - "organization_self_hosted_runners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_user_blocking": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", - "enum": [ - "read", - "write" - ] - }, - "team_discussions": { - "type": "string", - "description": "The level of permission to grant the access token to manage team discussions and related comments.", - "enum": [ - "read", - "write" - ] - } - }, - "example": { - "contents": "read", - "issues": "read", - "deployments": "write", - "single_file": "read" - } - }, - "repository_selection": { - "description": "Describe whether all repositories have been selected or there's a selection involved", - "type": "string", - "enum": [ - "all", - "selected" - ] - }, - "single_file_name": { - "type": [ - "string", - "null" - ], - "examples": [ - "config.yaml" - ] - }, - "has_multiple_single_files": { - "type": "boolean", - "examples": [ - true - ] - }, - "single_file_paths": { - "type": "array", - "items": { - "type": "string" - }, - "examples": [ - "config.yml", - ".github/issue_TEMPLATE.md" - ] - }, - "repositories_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "account": { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - }, - "required": [ - "permissions", - "repository_selection", - "single_file_name", - "repositories_url", - "account" - ] - } - ] - }, - "expires_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - } - }, - "required": [ - "app", - "id", - "note", - "note_url", - "scopes", - "token", - "hashed_token", - "token_last_eight", - "fingerprint", - "url", - "created_at", - "updated_at", - "expires_at" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/applications/{client_id}/token", - "title": "Delete an app token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "204", - "description": "Response
" - } - } - ], - "previews": [], - "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/applications/{client_id}/token/scoped", - "title": "Create a scoped access token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", + "description": "The access_token of the OAuth application.
", "isRequired": true - }, - { - "type": "string", - "name": "target", - "in": "body", - "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", - "childParamsGroups": [ - { - "type": "string", - "name": "actions", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "administration", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "checks", - "description": "The level of permission to grant the access token for checks on code.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "contents", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "deployments", - "description": "The level of permission to grant the access token for deployments and deployment statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "environments", - "description": "The level of permission to grant the access token for managing repository environments.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "issues", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "metadata", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "packages", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pages", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pull_requests", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_announcement_banners", - "description": "The level of permission to grant the access token to view and manage announcement banners for a repository.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_projects", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "secret_scanning_alerts", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "secrets", - "description": "The level of permission to grant the access token to manage repository secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "security_events", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "single_file", - "description": "The level of permission to grant the access token to manage just a single file.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "statuses", - "description": "The level of permission to grant the access token for commit statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "vulnerability_alerts", - "description": "The level of permission to grant the access token to manage Dependabot alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "workflows", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", - "enum": [ - "write" - ] - }, - { - "type": "string", - "name": "members", - "description": "The level of permission to grant the access token for organization teams and members.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_administration", - "description": "The level of permission to grant the access token to manage access to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_custom_roles", - "description": "The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_announcement_banners", - "description": "The level of permission to grant the access token to view and manage announcement banners for an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_plan", - "description": "The level of permission to grant the access token for viewing an organization's plan.
", - "enum": [ - "read" - ] - }, - { - "type": "string", - "name": "organization_projects", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "organization_packages", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_secrets", - "description": "The level of permission to grant the access token to manage organization secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_self_hosted_runners", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_user_blocking", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "team_discussions", - "description": "The level of permission to grant the access token to manage team discussions and related comments.
", - "enum": [ - "read", - "write" - ] - } - ] } ], "enabledForGitHubApps": false, @@ -114614,13 +114595,7 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", - "target": "octocat", - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - } + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" }, "parameters": { "client_id": "Iv1.8a61f9b3a7aba766" @@ -114633,7 +114608,10 @@ "example": { "id": 1, "url": "https://api.github.com/authorizations/1", - "scopes": [], + "scopes": [ + "public_repo", + "user" + ], "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", "token_last_eight": "Ae178B4a", "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", @@ -114667,38 +114645,6 @@ "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false - }, - "installation": { - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - }, - "repository_selection": "selected", - "single_file_name": ".github/workflow.yml", - "repositories_url": "https://api.github.com/user/repos", - "account": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "has_multiple_single_files": false, - "single_file_paths": [] } }, "schema": { @@ -115479,23 +115425,77 @@ } ], "previews": [], - "descriptionHTML": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" }, { - "httpStatusCode": "401", - "description": "Requires authentication
" - }, + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "delete", + "requestPath": "/applications/{client_id}/token", + "title": "Delete an app token", + "category": "apps", + "subcategory": "oauth-applications", + "parameters": [ { - "httpStatusCode": "403", - "description": "Forbidden
" - }, + "name": "client_id", + "in": "path", + "required": true, + "description": "The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ { - "httpStatusCode": "404", - "description": "Resource not found
" + "type": "string", + "name": "access_token", + "in": "body", + "description": "The OAuth access token used to authenticate to the GitHub API.
", + "isRequired": true + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "204", + "description": "Response
" + } + } + ], + "previews": [], + "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" }, { "httpStatusCode": "422", @@ -356273,6 +356273,38 @@ "type": "integer", "default": 1 } + }, + { + "name": "role", + "description": "Filter invitations by their member role.
", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "admin", + "direct_member", + "billing_manager", + "hiring_manager" + ], + "default": "all" + } + }, + { + "name": "invitation_source", + "description": "Filter invitations by their invitation source.
", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "member", + "scim" + ], + "default": "all" + } } ], "bodyParameters": [], @@ -356566,7 +356598,7 @@ } ], "previews": [], - "descriptionHTML": "The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, hiring_manager, or reinstate. If the invitee is not a GitHub member, the login field in the return hash will be null.
The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, or hiring_manager. If the invitee is not a GitHub member, the login field in the return hash will be null.
This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThe client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "access_token", + "in": "body", + "description": "The access token used to authenticate to the GitHub API.
", + "isRequired": true + }, + { + "type": "string", + "name": "target", + "in": "body", + "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", + "childParamsGroups": [ + { + "type": "string", + "name": "actions", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "administration", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "checks", + "description": "The level of permission to grant the access token for checks on code.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "contents", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "deployments", + "description": "The level of permission to grant the access token for deployments and deployment statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "environments", + "description": "The level of permission to grant the access token for managing repository environments.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "issues", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "metadata", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "packages", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pages", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pull_requests", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_announcement_banners", + "description": "The level of permission to grant the access token to view and manage announcement banners for a repository.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_projects", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "secret_scanning_alerts", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "secrets", + "description": "The level of permission to grant the access token to manage repository secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "security_events", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "single_file", + "description": "The level of permission to grant the access token to manage just a single file.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "statuses", + "description": "The level of permission to grant the access token for commit statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "vulnerability_alerts", + "description": "The level of permission to grant the access token to manage Dependabot alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "workflows", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", + "enum": [ + "write" + ] + }, + { + "type": "string", + "name": "members", + "description": "The level of permission to grant the access token for organization teams and members.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_administration", + "description": "The level of permission to grant the access token to manage access to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_custom_roles", + "description": "The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_announcement_banners", + "description": "The level of permission to grant the access token to view and manage announcement banners for an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_plan", + "description": "The level of permission to grant the access token for viewing an organization's plan.
", + "enum": [ + "read" + ] + }, + { + "type": "string", + "name": "organization_projects", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "organization_packages", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_secrets", + "description": "The level of permission to grant the access token to manage organization secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_self_hosted_runners", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_user_blocking", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "team_discussions", + "description": "The level of permission to grant the access token to manage team discussions and related comments.
", + "enum": [ + "read", + "write" + ] + } + ] + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", + "target": "octocat", + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + } + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [], + "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", + "token_last_eight": "Ae178B4a", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "Iv1.8a61f9b3a7aba766" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "expires_at": "2011-09-08T17:26:27Z", + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + }, + "repository_selection": "selected", + "single_file_name": ".github/workflow.yml", + "repositories_url": "https://api.github.com/user/repos", + "account": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "has_multiple_single_files": false, + "single_file_paths": [] + } + }, + "schema": { + "title": "Authorization", + "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + }, + "scopes": { + "description": "A list of scopes that this authorization is in.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": [ + "string", + "null" + ] + }, + "hashed_token": { + "type": [ + "string", + "null" + ] + }, + "app": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "client_id", + "name", + "url" + ] + }, + "note": { + "type": [ + "string", + "null" + ] + }, + "note_url": { + "type": [ + "string", + "null" + ], + "format": "uri" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "user": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "installation": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Scoped Installation", + "type": "object", + "properties": { + "permissions": { + "title": "App Permissions", + "type": "object", + "description": "The permissions granted to the user-to-server access token.", + "properties": { + "actions": { + "type": "string", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", + "enum": [ + "read", + "write" + ] + }, + "administration": { + "type": "string", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", + "enum": [ + "read", + "write" + ] + }, + "checks": { + "type": "string", + "description": "The level of permission to grant the access token for checks on code.", + "enum": [ + "read", + "write" + ] + }, + "contents": { + "type": "string", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", + "enum": [ + "read", + "write" + ] + }, + "deployments": { + "type": "string", + "description": "The level of permission to grant the access token for deployments and deployment statuses.", + "enum": [ + "read", + "write" + ] + }, + "environments": { + "type": "string", + "description": "The level of permission to grant the access token for managing repository environments.", + "enum": [ + "read", + "write" + ] + }, + "issues": { + "type": "string", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", + "enum": [ + "read", + "write" + ] + }, + "metadata": { + "type": "string", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", + "enum": [ + "read", + "write" + ] + }, + "packages": { + "type": "string", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "pages": { + "type": "string", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", + "enum": [ + "read", + "write" + ] + }, + "pull_requests": { + "type": "string", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", + "enum": [ + "read", + "write" + ] + }, + "repository_announcement_banners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage announcement banners for a repository.", + "enum": [ + "read", + "write" + ] + }, + "repository_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", + "enum": [ + "read", + "write" + ] + }, + "repository_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", + "enum": [ + "read", + "write", + "admin" + ] + }, + "secret_scanning_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository secrets.", + "enum": [ + "read", + "write" + ] + }, + "security_events": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "single_file": { + "type": "string", + "description": "The level of permission to grant the access token to manage just a single file.", + "enum": [ + "read", + "write" + ] + }, + "statuses": { + "type": "string", + "description": "The level of permission to grant the access token for commit statuses.", + "enum": [ + "read", + "write" + ] + }, + "vulnerability_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to manage Dependabot alerts.", + "enum": [ + "read", + "write" + ] + }, + "workflows": { + "type": "string", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", + "enum": [ + "write" + ] + }, + "members": { + "type": "string", + "description": "The level of permission to grant the access token for organization teams and members.", + "enum": [ + "read", + "write" + ] + }, + "organization_administration": { + "type": "string", + "description": "The level of permission to grant the access token to manage access to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_custom_roles": { + "type": "string", + "description": "The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.", + "enum": [ + "read", + "write" + ] + }, + "organization_announcement_banners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage announcement banners for an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_plan": { + "type": "string", + "description": "The level of permission to grant the access token for viewing an organization's plan.", + "enum": [ + "read" + ] + }, + "organization_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", + "enum": [ + "read", + "write", + "admin" + ] + }, + "organization_packages": { + "type": "string", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "organization_secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization secrets.", + "enum": [ + "read", + "write" + ] + }, + "organization_self_hosted_runners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_user_blocking": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", + "enum": [ + "read", + "write" + ] + }, + "team_discussions": { + "type": "string", + "description": "The level of permission to grant the access token to manage team discussions and related comments.", + "enum": [ + "read", + "write" + ] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + } + }, + "repository_selection": { + "description": "Describe whether all repositories have been selected or there's a selection involved", + "type": "string", + "enum": [ + "all", + "selected" + ] + }, + "single_file_name": { + "type": [ + "string", + "null" + ], + "examples": [ + "config.yaml" + ] + }, + "has_multiple_single_files": { + "type": "boolean", + "examples": [ + true + ] + }, + "single_file_paths": { + "type": "array", + "items": { + "type": "string" + }, + "examples": [ + "config.yml", + ".github/issue_TEMPLATE.md" + ] + }, + "repositories_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "account": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + }, + "required": [ + "permissions", + "repository_selection", + "single_file_name", + "repositories_url", + "account" + ] + } + ] + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + }, + "required": [ + "app", + "id", + "note", + "note_url", + "scopes", + "token", + "hashed_token", + "token_last_eight", + "fingerprint", + "url", + "created_at", + "updated_at", + "expires_at" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Use a non-scoped user-to-server access token to create a repository scoped and/or permission scoped user-to-server access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the client_id and client_secret of the GitHub App as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" + }, + { + "httpStatusCode": "401", + "description": "Requires authentication
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, { "serverUrl": "https://api.github.com", "verb": "get", @@ -123189,1286 +124448,8 @@ "type": "string", "name": "access_token", "in": "body", - "description": "The access_token of the OAuth application.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "Response
", - "example": { - "id": 1, - "url": "https://api.github.com/authorizations/1", - "scopes": [ - "public_repo", - "user" - ], - "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", - "token_last_eight": "Ae178B4a", - "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", - "app": { - "url": "http://my-github-app.com", - "name": "my github app", - "client_id": "Iv1.8a61f9b3a7aba766" - }, - "note": "optional note", - "note_url": "http://optional/note/url", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "fingerprint": "jklmnop12345678", - "expires_at": "2011-09-08T17:26:27Z", - "user": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - } - }, - "schema": { - "title": "Authorization", - "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string", - "format": "uri" - }, - "scopes": { - "description": "A list of scopes that this authorization is in.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "token": { - "type": "string" - }, - "token_last_eight": { - "type": [ - "string", - "null" - ] - }, - "hashed_token": { - "type": [ - "string", - "null" - ] - }, - "app": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "client_id", - "name", - "url" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "note_url": { - "type": [ - "string", - "null" - ], - "format": "uri" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "fingerprint": { - "type": [ - "string", - "null" - ] - }, - "user": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "installation": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Scoped Installation", - "type": "object", - "properties": { - "permissions": { - "title": "App Permissions", - "type": "object", - "description": "The permissions granted to the user-to-server access token.", - "properties": { - "actions": { - "type": "string", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", - "enum": [ - "read", - "write" - ] - }, - "administration": { - "type": "string", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", - "enum": [ - "read", - "write" - ] - }, - "checks": { - "type": "string", - "description": "The level of permission to grant the access token for checks on code.", - "enum": [ - "read", - "write" - ] - }, - "contents": { - "type": "string", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", - "enum": [ - "read", - "write" - ] - }, - "deployments": { - "type": "string", - "description": "The level of permission to grant the access token for deployments and deployment statuses.", - "enum": [ - "read", - "write" - ] - }, - "environments": { - "type": "string", - "description": "The level of permission to grant the access token for managing repository environments.", - "enum": [ - "read", - "write" - ] - }, - "issues": { - "type": "string", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", - "enum": [ - "read", - "write" - ] - }, - "metadata": { - "type": "string", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", - "enum": [ - "read", - "write" - ] - }, - "packages": { - "type": "string", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "pages": { - "type": "string", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", - "enum": [ - "read", - "write" - ] - }, - "pull_requests": { - "type": "string", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", - "enum": [ - "read", - "write" - ] - }, - "repository_announcement_banners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage announcement banners for a repository.", - "enum": [ - "read", - "write" - ] - }, - "repository_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", - "enum": [ - "read", - "write" - ] - }, - "repository_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", - "enum": [ - "read", - "write", - "admin" - ] - }, - "secret_scanning_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository secrets.", - "enum": [ - "read", - "write" - ] - }, - "security_events": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "single_file": { - "type": "string", - "description": "The level of permission to grant the access token to manage just a single file.", - "enum": [ - "read", - "write" - ] - }, - "statuses": { - "type": "string", - "description": "The level of permission to grant the access token for commit statuses.", - "enum": [ - "read", - "write" - ] - }, - "vulnerability_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to manage Dependabot alerts.", - "enum": [ - "read", - "write" - ] - }, - "workflows": { - "type": "string", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", - "enum": [ - "write" - ] - }, - "members": { - "type": "string", - "description": "The level of permission to grant the access token for organization teams and members.", - "enum": [ - "read", - "write" - ] - }, - "organization_administration": { - "type": "string", - "description": "The level of permission to grant the access token to manage access to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_custom_roles": { - "type": "string", - "description": "The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.", - "enum": [ - "read", - "write" - ] - }, - "organization_announcement_banners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage announcement banners for an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_plan": { - "type": "string", - "description": "The level of permission to grant the access token for viewing an organization's plan.", - "enum": [ - "read" - ] - }, - "organization_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", - "enum": [ - "read", - "write", - "admin" - ] - }, - "organization_packages": { - "type": "string", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "organization_secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization secrets.", - "enum": [ - "read", - "write" - ] - }, - "organization_self_hosted_runners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_user_blocking": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", - "enum": [ - "read", - "write" - ] - }, - "team_discussions": { - "type": "string", - "description": "The level of permission to grant the access token to manage team discussions and related comments.", - "enum": [ - "read", - "write" - ] - } - }, - "example": { - "contents": "read", - "issues": "read", - "deployments": "write", - "single_file": "read" - } - }, - "repository_selection": { - "description": "Describe whether all repositories have been selected or there's a selection involved", - "type": "string", - "enum": [ - "all", - "selected" - ] - }, - "single_file_name": { - "type": [ - "string", - "null" - ], - "examples": [ - "config.yaml" - ] - }, - "has_multiple_single_files": { - "type": "boolean", - "examples": [ - true - ] - }, - "single_file_paths": { - "type": "array", - "items": { - "type": "string" - }, - "examples": [ - "config.yml", - ".github/issue_TEMPLATE.md" - ] - }, - "repositories_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "account": { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - }, - "required": [ - "permissions", - "repository_selection", - "single_file_name", - "repositories_url", - "account" - ] - } - ] - }, - "expires_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - } - }, - "required": [ - "app", - "id", - "note", - "note_url", - "scopes", - "token", - "hashed_token", - "token_last_eight", - "fingerprint", - "url", - "created_at", - "updated_at", - "expires_at" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/applications/{client_id}/token", - "title": "Delete an app token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "204", - "description": "Response
" - } - } - ], - "previews": [], - "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/applications/{client_id}/token/scoped", - "title": "Create a scoped access token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", + "description": "The access_token of the OAuth application.
", "isRequired": true - }, - { - "type": "string", - "name": "target", - "in": "body", - "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", - "childParamsGroups": [ - { - "type": "string", - "name": "actions", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "administration", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "checks", - "description": "The level of permission to grant the access token for checks on code.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "contents", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "deployments", - "description": "The level of permission to grant the access token for deployments and deployment statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "environments", - "description": "The level of permission to grant the access token for managing repository environments.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "issues", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "metadata", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "packages", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pages", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pull_requests", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_announcement_banners", - "description": "The level of permission to grant the access token to view and manage announcement banners for a repository.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_projects", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "secret_scanning_alerts", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "secrets", - "description": "The level of permission to grant the access token to manage repository secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "security_events", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "single_file", - "description": "The level of permission to grant the access token to manage just a single file.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "statuses", - "description": "The level of permission to grant the access token for commit statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "vulnerability_alerts", - "description": "The level of permission to grant the access token to manage Dependabot alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "workflows", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", - "enum": [ - "write" - ] - }, - { - "type": "string", - "name": "members", - "description": "The level of permission to grant the access token for organization teams and members.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_administration", - "description": "The level of permission to grant the access token to manage access to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_custom_roles", - "description": "The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_announcement_banners", - "description": "The level of permission to grant the access token to view and manage announcement banners for an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_plan", - "description": "The level of permission to grant the access token for viewing an organization's plan.
", - "enum": [ - "read" - ] - }, - { - "type": "string", - "name": "organization_projects", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "organization_packages", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_secrets", - "description": "The level of permission to grant the access token to manage organization secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_self_hosted_runners", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_user_blocking", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "team_discussions", - "description": "The level of permission to grant the access token to manage team discussions and related comments.
", - "enum": [ - "read", - "write" - ] - } - ] } ], "enabledForGitHubApps": false, @@ -124480,13 +124461,7 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", - "target": "octocat", - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - } + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" }, "parameters": { "client_id": "Iv1.8a61f9b3a7aba766" @@ -124499,7 +124474,10 @@ "example": { "id": 1, "url": "https://api.github.com/authorizations/1", - "scopes": [], + "scopes": [ + "public_repo", + "user" + ], "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", "token_last_eight": "Ae178B4a", "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", @@ -124533,38 +124511,6 @@ "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false - }, - "installation": { - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - }, - "repository_selection": "selected", - "single_file_name": ".github/workflow.yml", - "repositories_url": "https://api.github.com/user/repos", - "account": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "has_multiple_single_files": false, - "single_file_paths": [] } }, "schema": { @@ -125345,23 +125291,77 @@ } ], "previews": [], - "descriptionHTML": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" }, { - "httpStatusCode": "401", - "description": "Requires authentication
" - }, + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "delete", + "requestPath": "/applications/{client_id}/token", + "title": "Delete an app token", + "category": "apps", + "subcategory": "oauth-applications", + "parameters": [ { - "httpStatusCode": "403", - "description": "Forbidden
" - }, + "name": "client_id", + "in": "path", + "required": true, + "description": "The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ { - "httpStatusCode": "404", - "description": "Resource not found
" + "type": "string", + "name": "access_token", + "in": "body", + "description": "The OAuth access token used to authenticate to the GitHub API.
", + "isRequired": true + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "204", + "description": "Response
" + } + } + ], + "previews": [], + "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" }, { "httpStatusCode": "422", @@ -371501,6 +371501,38 @@ "type": "integer", "default": 1 } + }, + { + "name": "role", + "description": "Filter invitations by their member role.
", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "admin", + "direct_member", + "billing_manager", + "hiring_manager" + ], + "default": "all" + } + }, + { + "name": "invitation_source", + "description": "Filter invitations by their invitation source.
", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "member", + "scim" + ], + "default": "all" + } } ], "bodyParameters": [], @@ -371794,7 +371826,7 @@ } ], "previews": [], - "descriptionHTML": "The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, hiring_manager, or reinstate. If the invitee is not a GitHub Enterprise Cloud member, the login field in the return hash will be null.
The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, or hiring_manager. If the invitee is not a GitHub Enterprise Cloud member, the login field in the return hash will be null.
This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Cloud expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Cloud expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThe client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "access_token", + "in": "body", + "description": "The access token used to authenticate to the GitHub API.
", + "isRequired": true + }, + { + "type": "string", + "name": "target", + "in": "body", + "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", + "childParamsGroups": [ + { + "type": "string", + "name": "actions", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "administration", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "checks", + "description": "The level of permission to grant the access token for checks on code.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "contents", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "deployments", + "description": "The level of permission to grant the access token for deployments and deployment statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "environments", + "description": "The level of permission to grant the access token for managing repository environments.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "issues", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "metadata", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "packages", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pages", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pull_requests", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_projects", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "secret_scanning_alerts", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "secrets", + "description": "The level of permission to grant the access token to manage repository secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "security_events", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "single_file", + "description": "The level of permission to grant the access token to manage just a single file.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "statuses", + "description": "The level of permission to grant the access token for commit statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "vulnerability_alerts", + "description": "The level of permission to grant the access token to manage Dependabot alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "workflows", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", + "enum": [ + "write" + ] + }, + { + "type": "string", + "name": "members", + "description": "The level of permission to grant the access token for organization teams and members.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_administration", + "description": "The level of permission to grant the access token to manage access to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_plan", + "description": "The level of permission to grant the access token for viewing an organization's plan.
", + "enum": [ + "read" + ] + }, + { + "type": "string", + "name": "organization_projects", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "organization_packages", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_secrets", + "description": "The level of permission to grant the access token to manage organization secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_self_hosted_runners", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_user_blocking", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "team_discussions", + "description": "The level of permission to grant the access token to manage team discussions and related comments.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "content_references", + "description": "The level of permission to grant the access token for notification of content references and creation content attachments.
", + "enum": [ + "read", + "write" + ] + } + ] + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", + "target": "octocat", + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + } + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [], + "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", + "token_last_eight": "Ae178B4a", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "Iv1.8a61f9b3a7aba766" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "expires_at": "2011-09-08T17:26:27Z", + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + }, + "repository_selection": "selected", + "single_file_name": ".github/workflow.yml", + "repositories_url": "https://api.github.com/user/repos", + "account": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "has_multiple_single_files": false, + "single_file_paths": [] + } + }, + "schema": { + "title": "Authorization", + "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + }, + "scopes": { + "description": "A list of scopes that this authorization is in.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": [ + "string", + "null" + ] + }, + "hashed_token": { + "type": [ + "string", + "null" + ] + }, + "app": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "client_id", + "name", + "url" + ] + }, + "note": { + "type": [ + "string", + "null" + ] + }, + "note_url": { + "type": [ + "string", + "null" + ], + "format": "uri" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "user": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "installation": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Scoped Installation", + "type": "object", + "properties": { + "permissions": { + "title": "App Permissions", + "type": "object", + "description": "The permissions granted to the user-to-server access token.", + "properties": { + "actions": { + "type": "string", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", + "enum": [ + "read", + "write" + ] + }, + "administration": { + "type": "string", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", + "enum": [ + "read", + "write" + ] + }, + "checks": { + "type": "string", + "description": "The level of permission to grant the access token for checks on code.", + "enum": [ + "read", + "write" + ] + }, + "contents": { + "type": "string", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", + "enum": [ + "read", + "write" + ] + }, + "deployments": { + "type": "string", + "description": "The level of permission to grant the access token for deployments and deployment statuses.", + "enum": [ + "read", + "write" + ] + }, + "environments": { + "type": "string", + "description": "The level of permission to grant the access token for managing repository environments.", + "enum": [ + "read", + "write" + ] + }, + "issues": { + "type": "string", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", + "enum": [ + "read", + "write" + ] + }, + "metadata": { + "type": "string", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", + "enum": [ + "read", + "write" + ] + }, + "packages": { + "type": "string", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "pages": { + "type": "string", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", + "enum": [ + "read", + "write" + ] + }, + "pull_requests": { + "type": "string", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", + "enum": [ + "read", + "write" + ] + }, + "repository_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", + "enum": [ + "read", + "write" + ] + }, + "repository_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", + "enum": [ + "read", + "write", + "admin" + ] + }, + "secret_scanning_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository secrets.", + "enum": [ + "read", + "write" + ] + }, + "security_events": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "single_file": { + "type": "string", + "description": "The level of permission to grant the access token to manage just a single file.", + "enum": [ + "read", + "write" + ] + }, + "statuses": { + "type": "string", + "description": "The level of permission to grant the access token for commit statuses.", + "enum": [ + "read", + "write" + ] + }, + "vulnerability_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to manage Dependabot alerts.", + "enum": [ + "read", + "write" + ] + }, + "workflows": { + "type": "string", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", + "enum": [ + "write" + ] + }, + "members": { + "type": "string", + "description": "The level of permission to grant the access token for organization teams and members.", + "enum": [ + "read", + "write" + ] + }, + "organization_administration": { + "type": "string", + "description": "The level of permission to grant the access token to manage access to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_plan": { + "type": "string", + "description": "The level of permission to grant the access token for viewing an organization's plan.", + "enum": [ + "read" + ] + }, + "organization_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", + "enum": [ + "read", + "write", + "admin" + ] + }, + "organization_packages": { + "type": "string", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "organization_secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization secrets.", + "enum": [ + "read", + "write" + ] + }, + "organization_self_hosted_runners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_user_blocking": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", + "enum": [ + "read", + "write" + ] + }, + "team_discussions": { + "type": "string", + "description": "The level of permission to grant the access token to manage team discussions and related comments.", + "enum": [ + "read", + "write" + ] + }, + "content_references": { + "type": "string", + "description": "The level of permission to grant the access token for notification of content references and creation content attachments.", + "enum": [ + "read", + "write" + ] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + } + }, + "repository_selection": { + "description": "Describe whether all repositories have been selected or there's a selection involved", + "type": "string", + "enum": [ + "all", + "selected" + ] + }, + "single_file_name": { + "type": [ + "string", + "null" + ], + "examples": [ + "config.yaml" + ] + }, + "has_multiple_single_files": { + "type": "boolean", + "examples": [ + true + ] + }, + "single_file_paths": { + "type": "array", + "items": { + "type": "string" + }, + "examples": [ + "config.yml", + ".github/issue_TEMPLATE.md" + ] + }, + "repositories_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "account": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + }, + "required": [ + "permissions", + "repository_selection", + "single_file_name", + "repositories_url", + "account" + ] + } + ] + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + }, + "required": [ + "app", + "id", + "note", + "note_url", + "scopes", + "token", + "hashed_token", + "token_last_eight", + "fingerprint", + "url", + "created_at", + "updated_at", + "expires_at" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Use a non-scoped user-to-server access token to create a repository scoped and/or permission scoped user-to-server access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the client_id and client_secret of the GitHub App as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" + }, + { + "httpStatusCode": "401", + "description": "Requires authentication
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, { "serverUrl": "http(s)://HOSTNAME/api/v3", "verb": "get", @@ -93934,1252 +95159,8 @@ "type": "string", "name": "access_token", "in": "body", - "description": "The access_token of the OAuth application.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "Response
", - "example": { - "id": 1, - "url": "https://api.github.com/authorizations/1", - "scopes": [ - "public_repo", - "user" - ], - "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", - "token_last_eight": "Ae178B4a", - "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", - "app": { - "url": "http://my-github-app.com", - "name": "my github app", - "client_id": "Iv1.8a61f9b3a7aba766" - }, - "note": "optional note", - "note_url": "http://optional/note/url", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "fingerprint": "jklmnop12345678", - "expires_at": "2011-09-08T17:26:27Z", - "user": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - } - }, - "schema": { - "title": "Authorization", - "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string", - "format": "uri" - }, - "scopes": { - "description": "A list of scopes that this authorization is in.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "token": { - "type": "string" - }, - "token_last_eight": { - "type": [ - "string", - "null" - ] - }, - "hashed_token": { - "type": [ - "string", - "null" - ] - }, - "app": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "client_id", - "name", - "url" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "note_url": { - "type": [ - "string", - "null" - ], - "format": "uri" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "fingerprint": { - "type": [ - "string", - "null" - ] - }, - "user": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "installation": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Scoped Installation", - "type": "object", - "properties": { - "permissions": { - "title": "App Permissions", - "type": "object", - "description": "The permissions granted to the user-to-server access token.", - "properties": { - "actions": { - "type": "string", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", - "enum": [ - "read", - "write" - ] - }, - "administration": { - "type": "string", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", - "enum": [ - "read", - "write" - ] - }, - "checks": { - "type": "string", - "description": "The level of permission to grant the access token for checks on code.", - "enum": [ - "read", - "write" - ] - }, - "contents": { - "type": "string", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", - "enum": [ - "read", - "write" - ] - }, - "deployments": { - "type": "string", - "description": "The level of permission to grant the access token for deployments and deployment statuses.", - "enum": [ - "read", - "write" - ] - }, - "environments": { - "type": "string", - "description": "The level of permission to grant the access token for managing repository environments.", - "enum": [ - "read", - "write" - ] - }, - "issues": { - "type": "string", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", - "enum": [ - "read", - "write" - ] - }, - "metadata": { - "type": "string", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", - "enum": [ - "read", - "write" - ] - }, - "packages": { - "type": "string", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "pages": { - "type": "string", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", - "enum": [ - "read", - "write" - ] - }, - "pull_requests": { - "type": "string", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", - "enum": [ - "read", - "write" - ] - }, - "repository_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", - "enum": [ - "read", - "write" - ] - }, - "repository_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", - "enum": [ - "read", - "write", - "admin" - ] - }, - "secret_scanning_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository secrets.", - "enum": [ - "read", - "write" - ] - }, - "security_events": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "single_file": { - "type": "string", - "description": "The level of permission to grant the access token to manage just a single file.", - "enum": [ - "read", - "write" - ] - }, - "statuses": { - "type": "string", - "description": "The level of permission to grant the access token for commit statuses.", - "enum": [ - "read", - "write" - ] - }, - "vulnerability_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to manage Dependabot alerts.", - "enum": [ - "read", - "write" - ] - }, - "workflows": { - "type": "string", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", - "enum": [ - "write" - ] - }, - "members": { - "type": "string", - "description": "The level of permission to grant the access token for organization teams and members.", - "enum": [ - "read", - "write" - ] - }, - "organization_administration": { - "type": "string", - "description": "The level of permission to grant the access token to manage access to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_plan": { - "type": "string", - "description": "The level of permission to grant the access token for viewing an organization's plan.", - "enum": [ - "read" - ] - }, - "organization_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", - "enum": [ - "read", - "write", - "admin" - ] - }, - "organization_packages": { - "type": "string", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "organization_secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization secrets.", - "enum": [ - "read", - "write" - ] - }, - "organization_self_hosted_runners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_user_blocking": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", - "enum": [ - "read", - "write" - ] - }, - "team_discussions": { - "type": "string", - "description": "The level of permission to grant the access token to manage team discussions and related comments.", - "enum": [ - "read", - "write" - ] - }, - "content_references": { - "type": "string", - "description": "The level of permission to grant the access token for notification of content references and creation content attachments.", - "enum": [ - "read", - "write" - ] - } - }, - "example": { - "contents": "read", - "issues": "read", - "deployments": "write", - "single_file": "read" - } - }, - "repository_selection": { - "description": "Describe whether all repositories have been selected or there's a selection involved", - "type": "string", - "enum": [ - "all", - "selected" - ] - }, - "single_file_name": { - "type": [ - "string", - "null" - ], - "examples": [ - "config.yaml" - ] - }, - "has_multiple_single_files": { - "type": "boolean", - "examples": [ - true - ] - }, - "single_file_paths": { - "type": "array", - "items": { - "type": "string" - }, - "examples": [ - "config.yml", - ".github/issue_TEMPLATE.md" - ] - }, - "repositories_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "account": { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - }, - "required": [ - "permissions", - "repository_selection", - "single_file_name", - "repositories_url", - "account" - ] - } - ] - }, - "expires_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - } - }, - "required": [ - "app", - "id", - "note", - "note_url", - "scopes", - "token", - "hashed_token", - "token_last_eight", - "fingerprint", - "url", - "created_at", - "updated_at", - "expires_at" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/applications/{client_id}/token", - "title": "Delete an app token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "204", - "description": "Response
" - } - } - ], - "previews": [], - "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/applications/{client_id}/token/scoped", - "title": "Create a scoped access token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", + "description": "The access_token of the OAuth application.
", "isRequired": true - }, - { - "type": "string", - "name": "target", - "in": "body", - "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", - "childParamsGroups": [ - { - "type": "string", - "name": "actions", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "administration", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "checks", - "description": "The level of permission to grant the access token for checks on code.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "contents", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "deployments", - "description": "The level of permission to grant the access token for deployments and deployment statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "environments", - "description": "The level of permission to grant the access token for managing repository environments.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "issues", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "metadata", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "packages", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pages", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pull_requests", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_projects", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "secret_scanning_alerts", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "secrets", - "description": "The level of permission to grant the access token to manage repository secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "security_events", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "single_file", - "description": "The level of permission to grant the access token to manage just a single file.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "statuses", - "description": "The level of permission to grant the access token for commit statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "vulnerability_alerts", - "description": "The level of permission to grant the access token to manage Dependabot alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "workflows", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", - "enum": [ - "write" - ] - }, - { - "type": "string", - "name": "members", - "description": "The level of permission to grant the access token for organization teams and members.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_administration", - "description": "The level of permission to grant the access token to manage access to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_plan", - "description": "The level of permission to grant the access token for viewing an organization's plan.
", - "enum": [ - "read" - ] - }, - { - "type": "string", - "name": "organization_projects", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "organization_packages", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_secrets", - "description": "The level of permission to grant the access token to manage organization secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_self_hosted_runners", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_user_blocking", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "team_discussions", - "description": "The level of permission to grant the access token to manage team discussions and related comments.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "content_references", - "description": "The level of permission to grant the access token for notification of content references and creation content attachments.
", - "enum": [ - "read", - "write" - ] - } - ] } ], "enabledForGitHubApps": false, @@ -95191,13 +95172,7 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", - "target": "octocat", - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - } + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" }, "parameters": { "client_id": "Iv1.8a61f9b3a7aba766" @@ -95210,7 +95185,10 @@ "example": { "id": 1, "url": "https://api.github.com/authorizations/1", - "scopes": [], + "scopes": [ + "public_repo", + "user" + ], "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", "token_last_eight": "Ae178B4a", "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", @@ -95244,38 +95222,6 @@ "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false - }, - "installation": { - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - }, - "repository_selection": "selected", - "single_file_name": ".github/workflow.yml", - "repositories_url": "https://api.github.com/user/repos", - "account": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "has_multiple_single_files": false, - "single_file_paths": [] } }, "schema": { @@ -96040,23 +95986,77 @@ } ], "previews": [], - "descriptionHTML": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" }, { - "httpStatusCode": "401", - "description": "Requires authentication
" - }, + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "delete", + "requestPath": "/applications/{client_id}/token", + "title": "Delete an app token", + "category": "apps", + "subcategory": "oauth-applications", + "parameters": [ { - "httpStatusCode": "403", - "description": "Forbidden
" - }, + "name": "client_id", + "in": "path", + "required": true, + "description": "The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ { - "httpStatusCode": "404", - "description": "Resource not found
" + "type": "string", + "name": "access_token", + "in": "body", + "description": "The OAuth access token used to authenticate to the GitHub API.
", + "isRequired": true + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "204", + "description": "Response
" + } + } + ], + "previews": [], + "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" }, { "httpStatusCode": "422", @@ -345484,7 +345484,7 @@ } ], "previews": [], - "descriptionHTML": "This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThe permission to grant the team on this repository. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
The permission to grant the team on this repository. We accept the following permissions to be set: pull, triage, push, maintain, admin and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "access_token", + "in": "body", + "description": "The access token used to authenticate to the GitHub API.
", + "isRequired": true + }, + { + "type": "string", + "name": "target", + "in": "body", + "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", + "childParamsGroups": [ + { + "type": "string", + "name": "actions", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "administration", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "checks", + "description": "The level of permission to grant the access token for checks on code.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "contents", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "deployments", + "description": "The level of permission to grant the access token for deployments and deployment statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "environments", + "description": "The level of permission to grant the access token for managing repository environments.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "issues", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "metadata", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "packages", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pages", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pull_requests", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_projects", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "secret_scanning_alerts", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "secrets", + "description": "The level of permission to grant the access token to manage repository secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "security_events", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "single_file", + "description": "The level of permission to grant the access token to manage just a single file.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "statuses", + "description": "The level of permission to grant the access token for commit statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "vulnerability_alerts", + "description": "The level of permission to grant the access token to manage Dependabot alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "workflows", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", + "enum": [ + "write" + ] + }, + { + "type": "string", + "name": "members", + "description": "The level of permission to grant the access token for organization teams and members.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_administration", + "description": "The level of permission to grant the access token to manage access to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_plan", + "description": "The level of permission to grant the access token for viewing an organization's plan.
", + "enum": [ + "read" + ] + }, + { + "type": "string", + "name": "organization_projects", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "organization_packages", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_secrets", + "description": "The level of permission to grant the access token to manage organization secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_self_hosted_runners", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_user_blocking", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "team_discussions", + "description": "The level of permission to grant the access token to manage team discussions and related comments.
", + "enum": [ + "read", + "write" + ] + } + ] + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", + "target": "octocat", + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + } + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [], + "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", + "token_last_eight": "Ae178B4a", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "Iv1.8a61f9b3a7aba766" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "expires_at": "2011-09-08T17:26:27Z", + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + }, + "repository_selection": "selected", + "single_file_name": ".github/workflow.yml", + "repositories_url": "https://api.github.com/user/repos", + "account": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "has_multiple_single_files": false, + "single_file_paths": [] + } + }, + "schema": { + "title": "Authorization", + "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + }, + "scopes": { + "description": "A list of scopes that this authorization is in.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": [ + "string", + "null" + ] + }, + "hashed_token": { + "type": [ + "string", + "null" + ] + }, + "app": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "client_id", + "name", + "url" + ] + }, + "note": { + "type": [ + "string", + "null" + ] + }, + "note_url": { + "type": [ + "string", + "null" + ], + "format": "uri" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "user": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "installation": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Scoped Installation", + "type": "object", + "properties": { + "permissions": { + "title": "App Permissions", + "type": "object", + "description": "The permissions granted to the user-to-server access token.", + "properties": { + "actions": { + "type": "string", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", + "enum": [ + "read", + "write" + ] + }, + "administration": { + "type": "string", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", + "enum": [ + "read", + "write" + ] + }, + "checks": { + "type": "string", + "description": "The level of permission to grant the access token for checks on code.", + "enum": [ + "read", + "write" + ] + }, + "contents": { + "type": "string", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", + "enum": [ + "read", + "write" + ] + }, + "deployments": { + "type": "string", + "description": "The level of permission to grant the access token for deployments and deployment statuses.", + "enum": [ + "read", + "write" + ] + }, + "environments": { + "type": "string", + "description": "The level of permission to grant the access token for managing repository environments.", + "enum": [ + "read", + "write" + ] + }, + "issues": { + "type": "string", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", + "enum": [ + "read", + "write" + ] + }, + "metadata": { + "type": "string", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", + "enum": [ + "read", + "write" + ] + }, + "packages": { + "type": "string", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "pages": { + "type": "string", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", + "enum": [ + "read", + "write" + ] + }, + "pull_requests": { + "type": "string", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", + "enum": [ + "read", + "write" + ] + }, + "repository_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", + "enum": [ + "read", + "write" + ] + }, + "repository_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", + "enum": [ + "read", + "write", + "admin" + ] + }, + "secret_scanning_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository secrets.", + "enum": [ + "read", + "write" + ] + }, + "security_events": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "single_file": { + "type": "string", + "description": "The level of permission to grant the access token to manage just a single file.", + "enum": [ + "read", + "write" + ] + }, + "statuses": { + "type": "string", + "description": "The level of permission to grant the access token for commit statuses.", + "enum": [ + "read", + "write" + ] + }, + "vulnerability_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to manage Dependabot alerts.", + "enum": [ + "read", + "write" + ] + }, + "workflows": { + "type": "string", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", + "enum": [ + "write" + ] + }, + "members": { + "type": "string", + "description": "The level of permission to grant the access token for organization teams and members.", + "enum": [ + "read", + "write" + ] + }, + "organization_administration": { + "type": "string", + "description": "The level of permission to grant the access token to manage access to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_plan": { + "type": "string", + "description": "The level of permission to grant the access token for viewing an organization's plan.", + "enum": [ + "read" + ] + }, + "organization_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", + "enum": [ + "read", + "write", + "admin" + ] + }, + "organization_packages": { + "type": "string", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "organization_secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization secrets.", + "enum": [ + "read", + "write" + ] + }, + "organization_self_hosted_runners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_user_blocking": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", + "enum": [ + "read", + "write" + ] + }, + "team_discussions": { + "type": "string", + "description": "The level of permission to grant the access token to manage team discussions and related comments.", + "enum": [ + "read", + "write" + ] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + } + }, + "repository_selection": { + "description": "Describe whether all repositories have been selected or there's a selection involved", + "type": "string", + "enum": [ + "all", + "selected" + ] + }, + "single_file_name": { + "type": [ + "string", + "null" + ], + "examples": [ + "config.yaml" + ] + }, + "has_multiple_single_files": { + "type": "boolean", + "examples": [ + true + ] + }, + "single_file_paths": { + "type": "array", + "items": { + "type": "string" + }, + "examples": [ + "config.yml", + ".github/issue_TEMPLATE.md" + ] + }, + "repositories_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "account": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + }, + "required": [ + "permissions", + "repository_selection", + "single_file_name", + "repositories_url", + "account" + ] + } + ] + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + }, + "required": [ + "app", + "id", + "note", + "note_url", + "scopes", + "token", + "hashed_token", + "token_last_eight", + "fingerprint", + "url", + "created_at", + "updated_at", + "expires_at" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Use a non-scoped user-to-server access token to create a repository scoped and/or permission scoped user-to-server access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the client_id and client_secret of the GitHub App as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" + }, + { + "httpStatusCode": "401", + "description": "Requires authentication
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, { "serverUrl": "http(s)://HOSTNAME/api/v3", "verb": "get", @@ -95731,1235 +96939,8 @@ "type": "string", "name": "access_token", "in": "body", - "description": "The access_token of the OAuth application.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "Response
", - "example": { - "id": 1, - "url": "https://api.github.com/authorizations/1", - "scopes": [ - "public_repo", - "user" - ], - "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", - "token_last_eight": "Ae178B4a", - "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", - "app": { - "url": "http://my-github-app.com", - "name": "my github app", - "client_id": "Iv1.8a61f9b3a7aba766" - }, - "note": "optional note", - "note_url": "http://optional/note/url", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "fingerprint": "jklmnop12345678", - "expires_at": "2011-09-08T17:26:27Z", - "user": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - } - }, - "schema": { - "title": "Authorization", - "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string", - "format": "uri" - }, - "scopes": { - "description": "A list of scopes that this authorization is in.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "token": { - "type": "string" - }, - "token_last_eight": { - "type": [ - "string", - "null" - ] - }, - "hashed_token": { - "type": [ - "string", - "null" - ] - }, - "app": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "client_id", - "name", - "url" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "note_url": { - "type": [ - "string", - "null" - ], - "format": "uri" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "fingerprint": { - "type": [ - "string", - "null" - ] - }, - "user": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "installation": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Scoped Installation", - "type": "object", - "properties": { - "permissions": { - "title": "App Permissions", - "type": "object", - "description": "The permissions granted to the user-to-server access token.", - "properties": { - "actions": { - "type": "string", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", - "enum": [ - "read", - "write" - ] - }, - "administration": { - "type": "string", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", - "enum": [ - "read", - "write" - ] - }, - "checks": { - "type": "string", - "description": "The level of permission to grant the access token for checks on code.", - "enum": [ - "read", - "write" - ] - }, - "contents": { - "type": "string", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", - "enum": [ - "read", - "write" - ] - }, - "deployments": { - "type": "string", - "description": "The level of permission to grant the access token for deployments and deployment statuses.", - "enum": [ - "read", - "write" - ] - }, - "environments": { - "type": "string", - "description": "The level of permission to grant the access token for managing repository environments.", - "enum": [ - "read", - "write" - ] - }, - "issues": { - "type": "string", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", - "enum": [ - "read", - "write" - ] - }, - "metadata": { - "type": "string", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", - "enum": [ - "read", - "write" - ] - }, - "packages": { - "type": "string", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "pages": { - "type": "string", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", - "enum": [ - "read", - "write" - ] - }, - "pull_requests": { - "type": "string", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", - "enum": [ - "read", - "write" - ] - }, - "repository_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", - "enum": [ - "read", - "write" - ] - }, - "repository_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", - "enum": [ - "read", - "write", - "admin" - ] - }, - "secret_scanning_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository secrets.", - "enum": [ - "read", - "write" - ] - }, - "security_events": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "single_file": { - "type": "string", - "description": "The level of permission to grant the access token to manage just a single file.", - "enum": [ - "read", - "write" - ] - }, - "statuses": { - "type": "string", - "description": "The level of permission to grant the access token for commit statuses.", - "enum": [ - "read", - "write" - ] - }, - "vulnerability_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to manage Dependabot alerts.", - "enum": [ - "read", - "write" - ] - }, - "workflows": { - "type": "string", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", - "enum": [ - "write" - ] - }, - "members": { - "type": "string", - "description": "The level of permission to grant the access token for organization teams and members.", - "enum": [ - "read", - "write" - ] - }, - "organization_administration": { - "type": "string", - "description": "The level of permission to grant the access token to manage access to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_plan": { - "type": "string", - "description": "The level of permission to grant the access token for viewing an organization's plan.", - "enum": [ - "read" - ] - }, - "organization_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", - "enum": [ - "read", - "write", - "admin" - ] - }, - "organization_packages": { - "type": "string", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "organization_secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization secrets.", - "enum": [ - "read", - "write" - ] - }, - "organization_self_hosted_runners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_user_blocking": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", - "enum": [ - "read", - "write" - ] - }, - "team_discussions": { - "type": "string", - "description": "The level of permission to grant the access token to manage team discussions and related comments.", - "enum": [ - "read", - "write" - ] - } - }, - "example": { - "contents": "read", - "issues": "read", - "deployments": "write", - "single_file": "read" - } - }, - "repository_selection": { - "description": "Describe whether all repositories have been selected or there's a selection involved", - "type": "string", - "enum": [ - "all", - "selected" - ] - }, - "single_file_name": { - "type": [ - "string", - "null" - ], - "examples": [ - "config.yaml" - ] - }, - "has_multiple_single_files": { - "type": "boolean", - "examples": [ - true - ] - }, - "single_file_paths": { - "type": "array", - "items": { - "type": "string" - }, - "examples": [ - "config.yml", - ".github/issue_TEMPLATE.md" - ] - }, - "repositories_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "account": { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - }, - "required": [ - "permissions", - "repository_selection", - "single_file_name", - "repositories_url", - "account" - ] - } - ] - }, - "expires_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - } - }, - "required": [ - "app", - "id", - "note", - "note_url", - "scopes", - "token", - "hashed_token", - "token_last_eight", - "fingerprint", - "url", - "created_at", - "updated_at", - "expires_at" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/applications/{client_id}/token", - "title": "Delete an app token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "204", - "description": "Response
" - } - } - ], - "previews": [], - "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/applications/{client_id}/token/scoped", - "title": "Create a scoped access token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", + "description": "The access_token of the OAuth application.
", "isRequired": true - }, - { - "type": "string", - "name": "target", - "in": "body", - "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", - "childParamsGroups": [ - { - "type": "string", - "name": "actions", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "administration", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "checks", - "description": "The level of permission to grant the access token for checks on code.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "contents", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "deployments", - "description": "The level of permission to grant the access token for deployments and deployment statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "environments", - "description": "The level of permission to grant the access token for managing repository environments.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "issues", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "metadata", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "packages", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pages", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pull_requests", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_projects", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "secret_scanning_alerts", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "secrets", - "description": "The level of permission to grant the access token to manage repository secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "security_events", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "single_file", - "description": "The level of permission to grant the access token to manage just a single file.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "statuses", - "description": "The level of permission to grant the access token for commit statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "vulnerability_alerts", - "description": "The level of permission to grant the access token to manage Dependabot alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "workflows", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", - "enum": [ - "write" - ] - }, - { - "type": "string", - "name": "members", - "description": "The level of permission to grant the access token for organization teams and members.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_administration", - "description": "The level of permission to grant the access token to manage access to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_plan", - "description": "The level of permission to grant the access token for viewing an organization's plan.
", - "enum": [ - "read" - ] - }, - { - "type": "string", - "name": "organization_projects", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "organization_packages", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_secrets", - "description": "The level of permission to grant the access token to manage organization secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_self_hosted_runners", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_user_blocking", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "team_discussions", - "description": "The level of permission to grant the access token to manage team discussions and related comments.
", - "enum": [ - "read", - "write" - ] - } - ] } ], "enabledForGitHubApps": false, @@ -96971,13 +96952,7 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", - "target": "octocat", - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - } + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" }, "parameters": { "client_id": "Iv1.8a61f9b3a7aba766" @@ -96990,7 +96965,10 @@ "example": { "id": 1, "url": "https://api.github.com/authorizations/1", - "scopes": [], + "scopes": [ + "public_repo", + "user" + ], "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", "token_last_eight": "Ae178B4a", "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", @@ -97024,38 +97002,6 @@ "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false - }, - "installation": { - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - }, - "repository_selection": "selected", - "single_file_name": ".github/workflow.yml", - "repositories_url": "https://api.github.com/user/repos", - "account": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "has_multiple_single_files": false, - "single_file_paths": [] } }, "schema": { @@ -97812,23 +97758,77 @@ } ], "previews": [], - "descriptionHTML": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" }, { - "httpStatusCode": "401", - "description": "Requires authentication
" - }, + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "delete", + "requestPath": "/applications/{client_id}/token", + "title": "Delete an app token", + "category": "apps", + "subcategory": "oauth-applications", + "parameters": [ { - "httpStatusCode": "403", - "description": "Forbidden
" - }, + "name": "client_id", + "in": "path", + "required": true, + "description": "The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ { - "httpStatusCode": "404", - "description": "Resource not found
" + "type": "string", + "name": "access_token", + "in": "body", + "description": "The OAuth access token used to authenticate to the GitHub API.
", + "isRequired": true + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "204", + "description": "Response
" + } + } + ], + "previews": [], + "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" }, { "httpStatusCode": "422", @@ -363695,7 +363695,7 @@ } ], "previews": [], - "descriptionHTML": "This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThe permission to grant the team on this repository. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
The permission to grant the team on this repository. We accept the following permissions to be set: pull, triage, push, maintain, admin and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "access_token", + "in": "body", + "description": "The access token used to authenticate to the GitHub API.
", + "isRequired": true + }, + { + "type": "string", + "name": "target", + "in": "body", + "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", + "childParamsGroups": [ + { + "type": "string", + "name": "actions", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "administration", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "checks", + "description": "The level of permission to grant the access token for checks on code.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "contents", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "deployments", + "description": "The level of permission to grant the access token for deployments and deployment statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "environments", + "description": "The level of permission to grant the access token for managing repository environments.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "issues", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "metadata", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "packages", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pages", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pull_requests", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_projects", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "secret_scanning_alerts", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "secrets", + "description": "The level of permission to grant the access token to manage repository secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "security_events", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "single_file", + "description": "The level of permission to grant the access token to manage just a single file.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "statuses", + "description": "The level of permission to grant the access token for commit statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "vulnerability_alerts", + "description": "The level of permission to grant the access token to manage Dependabot alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "workflows", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", + "enum": [ + "write" + ] + }, + { + "type": "string", + "name": "members", + "description": "The level of permission to grant the access token for organization teams and members.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_administration", + "description": "The level of permission to grant the access token to manage access to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_plan", + "description": "The level of permission to grant the access token for viewing an organization's plan.
", + "enum": [ + "read" + ] + }, + { + "type": "string", + "name": "organization_projects", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "organization_packages", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_secrets", + "description": "The level of permission to grant the access token to manage organization secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_self_hosted_runners", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_user_blocking", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "team_discussions", + "description": "The level of permission to grant the access token to manage team discussions and related comments.
", + "enum": [ + "read", + "write" + ] + } + ] + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", + "target": "octocat", + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + } + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [], + "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", + "token_last_eight": "Ae178B4a", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "Iv1.8a61f9b3a7aba766" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "expires_at": "2011-09-08T17:26:27Z", + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + }, + "repository_selection": "selected", + "single_file_name": ".github/workflow.yml", + "repositories_url": "https://api.github.com/user/repos", + "account": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "has_multiple_single_files": false, + "single_file_paths": [] + } + }, + "schema": { + "title": "Authorization", + "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + }, + "scopes": { + "description": "A list of scopes that this authorization is in.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": [ + "string", + "null" + ] + }, + "hashed_token": { + "type": [ + "string", + "null" + ] + }, + "app": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "client_id", + "name", + "url" + ] + }, + "note": { + "type": [ + "string", + "null" + ] + }, + "note_url": { + "type": [ + "string", + "null" + ], + "format": "uri" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "user": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "installation": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Scoped Installation", + "type": "object", + "properties": { + "permissions": { + "title": "App Permissions", + "type": "object", + "description": "The permissions granted to the user-to-server access token.", + "properties": { + "actions": { + "type": "string", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", + "enum": [ + "read", + "write" + ] + }, + "administration": { + "type": "string", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", + "enum": [ + "read", + "write" + ] + }, + "checks": { + "type": "string", + "description": "The level of permission to grant the access token for checks on code.", + "enum": [ + "read", + "write" + ] + }, + "contents": { + "type": "string", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", + "enum": [ + "read", + "write" + ] + }, + "deployments": { + "type": "string", + "description": "The level of permission to grant the access token for deployments and deployment statuses.", + "enum": [ + "read", + "write" + ] + }, + "environments": { + "type": "string", + "description": "The level of permission to grant the access token for managing repository environments.", + "enum": [ + "read", + "write" + ] + }, + "issues": { + "type": "string", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", + "enum": [ + "read", + "write" + ] + }, + "metadata": { + "type": "string", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", + "enum": [ + "read", + "write" + ] + }, + "packages": { + "type": "string", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "pages": { + "type": "string", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", + "enum": [ + "read", + "write" + ] + }, + "pull_requests": { + "type": "string", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", + "enum": [ + "read", + "write" + ] + }, + "repository_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", + "enum": [ + "read", + "write" + ] + }, + "repository_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", + "enum": [ + "read", + "write", + "admin" + ] + }, + "secret_scanning_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository secrets.", + "enum": [ + "read", + "write" + ] + }, + "security_events": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "single_file": { + "type": "string", + "description": "The level of permission to grant the access token to manage just a single file.", + "enum": [ + "read", + "write" + ] + }, + "statuses": { + "type": "string", + "description": "The level of permission to grant the access token for commit statuses.", + "enum": [ + "read", + "write" + ] + }, + "vulnerability_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to manage Dependabot alerts.", + "enum": [ + "read", + "write" + ] + }, + "workflows": { + "type": "string", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", + "enum": [ + "write" + ] + }, + "members": { + "type": "string", + "description": "The level of permission to grant the access token for organization teams and members.", + "enum": [ + "read", + "write" + ] + }, + "organization_administration": { + "type": "string", + "description": "The level of permission to grant the access token to manage access to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_plan": { + "type": "string", + "description": "The level of permission to grant the access token for viewing an organization's plan.", + "enum": [ + "read" + ] + }, + "organization_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", + "enum": [ + "read", + "write", + "admin" + ] + }, + "organization_packages": { + "type": "string", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "organization_secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization secrets.", + "enum": [ + "read", + "write" + ] + }, + "organization_self_hosted_runners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_user_blocking": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", + "enum": [ + "read", + "write" + ] + }, + "team_discussions": { + "type": "string", + "description": "The level of permission to grant the access token to manage team discussions and related comments.", + "enum": [ + "read", + "write" + ] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + } + }, + "repository_selection": { + "description": "Describe whether all repositories have been selected or there's a selection involved", + "type": "string", + "enum": [ + "all", + "selected" + ] + }, + "single_file_name": { + "type": [ + "string", + "null" + ], + "examples": [ + "config.yaml" + ] + }, + "has_multiple_single_files": { + "type": "boolean", + "examples": [ + true + ] + }, + "single_file_paths": { + "type": "array", + "items": { + "type": "string" + }, + "examples": [ + "config.yml", + ".github/issue_TEMPLATE.md" + ] + }, + "repositories_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "account": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + }, + "required": [ + "permissions", + "repository_selection", + "single_file_name", + "repositories_url", + "account" + ] + } + ] + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + }, + "required": [ + "app", + "id", + "note", + "note_url", + "scopes", + "token", + "hashed_token", + "token_last_eight", + "fingerprint", + "url", + "created_at", + "updated_at", + "expires_at" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Use a non-scoped user-to-server access token to create a repository scoped and/or permission scoped user-to-server access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the client_id and client_secret of the GitHub App as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" + }, + { + "httpStatusCode": "401", + "description": "Requires authentication
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, { "serverUrl": "http(s)://HOSTNAME/api/v3", "verb": "get", @@ -101405,1235 +102613,8 @@ "type": "string", "name": "access_token", "in": "body", - "description": "The access_token of the OAuth application.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "Response
", - "example": { - "id": 1, - "url": "https://api.github.com/authorizations/1", - "scopes": [ - "public_repo", - "user" - ], - "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", - "token_last_eight": "Ae178B4a", - "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", - "app": { - "url": "http://my-github-app.com", - "name": "my github app", - "client_id": "Iv1.8a61f9b3a7aba766" - }, - "note": "optional note", - "note_url": "http://optional/note/url", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "fingerprint": "jklmnop12345678", - "expires_at": "2011-09-08T17:26:27Z", - "user": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - } - }, - "schema": { - "title": "Authorization", - "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string", - "format": "uri" - }, - "scopes": { - "description": "A list of scopes that this authorization is in.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "token": { - "type": "string" - }, - "token_last_eight": { - "type": [ - "string", - "null" - ] - }, - "hashed_token": { - "type": [ - "string", - "null" - ] - }, - "app": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "client_id", - "name", - "url" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "note_url": { - "type": [ - "string", - "null" - ], - "format": "uri" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "fingerprint": { - "type": [ - "string", - "null" - ] - }, - "user": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "installation": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Scoped Installation", - "type": "object", - "properties": { - "permissions": { - "title": "App Permissions", - "type": "object", - "description": "The permissions granted to the user-to-server access token.", - "properties": { - "actions": { - "type": "string", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", - "enum": [ - "read", - "write" - ] - }, - "administration": { - "type": "string", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", - "enum": [ - "read", - "write" - ] - }, - "checks": { - "type": "string", - "description": "The level of permission to grant the access token for checks on code.", - "enum": [ - "read", - "write" - ] - }, - "contents": { - "type": "string", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", - "enum": [ - "read", - "write" - ] - }, - "deployments": { - "type": "string", - "description": "The level of permission to grant the access token for deployments and deployment statuses.", - "enum": [ - "read", - "write" - ] - }, - "environments": { - "type": "string", - "description": "The level of permission to grant the access token for managing repository environments.", - "enum": [ - "read", - "write" - ] - }, - "issues": { - "type": "string", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", - "enum": [ - "read", - "write" - ] - }, - "metadata": { - "type": "string", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", - "enum": [ - "read", - "write" - ] - }, - "packages": { - "type": "string", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "pages": { - "type": "string", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", - "enum": [ - "read", - "write" - ] - }, - "pull_requests": { - "type": "string", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", - "enum": [ - "read", - "write" - ] - }, - "repository_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", - "enum": [ - "read", - "write" - ] - }, - "repository_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", - "enum": [ - "read", - "write", - "admin" - ] - }, - "secret_scanning_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository secrets.", - "enum": [ - "read", - "write" - ] - }, - "security_events": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "single_file": { - "type": "string", - "description": "The level of permission to grant the access token to manage just a single file.", - "enum": [ - "read", - "write" - ] - }, - "statuses": { - "type": "string", - "description": "The level of permission to grant the access token for commit statuses.", - "enum": [ - "read", - "write" - ] - }, - "vulnerability_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to manage Dependabot alerts.", - "enum": [ - "read", - "write" - ] - }, - "workflows": { - "type": "string", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", - "enum": [ - "write" - ] - }, - "members": { - "type": "string", - "description": "The level of permission to grant the access token for organization teams and members.", - "enum": [ - "read", - "write" - ] - }, - "organization_administration": { - "type": "string", - "description": "The level of permission to grant the access token to manage access to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_plan": { - "type": "string", - "description": "The level of permission to grant the access token for viewing an organization's plan.", - "enum": [ - "read" - ] - }, - "organization_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", - "enum": [ - "read", - "write", - "admin" - ] - }, - "organization_packages": { - "type": "string", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "organization_secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization secrets.", - "enum": [ - "read", - "write" - ] - }, - "organization_self_hosted_runners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_user_blocking": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", - "enum": [ - "read", - "write" - ] - }, - "team_discussions": { - "type": "string", - "description": "The level of permission to grant the access token to manage team discussions and related comments.", - "enum": [ - "read", - "write" - ] - } - }, - "example": { - "contents": "read", - "issues": "read", - "deployments": "write", - "single_file": "read" - } - }, - "repository_selection": { - "description": "Describe whether all repositories have been selected or there's a selection involved", - "type": "string", - "enum": [ - "all", - "selected" - ] - }, - "single_file_name": { - "type": [ - "string", - "null" - ], - "examples": [ - "config.yaml" - ] - }, - "has_multiple_single_files": { - "type": "boolean", - "examples": [ - true - ] - }, - "single_file_paths": { - "type": "array", - "items": { - "type": "string" - }, - "examples": [ - "config.yml", - ".github/issue_TEMPLATE.md" - ] - }, - "repositories_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "account": { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - }, - "required": [ - "permissions", - "repository_selection", - "single_file_name", - "repositories_url", - "account" - ] - } - ] - }, - "expires_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - } - }, - "required": [ - "app", - "id", - "note", - "note_url", - "scopes", - "token", - "hashed_token", - "token_last_eight", - "fingerprint", - "url", - "created_at", - "updated_at", - "expires_at" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/applications/{client_id}/token", - "title": "Delete an app token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "204", - "description": "Response
" - } - } - ], - "previews": [], - "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/applications/{client_id}/token/scoped", - "title": "Create a scoped access token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", + "description": "The access_token of the OAuth application.
", "isRequired": true - }, - { - "type": "string", - "name": "target", - "in": "body", - "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", - "childParamsGroups": [ - { - "type": "string", - "name": "actions", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "administration", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "checks", - "description": "The level of permission to grant the access token for checks on code.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "contents", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "deployments", - "description": "The level of permission to grant the access token for deployments and deployment statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "environments", - "description": "The level of permission to grant the access token for managing repository environments.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "issues", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "metadata", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "packages", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pages", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pull_requests", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_projects", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "secret_scanning_alerts", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "secrets", - "description": "The level of permission to grant the access token to manage repository secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "security_events", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "single_file", - "description": "The level of permission to grant the access token to manage just a single file.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "statuses", - "description": "The level of permission to grant the access token for commit statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "vulnerability_alerts", - "description": "The level of permission to grant the access token to manage Dependabot alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "workflows", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", - "enum": [ - "write" - ] - }, - { - "type": "string", - "name": "members", - "description": "The level of permission to grant the access token for organization teams and members.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_administration", - "description": "The level of permission to grant the access token to manage access to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_plan", - "description": "The level of permission to grant the access token for viewing an organization's plan.
", - "enum": [ - "read" - ] - }, - { - "type": "string", - "name": "organization_projects", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "organization_packages", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_secrets", - "description": "The level of permission to grant the access token to manage organization secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_self_hosted_runners", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_user_blocking", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "team_discussions", - "description": "The level of permission to grant the access token to manage team discussions and related comments.
", - "enum": [ - "read", - "write" - ] - } - ] } ], "enabledForGitHubApps": false, @@ -102645,13 +102626,7 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", - "target": "octocat", - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - } + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" }, "parameters": { "client_id": "Iv1.8a61f9b3a7aba766" @@ -102664,7 +102639,10 @@ "example": { "id": 1, "url": "https://api.github.com/authorizations/1", - "scopes": [], + "scopes": [ + "public_repo", + "user" + ], "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", "token_last_eight": "Ae178B4a", "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", @@ -102698,38 +102676,6 @@ "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false - }, - "installation": { - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - }, - "repository_selection": "selected", - "single_file_name": ".github/workflow.yml", - "repositories_url": "https://api.github.com/user/repos", - "account": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "has_multiple_single_files": false, - "single_file_paths": [] } }, "schema": { @@ -103486,23 +103432,77 @@ } ], "previews": [], - "descriptionHTML": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" }, { - "httpStatusCode": "401", - "description": "Requires authentication
" - }, + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "delete", + "requestPath": "/applications/{client_id}/token", + "title": "Delete an app token", + "category": "apps", + "subcategory": "oauth-applications", + "parameters": [ { - "httpStatusCode": "403", - "description": "Forbidden
" - }, + "name": "client_id", + "in": "path", + "required": true, + "description": "The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ { - "httpStatusCode": "404", - "description": "Resource not found
" + "type": "string", + "name": "access_token", + "in": "body", + "description": "The OAuth access token used to authenticate to the GitHub API.
", + "isRequired": true + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "204", + "description": "Response
" + } + } + ], + "previews": [], + "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" }, { "httpStatusCode": "422", @@ -370798,7 +370798,7 @@ } ], "previews": [], - "descriptionHTML": "This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThe permission to grant the team on this repository. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
The permission to grant the team on this repository. We accept the following permissions to be set: pull, triage, push, maintain, admin and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "access_token", + "in": "body", + "description": "The access token used to authenticate to the GitHub API.
", + "isRequired": true + }, + { + "type": "string", + "name": "target", + "in": "body", + "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", + "childParamsGroups": [ + { + "type": "string", + "name": "actions", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "administration", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "checks", + "description": "The level of permission to grant the access token for checks on code.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "contents", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "deployments", + "description": "The level of permission to grant the access token for deployments and deployment statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "environments", + "description": "The level of permission to grant the access token for managing repository environments.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "issues", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "metadata", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "packages", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pages", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pull_requests", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_projects", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "secret_scanning_alerts", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "secrets", + "description": "The level of permission to grant the access token to manage repository secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "security_events", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "single_file", + "description": "The level of permission to grant the access token to manage just a single file.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "statuses", + "description": "The level of permission to grant the access token for commit statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "vulnerability_alerts", + "description": "The level of permission to grant the access token to manage Dependabot alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "workflows", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", + "enum": [ + "write" + ] + }, + { + "type": "string", + "name": "members", + "description": "The level of permission to grant the access token for organization teams and members.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_administration", + "description": "The level of permission to grant the access token to manage access to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_plan", + "description": "The level of permission to grant the access token for viewing an organization's plan.
", + "enum": [ + "read" + ] + }, + { + "type": "string", + "name": "organization_projects", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "organization_packages", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_secrets", + "description": "The level of permission to grant the access token to manage organization secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_self_hosted_runners", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_user_blocking", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "team_discussions", + "description": "The level of permission to grant the access token to manage team discussions and related comments.
", + "enum": [ + "read", + "write" + ] + } + ] + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", + "target": "octocat", + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + } + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [], + "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", + "token_last_eight": "Ae178B4a", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "Iv1.8a61f9b3a7aba766" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "expires_at": "2011-09-08T17:26:27Z", + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + }, + "repository_selection": "selected", + "single_file_name": ".github/workflow.yml", + "repositories_url": "https://api.github.com/user/repos", + "account": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "has_multiple_single_files": false, + "single_file_paths": [] + } + }, + "schema": { + "title": "Authorization", + "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + }, + "scopes": { + "description": "A list of scopes that this authorization is in.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": [ + "string", + "null" + ] + }, + "hashed_token": { + "type": [ + "string", + "null" + ] + }, + "app": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "client_id", + "name", + "url" + ] + }, + "note": { + "type": [ + "string", + "null" + ] + }, + "note_url": { + "type": [ + "string", + "null" + ], + "format": "uri" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "user": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "installation": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Scoped Installation", + "type": "object", + "properties": { + "permissions": { + "title": "App Permissions", + "type": "object", + "description": "The permissions granted to the user-to-server access token.", + "properties": { + "actions": { + "type": "string", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", + "enum": [ + "read", + "write" + ] + }, + "administration": { + "type": "string", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", + "enum": [ + "read", + "write" + ] + }, + "checks": { + "type": "string", + "description": "The level of permission to grant the access token for checks on code.", + "enum": [ + "read", + "write" + ] + }, + "contents": { + "type": "string", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", + "enum": [ + "read", + "write" + ] + }, + "deployments": { + "type": "string", + "description": "The level of permission to grant the access token for deployments and deployment statuses.", + "enum": [ + "read", + "write" + ] + }, + "environments": { + "type": "string", + "description": "The level of permission to grant the access token for managing repository environments.", + "enum": [ + "read", + "write" + ] + }, + "issues": { + "type": "string", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", + "enum": [ + "read", + "write" + ] + }, + "metadata": { + "type": "string", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", + "enum": [ + "read", + "write" + ] + }, + "packages": { + "type": "string", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "pages": { + "type": "string", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", + "enum": [ + "read", + "write" + ] + }, + "pull_requests": { + "type": "string", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", + "enum": [ + "read", + "write" + ] + }, + "repository_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", + "enum": [ + "read", + "write" + ] + }, + "repository_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", + "enum": [ + "read", + "write", + "admin" + ] + }, + "secret_scanning_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository secrets.", + "enum": [ + "read", + "write" + ] + }, + "security_events": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "single_file": { + "type": "string", + "description": "The level of permission to grant the access token to manage just a single file.", + "enum": [ + "read", + "write" + ] + }, + "statuses": { + "type": "string", + "description": "The level of permission to grant the access token for commit statuses.", + "enum": [ + "read", + "write" + ] + }, + "vulnerability_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to manage Dependabot alerts.", + "enum": [ + "read", + "write" + ] + }, + "workflows": { + "type": "string", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", + "enum": [ + "write" + ] + }, + "members": { + "type": "string", + "description": "The level of permission to grant the access token for organization teams and members.", + "enum": [ + "read", + "write" + ] + }, + "organization_administration": { + "type": "string", + "description": "The level of permission to grant the access token to manage access to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_plan": { + "type": "string", + "description": "The level of permission to grant the access token for viewing an organization's plan.", + "enum": [ + "read" + ] + }, + "organization_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", + "enum": [ + "read", + "write", + "admin" + ] + }, + "organization_packages": { + "type": "string", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "organization_secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization secrets.", + "enum": [ + "read", + "write" + ] + }, + "organization_self_hosted_runners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_user_blocking": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", + "enum": [ + "read", + "write" + ] + }, + "team_discussions": { + "type": "string", + "description": "The level of permission to grant the access token to manage team discussions and related comments.", + "enum": [ + "read", + "write" + ] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + } + }, + "repository_selection": { + "description": "Describe whether all repositories have been selected or there's a selection involved", + "type": "string", + "enum": [ + "all", + "selected" + ] + }, + "single_file_name": { + "type": [ + "string", + "null" + ], + "examples": [ + "config.yaml" + ] + }, + "has_multiple_single_files": { + "type": "boolean", + "examples": [ + true + ] + }, + "single_file_paths": { + "type": "array", + "items": { + "type": "string" + }, + "examples": [ + "config.yml", + ".github/issue_TEMPLATE.md" + ] + }, + "repositories_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "account": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + }, + "required": [ + "permissions", + "repository_selection", + "single_file_name", + "repositories_url", + "account" + ] + } + ] + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + }, + "required": [ + "app", + "id", + "note", + "note_url", + "scopes", + "token", + "hashed_token", + "token_last_eight", + "fingerprint", + "url", + "created_at", + "updated_at", + "expires_at" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Use a non-scoped user-to-server access token to create a repository scoped and/or permission scoped user-to-server access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the client_id and client_secret of the GitHub App as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" + }, + { + "httpStatusCode": "401", + "description": "Requires authentication
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, { "serverUrl": "http(s)://HOSTNAME/api/v3", "verb": "get", @@ -103922,1235 +105130,8 @@ "type": "string", "name": "access_token", "in": "body", - "description": "The access_token of the OAuth application.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "Response
", - "example": { - "id": 1, - "url": "https://api.github.com/authorizations/1", - "scopes": [ - "public_repo", - "user" - ], - "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", - "token_last_eight": "Ae178B4a", - "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", - "app": { - "url": "http://my-github-app.com", - "name": "my github app", - "client_id": "Iv1.8a61f9b3a7aba766" - }, - "note": "optional note", - "note_url": "http://optional/note/url", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "fingerprint": "jklmnop12345678", - "expires_at": "2011-09-08T17:26:27Z", - "user": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - } - }, - "schema": { - "title": "Authorization", - "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string", - "format": "uri" - }, - "scopes": { - "description": "A list of scopes that this authorization is in.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "token": { - "type": "string" - }, - "token_last_eight": { - "type": [ - "string", - "null" - ] - }, - "hashed_token": { - "type": [ - "string", - "null" - ] - }, - "app": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "client_id", - "name", - "url" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "note_url": { - "type": [ - "string", - "null" - ], - "format": "uri" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "fingerprint": { - "type": [ - "string", - "null" - ] - }, - "user": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "installation": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Scoped Installation", - "type": "object", - "properties": { - "permissions": { - "title": "App Permissions", - "type": "object", - "description": "The permissions granted to the user-to-server access token.", - "properties": { - "actions": { - "type": "string", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", - "enum": [ - "read", - "write" - ] - }, - "administration": { - "type": "string", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", - "enum": [ - "read", - "write" - ] - }, - "checks": { - "type": "string", - "description": "The level of permission to grant the access token for checks on code.", - "enum": [ - "read", - "write" - ] - }, - "contents": { - "type": "string", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", - "enum": [ - "read", - "write" - ] - }, - "deployments": { - "type": "string", - "description": "The level of permission to grant the access token for deployments and deployment statuses.", - "enum": [ - "read", - "write" - ] - }, - "environments": { - "type": "string", - "description": "The level of permission to grant the access token for managing repository environments.", - "enum": [ - "read", - "write" - ] - }, - "issues": { - "type": "string", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", - "enum": [ - "read", - "write" - ] - }, - "metadata": { - "type": "string", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", - "enum": [ - "read", - "write" - ] - }, - "packages": { - "type": "string", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "pages": { - "type": "string", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", - "enum": [ - "read", - "write" - ] - }, - "pull_requests": { - "type": "string", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", - "enum": [ - "read", - "write" - ] - }, - "repository_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", - "enum": [ - "read", - "write" - ] - }, - "repository_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", - "enum": [ - "read", - "write", - "admin" - ] - }, - "secret_scanning_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository secrets.", - "enum": [ - "read", - "write" - ] - }, - "security_events": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "single_file": { - "type": "string", - "description": "The level of permission to grant the access token to manage just a single file.", - "enum": [ - "read", - "write" - ] - }, - "statuses": { - "type": "string", - "description": "The level of permission to grant the access token for commit statuses.", - "enum": [ - "read", - "write" - ] - }, - "vulnerability_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to manage Dependabot alerts.", - "enum": [ - "read", - "write" - ] - }, - "workflows": { - "type": "string", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", - "enum": [ - "write" - ] - }, - "members": { - "type": "string", - "description": "The level of permission to grant the access token for organization teams and members.", - "enum": [ - "read", - "write" - ] - }, - "organization_administration": { - "type": "string", - "description": "The level of permission to grant the access token to manage access to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_plan": { - "type": "string", - "description": "The level of permission to grant the access token for viewing an organization's plan.", - "enum": [ - "read" - ] - }, - "organization_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", - "enum": [ - "read", - "write", - "admin" - ] - }, - "organization_packages": { - "type": "string", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "organization_secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization secrets.", - "enum": [ - "read", - "write" - ] - }, - "organization_self_hosted_runners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_user_blocking": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", - "enum": [ - "read", - "write" - ] - }, - "team_discussions": { - "type": "string", - "description": "The level of permission to grant the access token to manage team discussions and related comments.", - "enum": [ - "read", - "write" - ] - } - }, - "example": { - "contents": "read", - "issues": "read", - "deployments": "write", - "single_file": "read" - } - }, - "repository_selection": { - "description": "Describe whether all repositories have been selected or there's a selection involved", - "type": "string", - "enum": [ - "all", - "selected" - ] - }, - "single_file_name": { - "type": [ - "string", - "null" - ], - "examples": [ - "config.yaml" - ] - }, - "has_multiple_single_files": { - "type": "boolean", - "examples": [ - true - ] - }, - "single_file_paths": { - "type": "array", - "items": { - "type": "string" - }, - "examples": [ - "config.yml", - ".github/issue_TEMPLATE.md" - ] - }, - "repositories_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "account": { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - }, - "required": [ - "permissions", - "repository_selection", - "single_file_name", - "repositories_url", - "account" - ] - } - ] - }, - "expires_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - } - }, - "required": [ - "app", - "id", - "note", - "note_url", - "scopes", - "token", - "hashed_token", - "token_last_eight", - "fingerprint", - "url", - "created_at", - "updated_at", - "expires_at" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/applications/{client_id}/token", - "title": "Delete an app token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "204", - "description": "Response
" - } - } - ], - "previews": [], - "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/applications/{client_id}/token/scoped", - "title": "Create a scoped access token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", + "description": "The access_token of the OAuth application.
", "isRequired": true - }, - { - "type": "string", - "name": "target", - "in": "body", - "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", - "childParamsGroups": [ - { - "type": "string", - "name": "actions", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "administration", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "checks", - "description": "The level of permission to grant the access token for checks on code.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "contents", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "deployments", - "description": "The level of permission to grant the access token for deployments and deployment statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "environments", - "description": "The level of permission to grant the access token for managing repository environments.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "issues", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "metadata", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "packages", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pages", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pull_requests", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_projects", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "secret_scanning_alerts", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "secrets", - "description": "The level of permission to grant the access token to manage repository secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "security_events", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "single_file", - "description": "The level of permission to grant the access token to manage just a single file.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "statuses", - "description": "The level of permission to grant the access token for commit statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "vulnerability_alerts", - "description": "The level of permission to grant the access token to manage Dependabot alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "workflows", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", - "enum": [ - "write" - ] - }, - { - "type": "string", - "name": "members", - "description": "The level of permission to grant the access token for organization teams and members.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_administration", - "description": "The level of permission to grant the access token to manage access to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_plan", - "description": "The level of permission to grant the access token for viewing an organization's plan.
", - "enum": [ - "read" - ] - }, - { - "type": "string", - "name": "organization_projects", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "organization_packages", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_secrets", - "description": "The level of permission to grant the access token to manage organization secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_self_hosted_runners", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_user_blocking", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "team_discussions", - "description": "The level of permission to grant the access token to manage team discussions and related comments.
", - "enum": [ - "read", - "write" - ] - } - ] } ], "enabledForGitHubApps": false, @@ -105162,13 +105143,7 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", - "target": "octocat", - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - } + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" }, "parameters": { "client_id": "Iv1.8a61f9b3a7aba766" @@ -105181,7 +105156,10 @@ "example": { "id": 1, "url": "https://api.github.com/authorizations/1", - "scopes": [], + "scopes": [ + "public_repo", + "user" + ], "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", "token_last_eight": "Ae178B4a", "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", @@ -105215,38 +105193,6 @@ "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false - }, - "installation": { - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - }, - "repository_selection": "selected", - "single_file_name": ".github/workflow.yml", - "repositories_url": "https://api.github.com/user/repos", - "account": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "has_multiple_single_files": false, - "single_file_paths": [] } }, "schema": { @@ -106003,23 +105949,77 @@ } ], "previews": [], - "descriptionHTML": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" }, { - "httpStatusCode": "401", - "description": "Requires authentication
" - }, + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "delete", + "requestPath": "/applications/{client_id}/token", + "title": "Delete an app token", + "category": "apps", + "subcategory": "oauth-applications", + "parameters": [ { - "httpStatusCode": "403", - "description": "Forbidden
" - }, + "name": "client_id", + "in": "path", + "required": true, + "description": "The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ { - "httpStatusCode": "404", - "description": "Resource not found
" + "type": "string", + "name": "access_token", + "in": "body", + "description": "The OAuth access token used to authenticate to the GitHub API.
", + "isRequired": true + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "204", + "description": "Response
" + } + } + ], + "previews": [], + "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" }, { "httpStatusCode": "422", @@ -380853,7 +380853,7 @@ } ], "previews": [], - "descriptionHTML": "This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThe permission to grant the team on this repository. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
The permission to grant the team on this repository. We accept the following permissions to be set: pull, triage, push, maintain, admin and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "access_token", + "in": "body", + "description": "The access token used to authenticate to the GitHub API.
", + "isRequired": true + }, + { + "type": "string", + "name": "target", + "in": "body", + "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", + "childParamsGroups": [ + { + "type": "string", + "name": "actions", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "administration", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "checks", + "description": "The level of permission to grant the access token for checks on code.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "contents", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "deployments", + "description": "The level of permission to grant the access token for deployments and deployment statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "environments", + "description": "The level of permission to grant the access token for managing repository environments.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "issues", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "metadata", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "packages", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pages", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "pull_requests", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "repository_projects", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "secret_scanning_alerts", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "secrets", + "description": "The level of permission to grant the access token to manage repository secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "security_events", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "single_file", + "description": "The level of permission to grant the access token to manage just a single file.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "statuses", + "description": "The level of permission to grant the access token for commit statuses.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "vulnerability_alerts", + "description": "The level of permission to grant the access token to manage Dependabot alerts.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "workflows", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", + "enum": [ + "write" + ] + }, + { + "type": "string", + "name": "members", + "description": "The level of permission to grant the access token for organization teams and members.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_administration", + "description": "The level of permission to grant the access token to manage access to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_hooks", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_plan", + "description": "The level of permission to grant the access token for viewing an organization's plan.
", + "enum": [ + "read" + ] + }, + { + "type": "string", + "name": "organization_projects", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", + "enum": [ + "read", + "write", + "admin" + ] + }, + { + "type": "string", + "name": "organization_packages", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_secrets", + "description": "The level of permission to grant the access token to manage organization secrets.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_self_hosted_runners", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "organization_user_blocking", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", + "enum": [ + "read", + "write" + ] + }, + { + "type": "string", + "name": "team_discussions", + "description": "The level of permission to grant the access token to manage team discussions and related comments.
", + "enum": [ + "read", + "write" + ] + } + ] + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", + "target": "octocat", + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + } + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 1, + "url": "https://api.github.com/authorizations/1", + "scopes": [], + "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", + "token_last_eight": "Ae178B4a", + "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", + "app": { + "url": "http://my-github-app.com", + "name": "my github app", + "client_id": "Iv1.8a61f9b3a7aba766" + }, + "note": "optional note", + "note_url": "http://optional/note/url", + "updated_at": "2011-09-06T20:39:23Z", + "created_at": "2011-09-06T17:26:27Z", + "fingerprint": "jklmnop12345678", + "expires_at": "2011-09-08T17:26:27Z", + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "permissions": { + "metadata": "read", + "issues": "write", + "contents": "read" + }, + "repository_selection": "selected", + "single_file_name": ".github/workflow.yml", + "repositories_url": "https://api.github.com/user/repos", + "account": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "has_multiple_single_files": false, + "single_file_paths": [] + } + }, + "schema": { + "title": "Authorization", + "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "url": { + "type": "string", + "format": "uri" + }, + "scopes": { + "description": "A list of scopes that this authorization is in.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "token": { + "type": "string" + }, + "token_last_eight": { + "type": [ + "string", + "null" + ] + }, + "hashed_token": { + "type": [ + "string", + "null" + ] + }, + "app": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "client_id", + "name", + "url" + ] + }, + "note": { + "type": [ + "string", + "null" + ] + }, + "note_url": { + "type": [ + "string", + "null" + ], + "format": "uri" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "fingerprint": { + "type": [ + "string", + "null" + ] + }, + "user": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + ] + }, + "installation": { + "anyOf": [ + { + "type": "null" + }, + { + "title": "Scoped Installation", + "type": "object", + "properties": { + "permissions": { + "title": "App Permissions", + "type": "object", + "description": "The permissions granted to the user-to-server access token.", + "properties": { + "actions": { + "type": "string", + "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", + "enum": [ + "read", + "write" + ] + }, + "administration": { + "type": "string", + "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", + "enum": [ + "read", + "write" + ] + }, + "checks": { + "type": "string", + "description": "The level of permission to grant the access token for checks on code.", + "enum": [ + "read", + "write" + ] + }, + "contents": { + "type": "string", + "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", + "enum": [ + "read", + "write" + ] + }, + "deployments": { + "type": "string", + "description": "The level of permission to grant the access token for deployments and deployment statuses.", + "enum": [ + "read", + "write" + ] + }, + "environments": { + "type": "string", + "description": "The level of permission to grant the access token for managing repository environments.", + "enum": [ + "read", + "write" + ] + }, + "issues": { + "type": "string", + "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", + "enum": [ + "read", + "write" + ] + }, + "metadata": { + "type": "string", + "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", + "enum": [ + "read", + "write" + ] + }, + "packages": { + "type": "string", + "description": "The level of permission to grant the access token for packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "pages": { + "type": "string", + "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", + "enum": [ + "read", + "write" + ] + }, + "pull_requests": { + "type": "string", + "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", + "enum": [ + "read", + "write" + ] + }, + "repository_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", + "enum": [ + "read", + "write" + ] + }, + "repository_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", + "enum": [ + "read", + "write", + "admin" + ] + }, + "secret_scanning_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage repository secrets.", + "enum": [ + "read", + "write" + ] + }, + "security_events": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", + "enum": [ + "read", + "write" + ] + }, + "single_file": { + "type": "string", + "description": "The level of permission to grant the access token to manage just a single file.", + "enum": [ + "read", + "write" + ] + }, + "statuses": { + "type": "string", + "description": "The level of permission to grant the access token for commit statuses.", + "enum": [ + "read", + "write" + ] + }, + "vulnerability_alerts": { + "type": "string", + "description": "The level of permission to grant the access token to manage Dependabot alerts.", + "enum": [ + "read", + "write" + ] + }, + "workflows": { + "type": "string", + "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", + "enum": [ + "write" + ] + }, + "members": { + "type": "string", + "description": "The level of permission to grant the access token for organization teams and members.", + "enum": [ + "read", + "write" + ] + }, + "organization_administration": { + "type": "string", + "description": "The level of permission to grant the access token to manage access to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_hooks": { + "type": "string", + "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_plan": { + "type": "string", + "description": "The level of permission to grant the access token for viewing an organization's plan.", + "enum": [ + "read" + ] + }, + "organization_projects": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", + "enum": [ + "read", + "write", + "admin" + ] + }, + "organization_packages": { + "type": "string", + "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", + "enum": [ + "read", + "write" + ] + }, + "organization_secrets": { + "type": "string", + "description": "The level of permission to grant the access token to manage organization secrets.", + "enum": [ + "read", + "write" + ] + }, + "organization_self_hosted_runners": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", + "enum": [ + "read", + "write" + ] + }, + "organization_user_blocking": { + "type": "string", + "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", + "enum": [ + "read", + "write" + ] + }, + "team_discussions": { + "type": "string", + "description": "The level of permission to grant the access token to manage team discussions and related comments.", + "enum": [ + "read", + "write" + ] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + } + }, + "repository_selection": { + "description": "Describe whether all repositories have been selected or there's a selection involved", + "type": "string", + "enum": [ + "all", + "selected" + ] + }, + "single_file_name": { + "type": [ + "string", + "null" + ], + "examples": [ + "config.yaml" + ] + }, + "has_multiple_single_files": { + "type": "boolean", + "examples": [ + true + ] + }, + "single_file_paths": { + "type": "array", + "items": { + "type": "string" + }, + "examples": [ + "config.yml", + ".github/issue_TEMPLATE.md" + ] + }, + "repositories_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "account": { + "title": "Simple User", + "description": "A GitHub user.", + "type": "object", + "properties": { + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "login": { + "type": "string", + "examples": [ + "octocat" + ] + }, + "id": { + "type": "integer", + "examples": [ + 1 + ] + }, + "node_id": { + "type": "string", + "examples": [ + "MDQ6VXNlcjE=" + ] + }, + "avatar_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/images/error/octocat_happy.gif" + ] + }, + "gravatar_id": { + "type": [ + "string", + "null" + ], + "examples": [ + "41d064eb2195891e12d0413f63227ea7" + ] + }, + "url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat" + ] + }, + "html_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://github.com/octocat" + ] + }, + "followers_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/followers" + ] + }, + "following_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/following{/other_user}" + ] + }, + "gists_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/gists{/gist_id}" + ] + }, + "starred_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/starred{/owner}{/repo}" + ] + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/subscriptions" + ] + }, + "organizations_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/orgs" + ] + }, + "repos_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/repos" + ] + }, + "events_url": { + "type": "string", + "examples": [ + "https://api.github.com/users/octocat/events{/privacy}" + ] + }, + "received_events_url": { + "type": "string", + "format": "uri", + "examples": [ + "https://api.github.com/users/octocat/received_events" + ] + }, + "type": { + "type": "string", + "examples": [ + "User" + ] + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "examples": [ + "\"2020-07-09T00:17:55Z\"" + ] + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ] + } + }, + "required": [ + "permissions", + "repository_selection", + "single_file_name", + "repositories_url", + "account" + ] + } + ] + }, + "expires_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + }, + "required": [ + "app", + "id", + "note", + "note_url", + "scopes", + "token", + "hashed_token", + "token_last_eight", + "fingerprint", + "url", + "created_at", + "updated_at", + "expires_at" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Use a non-scoped user-to-server access token to create a repository scoped and/or permission scoped user-to-server access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the client_id and client_secret of the GitHub App as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" + }, + { + "httpStatusCode": "401", + "description": "Requires authentication
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, { "serverUrl": "http(s)://HOSTNAME/api/v3", "verb": "get", @@ -104895,1235 +106103,8 @@ "type": "string", "name": "access_token", "in": "body", - "description": "The access_token of the OAuth application.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "Response
", - "example": { - "id": 1, - "url": "https://api.github.com/authorizations/1", - "scopes": [ - "public_repo", - "user" - ], - "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", - "token_last_eight": "Ae178B4a", - "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", - "app": { - "url": "http://my-github-app.com", - "name": "my github app", - "client_id": "Iv1.8a61f9b3a7aba766" - }, - "note": "optional note", - "note_url": "http://optional/note/url", - "updated_at": "2011-09-06T20:39:23Z", - "created_at": "2011-09-06T17:26:27Z", - "fingerprint": "jklmnop12345678", - "expires_at": "2011-09-08T17:26:27Z", - "user": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - } - }, - "schema": { - "title": "Authorization", - "description": "The authorization for an OAuth app, GitHub App, or a Personal Access Token.", - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "url": { - "type": "string", - "format": "uri" - }, - "scopes": { - "description": "A list of scopes that this authorization is in.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "token": { - "type": "string" - }, - "token_last_eight": { - "type": [ - "string", - "null" - ] - }, - "hashed_token": { - "type": [ - "string", - "null" - ] - }, - "app": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "client_id", - "name", - "url" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "note_url": { - "type": [ - "string", - "null" - ], - "format": "uri" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "fingerprint": { - "type": [ - "string", - "null" - ] - }, - "user": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "installation": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Scoped Installation", - "type": "object", - "properties": { - "permissions": { - "title": "App Permissions", - "type": "object", - "description": "The permissions granted to the user-to-server access token.", - "properties": { - "actions": { - "type": "string", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.", - "enum": [ - "read", - "write" - ] - }, - "administration": { - "type": "string", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.", - "enum": [ - "read", - "write" - ] - }, - "checks": { - "type": "string", - "description": "The level of permission to grant the access token for checks on code.", - "enum": [ - "read", - "write" - ] - }, - "contents": { - "type": "string", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.", - "enum": [ - "read", - "write" - ] - }, - "deployments": { - "type": "string", - "description": "The level of permission to grant the access token for deployments and deployment statuses.", - "enum": [ - "read", - "write" - ] - }, - "environments": { - "type": "string", - "description": "The level of permission to grant the access token for managing repository environments.", - "enum": [ - "read", - "write" - ] - }, - "issues": { - "type": "string", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.", - "enum": [ - "read", - "write" - ] - }, - "metadata": { - "type": "string", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.", - "enum": [ - "read", - "write" - ] - }, - "packages": { - "type": "string", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "pages": { - "type": "string", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.", - "enum": [ - "read", - "write" - ] - }, - "pull_requests": { - "type": "string", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.", - "enum": [ - "read", - "write" - ] - }, - "repository_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.", - "enum": [ - "read", - "write" - ] - }, - "repository_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.", - "enum": [ - "read", - "write", - "admin" - ] - }, - "secret_scanning_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage repository secrets.", - "enum": [ - "read", - "write" - ] - }, - "security_events": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.", - "enum": [ - "read", - "write" - ] - }, - "single_file": { - "type": "string", - "description": "The level of permission to grant the access token to manage just a single file.", - "enum": [ - "read", - "write" - ] - }, - "statuses": { - "type": "string", - "description": "The level of permission to grant the access token for commit statuses.", - "enum": [ - "read", - "write" - ] - }, - "vulnerability_alerts": { - "type": "string", - "description": "The level of permission to grant the access token to manage Dependabot alerts.", - "enum": [ - "read", - "write" - ] - }, - "workflows": { - "type": "string", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.", - "enum": [ - "write" - ] - }, - "members": { - "type": "string", - "description": "The level of permission to grant the access token for organization teams and members.", - "enum": [ - "read", - "write" - ] - }, - "organization_administration": { - "type": "string", - "description": "The level of permission to grant the access token to manage access to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_hooks": { - "type": "string", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_plan": { - "type": "string", - "description": "The level of permission to grant the access token for viewing an organization's plan.", - "enum": [ - "read" - ] - }, - "organization_projects": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).", - "enum": [ - "read", - "write", - "admin" - ] - }, - "organization_packages": { - "type": "string", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.", - "enum": [ - "read", - "write" - ] - }, - "organization_secrets": { - "type": "string", - "description": "The level of permission to grant the access token to manage organization secrets.", - "enum": [ - "read", - "write" - ] - }, - "organization_self_hosted_runners": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.", - "enum": [ - "read", - "write" - ] - }, - "organization_user_blocking": { - "type": "string", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.", - "enum": [ - "read", - "write" - ] - }, - "team_discussions": { - "type": "string", - "description": "The level of permission to grant the access token to manage team discussions and related comments.", - "enum": [ - "read", - "write" - ] - } - }, - "example": { - "contents": "read", - "issues": "read", - "deployments": "write", - "single_file": "read" - } - }, - "repository_selection": { - "description": "Describe whether all repositories have been selected or there's a selection involved", - "type": "string", - "enum": [ - "all", - "selected" - ] - }, - "single_file_name": { - "type": [ - "string", - "null" - ], - "examples": [ - "config.yaml" - ] - }, - "has_multiple_single_files": { - "type": "boolean", - "examples": [ - true - ] - }, - "single_file_paths": { - "type": "array", - "items": { - "type": "string" - }, - "examples": [ - "config.yml", - ".github/issue_TEMPLATE.md" - ] - }, - "repositories_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "account": { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - }, - "required": [ - "permissions", - "repository_selection", - "single_file_name", - "repositories_url", - "account" - ] - } - ] - }, - "expires_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - } - }, - "required": [ - "app", - "id", - "note", - "note_url", - "scopes", - "token", - "hashed_token", - "token_last_eight", - "fingerprint", - "url", - "created_at", - "updated_at", - "expires_at" - ] - } - } - } - ], - "previews": [], - "descriptionHTML": "OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/applications/{client_id}/token", - "title": "Delete an app token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", - "isRequired": true - } - ], - "enabledForGitHubApps": false, - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" - }, - "parameters": { - "client_id": "Iv1.8a61f9b3a7aba766" - } - }, - "response": { - "statusCode": "204", - "description": "Response
" - } - } - ], - "previews": [], - "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" - }, - { - "httpStatusCode": "422", - "description": "Validation failed, or the endpoint has been spammed.
" - } - ] - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/applications/{client_id}/token/scoped", - "title": "Create a scoped access token", - "category": "apps", - "subcategory": "oauth-applications", - "parameters": [ - { - "name": "client_id", - "in": "path", - "required": true, - "description": "The client ID of the GitHub app.
", - "schema": { - "type": "string" - }, - "examples": { - "default": { - "value": "Iv1.8a61f9b3a7aba766" - } - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "access_token", - "in": "body", - "description": "The OAuth access token used to authenticate to the GitHub API.
", + "description": "The access_token of the OAuth application.
", "isRequired": true - }, - { - "type": "string", - "name": "target", - "in": "body", - "description": "The name of the user or organization to scope the user-to-server access token to. Required unless target_id is specified.
The ID of the user or organization to scope the user-to-server access token to. Required unless target is specified.
The list of repository names to scope the user-to-server access token to. repositories may not be specified if repository_ids is specified.
The list of repository IDs to scope the user-to-server access token to. repository_ids may not be specified if repositories is specified.
The permissions granted to the user-to-server access token.
", - "childParamsGroups": [ - { - "type": "string", - "name": "actions", - "description": "The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "administration", - "description": "The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "checks", - "description": "The level of permission to grant the access token for checks on code.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "contents", - "description": "The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "deployments", - "description": "The level of permission to grant the access token for deployments and deployment statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "environments", - "description": "The level of permission to grant the access token for managing repository environments.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "issues", - "description": "The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "metadata", - "description": "The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "packages", - "description": "The level of permission to grant the access token for packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pages", - "description": "The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "pull_requests", - "description": "The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for a repository.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "repository_projects", - "description": "The level of permission to grant the access token to manage repository projects, columns, and cards.
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "secret_scanning_alerts", - "description": "The level of permission to grant the access token to view and manage secret scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "secrets", - "description": "The level of permission to grant the access token to manage repository secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "security_events", - "description": "The level of permission to grant the access token to view and manage security events like code scanning alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "single_file", - "description": "The level of permission to grant the access token to manage just a single file.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "statuses", - "description": "The level of permission to grant the access token for commit statuses.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "vulnerability_alerts", - "description": "The level of permission to grant the access token to manage Dependabot alerts.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "workflows", - "description": "The level of permission to grant the access token to update GitHub Actions workflow files.
", - "enum": [ - "write" - ] - }, - { - "type": "string", - "name": "members", - "description": "The level of permission to grant the access token for organization teams and members.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_administration", - "description": "The level of permission to grant the access token to manage access to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_hooks", - "description": "The level of permission to grant the access token to manage the post-receive hooks for an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_plan", - "description": "The level of permission to grant the access token for viewing an organization's plan.
", - "enum": [ - "read" - ] - }, - { - "type": "string", - "name": "organization_projects", - "description": "The level of permission to grant the access token to manage organization projects and projects beta (where available).
", - "enum": [ - "read", - "write", - "admin" - ] - }, - { - "type": "string", - "name": "organization_packages", - "description": "The level of permission to grant the access token for organization packages published to GitHub Packages.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_secrets", - "description": "The level of permission to grant the access token to manage organization secrets.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_self_hosted_runners", - "description": "The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "organization_user_blocking", - "description": "The level of permission to grant the access token to view and manage users blocked by the organization.
", - "enum": [ - "read", - "write" - ] - }, - { - "type": "string", - "name": "team_discussions", - "description": "The level of permission to grant the access token to manage team discussions and related comments.
", - "enum": [ - "read", - "write" - ] - } - ] } ], "enabledForGitHubApps": false, @@ -106135,13 +106116,7 @@ "description": "Example", "acceptHeader": "application/vnd.github.v3+json", "bodyParameters": { - "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a", - "target": "octocat", - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - } + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" }, "parameters": { "client_id": "Iv1.8a61f9b3a7aba766" @@ -106154,7 +106129,10 @@ "example": { "id": 1, "url": "https://api.github.com/authorizations/1", - "scopes": [], + "scopes": [ + "public_repo", + "user" + ], "token": "ghu_16C7e42F292c6912E7710c838347Ae178B4a", "token_last_eight": "Ae178B4a", "hashed_token": "25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8", @@ -106188,38 +106166,6 @@ "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false - }, - "installation": { - "permissions": { - "metadata": "read", - "issues": "write", - "contents": "read" - }, - "repository_selection": "selected", - "single_file_name": ".github/workflow.yml", - "repositories_url": "https://api.github.com/user/repos", - "account": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "has_multiple_single_files": false, - "single_file_paths": [] } }, "schema": { @@ -106976,23 +106922,77 @@ } ], "previews": [], - "descriptionHTML": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OAuth applications 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. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password. Invalid tokens will return 404 NOT FOUND.
OK
" }, { - "httpStatusCode": "401", - "description": "Requires authentication
" - }, + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "delete", + "requestPath": "/applications/{client_id}/token", + "title": "Delete an app token", + "category": "apps", + "subcategory": "oauth-applications", + "parameters": [ { - "httpStatusCode": "403", - "description": "Forbidden
" - }, + "name": "client_id", + "in": "path", + "required": true, + "description": "The client ID of the GitHub app.
", + "schema": { + "type": "string" + }, + "examples": { + "default": { + "value": "Iv1.8a61f9b3a7aba766" + } + } + } + ], + "bodyParameters": [ { - "httpStatusCode": "404", - "description": "Resource not found
" + "type": "string", + "name": "access_token", + "in": "body", + "description": "The OAuth access token used to authenticate to the GitHub API.
", + "isRequired": true + } + ], + "enabledForGitHubApps": false, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a" + }, + "parameters": { + "client_id": "Iv1.8a61f9b3a7aba766" + } + }, + "response": { + "statusCode": "204", + "description": "Response
" + } + } + ], + "previews": [], + "descriptionHTML": "OAuth application owners can revoke a single token for an OAuth application. You must use Basic Authentication when accessing this endpoint, using the OAuth application's client_id and client_secret as the username and password.
No Content
" }, { "httpStatusCode": "422", @@ -384495,7 +384495,7 @@ } ], "previews": [], - "descriptionHTML": "This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThe permission to grant the team on this repository. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
The permission to grant the team on this repository. We accept the following permissions to be set: pull, triage, push, maintain, admin and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository.
This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub AE expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example:
application/zip
GitHub AE expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\n