text stringlengths 12 91.7k | metadata dict |
|---|---|
When making authenticated requests to the API, applications often need to fetch the current user's repositories and organizations. In this guide, we'll explain how to reliably discover those resources.
To interact with the API, we'll be using Octokit.rb. You can find the complete source code for this project in the p... | {
"source": "github-docs/rest/guides/discovering-resources-for-a-user.md",
"title": "Discovering resources for a user"
} |
About encrypting secrets
Several REST API endpoints let you create secrets on . To use these endpoints, you must encrypt the secret value using libsodium. For more information, see the libsodium documentation.
In order to encrypt a secret, you need a Base64 encoded public key. You can get a public key from the REST API... | {
"source": "github-docs/rest/guides/encrypting-secrets-for-the-rest-api.md",
"title": "Encrypting secrets for the REST API"
} |
This section of the documentation is intended to get you up-and-running with
real-world API applications. We'll go over everything you need to know, from authentication to results manipulation to integrating results with other apps.
Every tutorial will include a project, and each project will be saved and documented i... | {
"source": "github-docs/rest/guides/index.md",
"title": "Guides"
} |
In this guide, we're going to use the API to fetch information about repositories
that we own, and the programming languages that make them up. Then, we'll
visualize that information in a couple of different ways using the D3.js library. To
interact with the API, we'll be using the excellent Ruby library, Octokit.
If ... | {
"source": "github-docs/rest/guides/rendering-data-as-graphs.md",
"title": "Rendering data as graphs"
} |
About Octokit.js
If you want to write a script using JavaScript to interact with 's REST API, recommends that you use the Octokit.js SDK. Octokit.js is maintained by . The SDK implements best practices and makes it easier for you to interact with the REST API via JavaScript. Octokit.js works with all modern browsers, ... | {
"source": "github-docs/rest/guides/scripting-with-the-rest-api-and-javascript.md",
"title": "Scripting with the REST API and JavaScript"
} |
About Octokit.rb
If you want to write a script using Ruby to interact with the REST API, recommends that you use the Octokit.rb SDK. Octokit.rb is maintained by . The SDK implements best practices and makes it easier for you to interact with the REST API via Ruby. Octokit.rb works with all modern browsers, Node.rb, a... | {
"source": "github-docs/rest/guides/scripting-with-the-rest-api-and-ruby.md",
"title": "Scripting with the REST API and Ruby"
} |
Overview
Rather than binary pass/fail build statuses, can report rich statuses, annotate lines of code with detailed information, and re-run tests. REST API to manage checks is available exclusively to your GitHub Apps.
For an example of how to use the REST API with a , see AUTOTITLE.
You can use statuses with protect... | {
"source": "github-docs/rest/guides/using-the-rest-api-to-interact-with-checks.md",
"title": "Using the REST API to interact with checks"
} |
Overview
This basically allows you to reimplement a lot of Git functionality with the REST API - by creating raw objects directly into the database and updating branch references you could technically do just about anything that Git can do without having Git installed.
The REST API will return a 409 Conflict if the Git... | {
"source": "github-docs/rest/guides/using-the-rest-api-to-interact-with-your-git-database.md",
"title": "Using the REST API to interact with your Git database"
} |
Git Internals chapter of
the Pro Git book.
As an example, if you wanted to commit a change to a file in your
repository, you would:
Get the current commit object
Retrieve the tree it points to
Retrieve the content of the blob object that tree has for that particular file path
Change the content somehow and post a n... | {
"source": "github-docs/rest/guides/using-the-rest-api-to-interact-with-your-git-database.md",
"title": "Using the REST API to interact with your Git database"
} |
For any Pull Request, provides three kinds of comment views:
comments on the Pull Request as a whole, comments on a specific line within the Pull Request,
and comments on a specific commit within the Pull Request.
Each of these types of comments goes through a different portion of the API.
In this guide, we'll explor... | {
"source": "github-docs/rest/guides/working-with-comments.md",
"title": "Working with comments"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/index.md",
"title": "GitHub REST API documentation"
} |
About interactions
Users interact with repositories by commenting, opening issues, and creating pull requests. You can use the REST API to allow people with owner or admin access to temporarily restrict interaction with public repositories to a certain type of user.
<!-- Content after this section is automatically gene... | {
"source": "github-docs/rest/interactions/index.md",
"title": "REST API endpoints for interactions"
} |
About organization interactions
Organization owners can temporarily restrict which type of user can comment, open issues, or create pull requests in the organization's public repositories. Here's more about the types of users:
in the organization.
in the organization.
in the organization.
Setting the interactio... | {
"source": "github-docs/rest/interactions/orgs.md",
"title": "REST API endpoints for organization interactions"
} |
About repository interactions
People with owner or admin access can use the REST API to temporarily restrict which type of user can comment, open issues, or create pull requests in a public repository. Here's more about the types of users:
in the repository.
in the repository.
in the repository.
If an interacti... | {
"source": "github-docs/rest/interactions/repos.md",
"title": "REST API endpoints for repository interactions"
} |
About user interactions
You can use the REST API to temporarily restrict which type of user can comment, open issues, or create pull requests on your public repositories. Here's more about the types of users:
from interacting with your repositories.
from interacting with your repositories.
from interacting with... | {
"source": "github-docs/rest/interactions/user.md",
"title": "REST API endpoints for user interactions"
} |
About issue and pull request assignees
You can use the REST API to view, add, and remove assignees on issues and pull requests.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/issues/assignees.md",
"title": "REST API endpoints for issue assignees"
} |
About issue and pull request comments
You can use the REST API to create and manage comments on issues and pull requests. To manage pull request review comments, see AUTOTITLE.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/issues/comments.md",
"title": "REST API endpoints for issue comments"
} |
About events
You can use the REST API to view different types of events triggered by activity in issues and pull requests. For more information about the specific events that you can receive, see AUTOTITLE. To view activity outside of issues and pull requests, you can use the Events endpoints.
<!-- Content after this ... | {
"source": "github-docs/rest/issues/events.md",
"title": "REST API endpoints for issue events"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/issues/index.md",
"title": "REST API endpoints for issues"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/issues/issue-dependencies.md",
"title": "REST API endpoints for issue dependencies"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/issues/issue-field-values.md",
"title": "REST API endpoints for issue field values"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/issues/issues.md",
"title": "REST API endpoints for issues"
} |
About labels
You can use the REST API to manage labels for a repository and add or remove labels to issues and pull requests.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/issues/labels.md",
"title": "REST API endpoints for labels"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/issues/milestones.md",
"title": "REST API endpoints for milestones"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/issues/sub-issues.md",
"title": "REST API endpoints for sub-issues"
} |
About timeline events
You can use the REST API to view different types of events triggered by timeline activity in issues and pull requests. For more information about the specific events that you can receive, see AUTOTITLE. To view activity outside of issues and pull requests, see AUTOTITLE.
You can use timeline even... | {
"source": "github-docs/rest/issues/timeline.md",
"title": "REST API endpoints for timeline events"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/licenses/index.md",
"title": "REST API endpoints for licenses"
} |
About licenses
uses the open source Ruby Gem Licensee to attempt to identify the license for a project. Licensee matches the contents of a project's LICENSE file (if it exists) against a short list of known licenses. As a result, the API does not take into account the licenses of project dependencies or other means of... | {
"source": "github-docs/rest/licenses/licenses.md",
"title": "REST API endpoints for licenses"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/markdown/index.md",
"title": "REST API endpoints for Markdown"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/markdown/markdown.md",
"title": "REST API endpoints for Markdown"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/meta/index.md",
"title": "REST API endpoints for meta data"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/meta/meta.md",
"title": "REST API endpoints for meta data"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/metrics/community.md",
"title": "REST API endpoints for community metrics"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/metrics/index.md",
"title": "REST API endpoints for metrics"
} |
About repository statistics
You can use the REST API to fetch the data that uses for visualizing different types of repository activity.
Best practices for caching
Computing repository statistics is an expensive operation, so we try to return cached
data whenever possible. If the data hasn't been cached when you quer... | {
"source": "github-docs/rest/metrics/statistics.md",
"title": "REST API endpoints for repository statistics"
} |
About repository traffic
You can use these endpoints to retrieve information provided in your repository graph, for repositories that you have write access to. For more information, see AUTOTITLE.
[!NOTE]
Repository traffic stats are not available through the REST API or UI on .
<!-- Content after this section is aut... | {
"source": "github-docs/rest/metrics/traffic.md",
"title": "REST API endpoints for repository traffic"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/migrations/index.md",
"title": "REST API endpoints for migrations"
} |
About organization migrations
These endpoints are only available to authenticated organization owners. For more information, see AUTOTITLE and AUTOTITLE.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/migrations/orgs.md",
"title": "REST API endpoints for organization migrations"
} |
About source imports
[!WARNING]
Due to very low levels of usage and available alternatives, the Source Imports API has been . For more details and alternatives, see the changelog.
A typical source import would start the import and then (optionally) update the authors and/or update the preference for using Git LFS if... | {
"source": "github-docs/rest/migrations/source-imports.md",
"title": "REST API endpoints for source imports"
} |
About user migrations
These endpoints are only available to authenticated account owners. For more information, see AUTOTITLE.
For a list of migration data that you can download, see Download a user migration archive.
To download an archive, you'll need to start a user migration first. Once the status of the migration... | {
"source": "github-docs/rest/migrations/users.md",
"title": "REST API endpoints for user migrations"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/oauth-authorizations/index.md",
"title": "REST API endpoints for OAuth app authorizations"
} |
About OAuth authorizations
You can use the REST API to manage the access have to your account. You can only access these endpoints via basic authentication using your username and password, not tokens.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/oauth-authorizations/oauth-authorizations.md",
"title": "REST API endpoints for OAuth app authorizations"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/api-insights.md",
"title": "REST API endpoints for API Insights"
} |
You can use these endpoints to upload storage and deployment records for software that your organization builds with . The records are displayed on the organization's . See AUTOTITLE.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/artifact-metadata.md",
"title": "REST API endpoints for artifact metadata"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/attestations.md",
"title": "REST API endpoints for artifact attestations"
} |
About blocking users
The token used to authenticate the call must have the admin:org scope in order to make any blocking calls for an organization. Otherwise, the response returns HTTP 404.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/blocking.md",
"title": "REST API endpoints for blocking users"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/bypass-requests.md",
"title": "REST API endpoints for organization push rule bypass requests"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/custom-properties-for-orgs.md",
"title": "REST API endpoints for an organization's custom property values"
} |
About custom properties
You can use the REST API to create and manage custom properties for an organization. You can use custom properties to add metadata to repositories in your organization. For more information, see AUTOTITLE.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/custom-properties.md",
"title": "REST API endpoints for custom properties"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/custom-roles.md",
"title": "REST API endpoints for custom repository roles"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/index.md",
"title": "REST API endpoints for organizations"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/issue-fields.md",
"title": "REST API endpoints for issue fields"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/issue-types.md",
"title": "REST API endpoints for issue types"
} |
[!NOTE] If you use , you add members to organizations directly, rather than sending invitations. The operations for managing organization invitations will not work in your enterprise. However, the operations for viewing or managing membership directly will work as expected.
<!-- Content after this section is automatica... | {
"source": "github-docs/rest/orgs/members.md",
"title": "REST API endpoints for organization members"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/network-configurations.md",
"title": "REST API endpoints for network configurations"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/organization-roles.md",
"title": "REST API endpoints for organization roles"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/orgs.md",
"title": "REST API endpoints for organizations"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/outside-collaborators.md",
"title": "REST API endpoints for outside collaborators"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/personal-access-tokens.md",
"title": "REST API endpoints for personal access tokens"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/rule-suites.md",
"title": "REST API endpoints for rule suites"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/rules.md",
"title": "REST API endpoints for rules"
} |
About security managers
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/security-managers.md",
"title": "REST API endpoints for security managers"
} |
About organization webhooks
Organization webhooks allow your server to receive HTTP POST payloads whenever certain events happen in an organization. For more information, see AUTOTITLE.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/orgs/webhooks.md",
"title": "REST API endpoints for organization webhooks"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/packages/index.md",
"title": "REST API endpoints for packages"
} |
About
supports a range of package managers for publishing packages. For more information, see AUTOTITLE.
After you publish a package, you can use the REST API to manage the package in your repositories and organizations. For more information, see AUTOTITLE.
To use the REST API to manage , you must authenticate using... | {
"source": "github-docs/rest/packages/packages.md",
"title": "REST API endpoints for packages"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/pages/index.md",
"title": "REST API endpoints for {% data variables.product.prodname_pages %}"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/pages/pages.md",
"title": "REST API endpoints for {% data variables.product.prodname_pages %}"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/private-registries/organization-configurations.md",
"title": "Organization configurations"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/projects/drafts.md",
"title": "REST API endpoints for draft Project items"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/projects/fields.md",
"title": "REST API endpoints for Project fields"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/projects/items.md",
"title": "REST API endpoints for Project items"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/projects/projects.md",
"title": "REST API endpoints for Projects"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/projects/views.md",
"title": "REST API endpoints for Project views"
} |
About pull request review comments
Pull request review comments are comments made on a portion of the unified diff during a pull request review. These are different from commit comments and issue comments in a pull request. For more information, see AUTOTITLE and AUTOTITLE.
<!-- Content after this section is automatica... | {
"source": "github-docs/rest/pulls/comments.md",
"title": "REST API endpoints for pull request review comments"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/pulls/index.md",
"title": "REST API endpoints for pull requests"
} |
About pull requests
You can list, view, edit, create, and merge pull requests using the REST API. For information about how to interact with comments on a pull request, see AUTOTITLE.
Pull requests are a type of issue. Any actions that are available in both pull requests and issues, like managing assignees, labels, and... | {
"source": "github-docs/rest/pulls/pulls.md",
"title": "REST API endpoints for pull requests"
} |
About review requests
Pull request authors and repository owners and collaborators can request a pull request review from anyone with write access to the repository. Each requested reviewer will receive a notification asking them to review the pull request.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/pulls/review-requests.md",
"title": "REST API endpoints for review requests"
} |
About pull request reviews
Pull Request Reviews are groups of pull request review comments on a pull request, grouped together with a state and optional body comment.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/pulls/reviews.md",
"title": "REST API endpoints for pull request reviews"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/pulls/stacks.md",
"title": "REST API endpoints for stacked pull requests"
} |
Introduction
This article describes how to quickly get started with the REST API using , curl, or JavaScript. For a more detailed guide, see AUTOTITLE.
Using in the command line
is the easiest way to use the REST API from the command line.
1. Make a request using the api subcommand, followed by the path. Use the ... | {
"source": "github-docs/rest/quickstart.md",
"title": "Quickstart for GitHub REST API"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/rate-limit/index.md",
"title": "REST API endpoints for rate limits"
} |
About rate limits
You can check your current rate limit status at any time. For more information about rate limit rules, see AUTOTITLE.
The REST API for searching items has a custom rate limit that is separate from the rate limit governing the other REST API endpoints. For more information, see AUTOTITLE. The GraphQL A... | {
"source": "github-docs/rest/rate-limit/rate-limit.md",
"title": "REST API endpoints for rate limits"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/reactions/index.md",
"title": "REST API endpoints for reactions"
} |
About reactions
You can create and manage reactions to comments, issues, pull requests, and discussions on . When creating a reaction, the allowed values for the content parameter are as follows (with the corresponding emoji for reference):
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/reactions/reactions.md",
"title": "REST API endpoints for reactions"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/releases/assets.md",
"title": "REST API endpoints for release assets"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/releases/index.md",
"title": "REST API endpoints for releases and release assets"
} |
[!NOTE]
These endpoints replace the endpoints to manage downloads. You can retrieve the download count and browser download URL from these endpoints.
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/releases/releases.md",
"title": "REST API endpoints for releases"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/attestations.md",
"title": "REST API endpoints for repository attestations"
} |
About repository autolinks
To help streamline your workflow, you can use the REST API to add autolinks to external resources like JIRA issues and Zendesk tickets. For more information, see AUTOTITLE.
require repository administration permissions with read or write access to use these endpoints.
<!-- Content after this... | {
"source": "github-docs/rest/repos/autolinks.md",
"title": "REST API endpoints for repository autolinks"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/bypass-requests.md",
"title": "REST API endpoints for repository push rule bypass requests"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/contents.md",
"title": "REST API endpoints for repository contents"
} |
About custom properties
You can use the REST API to view the custom properties that were assigned to a repository by the organization that owns the repository. For more information, see AUTOTITLE. For more information about the REST API endpoints to manage custom properties, see AUTOTITLE.
<!-- Content after this secti... | {
"source": "github-docs/rest/repos/custom-properties.md",
"title": "REST API endpoints for custom properties"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/forks.md",
"title": "REST API endpoints for forks"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/index.md",
"title": "REST API endpoints for repositories"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/issue-types.md",
"title": "REST API endpoints for issue types"
} |
About
You can use to store large files in a Git repository. The REST API allows you to enable or disable the feature for an individual repository. For more information about , see AUTOTITLE.
People with admin access to a repository can use these endpoints.
Usage of is subject to billing. For more information, see AU... | {
"source": "github-docs/rest/repos/lfs.md",
"title": "REST API endpoints for Git LFS"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/repos.md",
"title": "REST API endpoints for repositories"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/rule-suites.md",
"title": "REST API endpoints for rule suites"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/rules.md",
"title": "REST API endpoints for rules"
} |
<!-- Content after this section is automatically generated -- | {
"source": "github-docs/rest/repos/tags.md",
"title": "REST API endpoints for repository tags"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.