- meta
- enterprise-admin
- List global webhooksGET
- Create a global webhookPOST
- Delete a global webhookDELETE
- Get a global webhookGET
- Update a global webhookPATCH
- Ping a global webhookPOST
- List public keysGET
- Delete a public keyDELETE
- Update LDAP mapping for a teamPATCH
- Sync LDAP mapping for a teamPOST
- Update LDAP mapping for a userPATCH
- Sync LDAP mapping for a userPOST
- Create an organizationPOST
- Update an organization namePATCH
- List pre-receive environmentsGET
- Create a pre-receive environmentPOST
- Delete a pre-receive environmentDELETE
- Get a pre-receive environmentGET
- Update a pre-receive environmentPATCH
- Start a pre-receive environment downloadPOST
- Get the download status for a pre-receive environmentGET
- List pre-receive hooksGET
- Create a pre-receive hookPOST
- Delete a pre-receive hookDELETE
- Get a pre-receive hookGET
- Update a pre-receive hookPATCH
- List personal access tokensGET
- Delete a personal access tokenDELETE
- Create a userPOST
- Delete a userDELETE
- Update the username for a userPATCH
- Delete an impersonation OAuth tokenDELETE
- Create an impersonation OAuth tokenPOST
- Get license informationGET
- Get statisticsGET
- List self-hosted runner groups for an enterpriseGET
- Create a self-hosted runner group for an enterprisePOST
- Delete a self-hosted runner group from an enterpriseDELETE
- Get a self-hosted runner group for an enterpriseGET
- Update a self-hosted runner group for an enterprisePATCH
- List organization access to a self-hosted runner group in an enterpriseGET
- Set organization access for a self-hosted runner group in an enterprisePUT
- Remove organization access to a self-hosted runner group in an enterpriseDELETE
- Add organization access to a self-hosted runner group in an enterprisePUT
- List self-hosted runners in a group for an enterpriseGET
- Set self-hosted runners in a group for an enterprisePUT
- Remove a self-hosted runner from a group for an enterpriseDELETE
- Add a self-hosted runner to a group for an enterprisePUT
- List self-hosted runners for an enterpriseGET
- List runner applications for an enterpriseGET
- Create a registration token for an enterprisePOST
- Create a remove token for an enterprisePOST
- Delete a self-hosted runner from an enterpriseDELETE
- Get a self-hosted runner for an enterpriseGET
- List pre-receive hooks for an organizationGET
- Remove pre-receive hook enforcement for an organizationDELETE
- Get a pre-receive hook for an organizationGET
- Update pre-receive hook enforcement for an organizationPATCH
- List pre-receive hooks for a repositoryGET
- Remove pre-receive hook enforcement for a repositoryDELETE
- Get a pre-receive hook for a repositoryGET
- Update pre-receive hook enforcement for a repositoryPATCH
- Get the configuration statusGET
- Start a configuration processPOST
- Get the maintenance statusGET
- Enable or disable maintenance modePOST
- Get settingsGET
- Set settingsPUT
- Remove an authorized SSH keyDELETE
- Get all authorized SSH keysGET
- Add an authorized SSH keyPOST
- Create a GitHub licensePOST
- Upgrade a licensePOST
- Demote a site administratorDELETE
- Promote a user to be a site administratorPUT
- Unsuspend a userDELETE
- Suspend a userPUT
- apps
- Get the authenticated app
- Create a GitHub App from a manifest
- List installations for the authenticated app
- Delete an installation for the authenticated app
- Get an installation for the authenticated app
- Create an installation access token for an app
- Unsuspend an app installation
- Suspend an app installation
- Delete an app authorization
- Revoke a grant for an application
- Delete an app token
- Reset a token
- Check a token
- Revoke an authorization for an application
- Check an authorization
- Reset an authorization
- Get an app
- List repositories accessible to the app installation
- Revoke an installation access token
- Get an organization installation for the authenticated app
- Create a content attachment
- Get a repository installation for the authenticated app
- List app installations accessible to the user access token
- List repositories accessible to the user access token
- Remove a repository from an app installation
- Add a repository to an app installation
- Get a user installation for the authenticated app
- oauth-authorizations
- codes-of-conduct
- emojis
- activity
- List public events
- Get feeds
- List public events for a network of repositories
- List notifications for the authenticated user
- Mark notifications as read
- Get a thread
- Mark a thread as read
- Delete a thread subscription
- Get a thread subscription for the authenticated user
- Set a thread subscription
- List public organization events
- List repository events
- List repository notifications for the authenticated user
- Mark repository notifications as read
- List stargazers
- List watchers
- Delete a repository subscription
- Get a repository subscription
- Set a repository subscription
- List repositories starred by the authenticated user
- Unstar a repository for the authenticated user
- Check if a repository is starred by the authenticated user
- Star a repository for the authenticated user
- List repositories watched by the authenticated user
- List events for the authenticated user
- List organization events for the authenticated user
- List public events for a user
- List events received by the authenticated user
- List public events received by a user
- List repositories starred by a user
- List repositories watched by a user
- gists
- List gists for the authenticated user
- Create a gist
- List public gists
- List starred gists
- Delete a gist
- Get a gist
- Update a gist
- List gist comments
- Create a gist comment
- Delete a gist comment
- Get a gist comment
- Update a gist comment
- List gist commits
- List gist forks
- Fork a gist
- Unstar a gist
- Check if a gist is starred
- Star a gist
- Get a gist revision
- List gists for a user
- gitignore
- issues
- List issues assigned to the authenticated user
- List organization issues assigned to the authenticated user
- List assignees
- Check if a user can be assigned
- List repository issues
- Create an issue
- List issue comments for a repository
- Delete an issue comment
- Get an issue comment
- Update an issue comment
- List issue events for a repository
- Get an issue event
- Get an issue
- Update an issue
- Remove assignees from an issue
- Add assignees to an issue
- List issue comments
- Create an issue comment
- List issue events
- Remove all labels from an issue
- List labels for an issue
- Add labels to an issue
- Set labels for an issue
- Remove a label from an issue
- Unlock an issue
- Lock an issue
- List timeline events for an issue
- List labels for a repository
- Create a label
- Delete a label
- Get a label
- Update a label
- List milestones
- Create a milestone
- Delete a milestone
- Get a milestone
- Update a milestone
- List labels for issues in a milestone
- List user account issues assigned to the authenticated user
- licenses
- markdown
- orgs
- List organizations
- Get an organization
- Update an organization
- List organization webhooks
- Create an organization webhook
- Delete an organization webhook
- Get an organization webhook
- Update an organization webhook
- Ping an organization webhook
- List app installations for an organization
- List organization members
- Remove an organization member
- Check organization membership for a user
- Remove organization membership for a user
- Get organization membership for a user
- Set organization membership for a user
- List outside collaborators for an organization
- Remove outside collaborator from an organization
- Convert an organization member to outside collaborator
- List public organization members
- Remove public organization membership for the authenticated user
- Check public organization membership for a user
- Set public organization membership for the authenticated user
- List organization memberships for the authenticated user
- Get an organization membership for the authenticated user
- Update an organization membership for the authenticated user
- List organizations for the authenticated user
- List organizations for a user
- actions
- List self-hosted runner groups for an organization
- Create a self-hosted runner group for an organization
- Delete a self-hosted runner group from an organization
- Get a self-hosted runner group for an organization
- Update a self-hosted runner group for an organization
- List repository access to a self-hosted runner group in an organization
- Set repository access for a self-hosted runner group in an organization
- Remove repository access to a self-hosted runner group in an organization
- Add repository access to a self-hosted runner group in an organization
- List self-hosted runners in a group for an organization
- Set self-hosted runners in a group for an organization
- Remove a self-hosted runner from a group for an organization
- Add a self-hosted runner to a group for an organization
- List self-hosted runners for an organization
- List runner applications for an organization
- Create a registration token for an organization
- Create a remove token for an organization
- Delete a self-hosted runner from an organization
- Get a self-hosted runner for an organization
- List organization secrets
- Get an organization public key
- Delete an organization secret
- Get an organization secret
- Create or update an organization secret
- List selected repositories for an organization secret
- Set selected repositories for an organization secret
- Remove selected repository from an organization secret
- Add selected repository to an organization secret
- List artifacts for a repository
- Delete an artifact
- Get an artifact
- Download an artifact
- Get a job for a workflow run
- Download job logs for a workflow run
- List self-hosted runners for a repository
- List runner applications for a repository
- Create a registration token for a repository
- Create a remove token for a repository
- Delete a self-hosted runner from a repository
- Get a self-hosted runner for a repository
- List workflow runs for a repository
- Delete a workflow run
- Get a workflow run
- List workflow run artifacts
- Cancel a workflow run
- List jobs for a workflow run
- Delete workflow run logs
- Download workflow run logs
- Re-run a workflow
- List repository secrets
- Get a repository public key
- Delete a repository secret
- Get a repository secret
- Create or update a repository secret
- List repository workflows
- Get a workflow
- Create a workflow dispatch event
- List workflow runs
- projects
- List organization projects
- Create an organization project
- Delete a project card
- Get a project card
- Update an existing project card
- Move a project card
- Delete a project column
- Get a project column
- Update an existing project column
- List project cards
- Create a project card
- Move a project column
- Delete a project
- Get a project
- Update a project
- List project collaborators
- Remove user as a collaborator
- Add project collaborator
- Get project permission for a user
- List project columns
- Create a project column
- List repository projects
- Create a repository project
- Create a user project
- List user projects
- repos
- List organization repositories
- Create an organization repository
- Delete a repository
- Get a repository
- Update a repository
- List branches
- Get a branch
- Delete branch protection
- Get branch protection
- Update branch protection
- Delete admin branch protection
- Get admin branch protection
- Set admin branch protection
- Delete pull request review protection
- Get pull request review protection
- Update pull request review protection
- Delete commit signature protection
- Get commit signature protection
- Create commit signature protection
- Remove status check protection
- Get status checks protection
- Update status check protection
- Remove status check contexts
- Get all status check contexts
- Add status check contexts
- Set status check contexts
- Delete access restrictions
- Get access restrictions
- Remove app access restrictions
- Get apps with access to the protected branch
- Add app access restrictions
- Set app access restrictions
- Remove team access restrictions
- Get teams with access to the protected branch
- Add team access restrictions
- Set team access restrictions
- Remove user access restrictions
- Get users with access to the protected branch
- Add user access restrictions
- Set user access restrictions
- List repository collaborators
- Remove a repository collaborator
- Check if a user is a repository collaborator
- Add a repository collaborator
- Get repository permissions for a user
- List commit comments for a repository
- Delete a commit comment
- Get a commit comment
- Update a commit comment
- List commits
- List branches for HEAD commit
- List commit comments
- Create a commit comment
- List pull requests associated with a commit
- Get a commit
- Get the combined status for a specific reference
- List commit statuses for a reference
- Compare two commits
- Delete a file
- Get repository content
- Create or update file contents
- List repository contributors
- List deployments
- Create a deployment
- Delete a deployment
- Get a deployment
- List deployment statuses
- Create a deployment status
- Get a deployment status
- Create a repository dispatch event
- List forks
- Create a fork
- List repository webhooks
- Create a repository webhook
- Delete a repository webhook
- Get a repository webhook
- Update a repository webhook
- Ping a repository webhook
- Test the push repository webhook
- List repository invitations
- Delete a repository invitation
- Update a repository invitation
- List deploy keys
- Create a deploy key
- Delete a deploy key
- Get a deploy key
- List repository languages
- Merge a branch
- Delete a GitHub Enterprise Server Pages site
- Get a GitHub Enterprise Server Pages site
- Create a GitHub Enterprise Server Pages site
- Update information about a GitHub Enterprise Server Pages site
- List GitHub Enterprise Server Pages builds
- Request a GitHub Enterprise Server Pages build
- Get latest Pages build
- Get GitHub Enterprise Server Pages build
- Get a repository README
- Get a repository README for a directory
- List releases
- Create a release
- Delete a release asset
- Get a release asset
- Update a release asset
- Get the latest release
- Get a release by tag name
- Delete a release
- Get a release
- Update a release
- List release assets
- Upload a release asset
- Get the weekly commit activity
- Get the last year of commit activity
- Get all contributor commit activity
- Get the weekly commit count
- Get the hourly commit count for each day
- Create a commit status
- List repository tags
- Download a repository archive (tar)
- List repository teams
- Get all repository topics
- Replace all repository topics
- Transfer a repository
- Download a repository archive (zip)
- Create a repository using a template
- List public repositories
- List repositories for the authenticated user
- Create a repository for the authenticated user
- List repository invitations for the authenticated user
- Decline a repository invitation
- Accept a repository invitation
- List repositories for a user
- teams
- List teams
- Create a team
- Delete a team
- Get a team by name
- Update a team
- List discussions
- Create a discussion
- Delete a discussion
- Get a discussion
- Update a discussion
- List discussion comments
- Create a discussion comment
- Delete a discussion comment
- Get a discussion comment
- Update a discussion comment
- List team members
- Remove team membership for a user
- Get team membership for a user
- Add or update team membership for a user
- List team projects
- Remove a project from a team
- Check team permissions for a project
- Add or update team project permissions
- List team repositories
- Remove a repository from a team
- Check team permissions for a repository
- Add or update team repository permissions
- List child teams
- Delete a team (Legacy)
- Get a team (Legacy)
- Update a team (Legacy)
- List discussions (Legacy)
- Create a discussion (Legacy)
- Delete a discussion (Legacy)
- Get a discussion (Legacy)
- Update a discussion (Legacy)
- List discussion comments (Legacy)
- Create a discussion comment (Legacy)
- Delete a discussion comment (Legacy)
- Get a discussion comment (Legacy)
- Update a discussion comment (Legacy)
- List team members (Legacy)
- Remove team member (Legacy)
- Get team member (Legacy)
- Add team member (Legacy)
- Remove team membership for a user (Legacy)
- Get team membership for a user (Legacy)
- Add or update team membership for a user (Legacy)
- List team projects (Legacy)
- Remove a project from a team (Legacy)
- Check team permissions for a project (Legacy)
- Add or update team project permissions (Legacy)
- List team repositories (Legacy)
- Remove a repository from a team (Legacy)
- Check team permissions for a repository (Legacy)
- Add or update team repository permissions (Legacy)
- List child teams (Legacy)
- List teams for the authenticated user
- reactions
- List reactions for a team discussion comment
- Create reaction for a team discussion comment
- Delete team discussion comment reaction
- List reactions for a team discussion
- Create reaction for a team discussion
- Delete team discussion reaction
- Delete a reaction (Legacy)
- List reactions for a commit comment
- Create reaction for a commit comment
- Delete a commit comment reaction
- List reactions for an issue comment
- Create reaction for an issue comment
- Delete an issue comment reaction
- List reactions for an issue
- Create reaction for an issue
- Delete an issue reaction
- List reactions for a pull request review comment
- Create reaction for a pull request review comment
- Delete a pull request comment reaction
- List reactions for a team discussion comment (Legacy)
- Create reaction for a team discussion comment (Legacy)
- List reactions for a team discussion (Legacy)
- Create reaction for a team discussion (Legacy)
- rate-limit
- checks
- code-scanning
- git
- pulls
- List pull requests
- Create a pull request
- List review comments in a repository
- Delete a review comment for a pull request
- Get a review comment for a pull request
- Update a review comment for a pull request
- Get a pull request
- Update a pull request
- List review comments on a pull request
- Create a review comment for a pull request
- Create a reply for a review comment
- List commits on a pull request
- List pull requests files
- Check if a pull request has been merged
- Merge a pull request
- Remove requested reviewers from a pull request
- List requested reviewers for a pull request
- Request reviewers for a pull request
- List reviews for a pull request
- Create a review for a pull request
- Delete a pending review for a pull request
- Get a review for a pull request
- Update a review for a pull request
- List comments for a pull request review
- Dismiss a review for a pull request
- Submit a review for a pull request
- Update a pull request branch
- search
- users
- Get the authenticated user
- Update the authenticated user
- Delete an email address for the authenticated user
- List email addresses for the authenticated user
- Add an email address for the authenticated user
- List followers of the authenticated user
- List the people the authenticated user follows
- Unfollow a user
- Check if a person is followed by the authenticated user
- Follow a user
- List GPG keys for the authenticated user
- Create a GPG key for the authenticated user
- Delete a GPG key for the authenticated user
- Get a GPG key for the authenticated user
- List public SSH keys for the authenticated user
- Create a public SSH key for the authenticated user
- Delete a public SSH key for the authenticated user
- Get a public SSH key for the authenticated user
- List public email addresses for the authenticated user
- List users
- Get a user
- List followers of a user
- List the people a user follows
- Check if a user follows another user
- List GPG keys for a user
- Get contextual information for a user
- List public keys for a user
- billing
- interactions
- migrations
GitHub API Root
GET
/
meta
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.github.com/'
响应示例响应示例
{
"authorizations_url": "http://example.com/{endpoint}",
"code_search_url": "http://example.com/{endpoint}",
"commit_search_url": "http://example.com/{endpoint}",
"current_user_authorizations_html_url": "http://example.com/{endpoint}",
"current_user_repositories_url": "http://example.com/{endpoint}",
"current_user_url": "http://example.com/{endpoint}",
"emails_url": "http://example.com/{endpoint}",
"emojis_url": "http://example.com/{endpoint}",
"events_url": "http://example.com/{endpoint}",
"feeds_url": "http://example.com/{endpoint}",
"followers_url": "http://example.com/{endpoint}",
"following_url": "http://example.com/{endpoint}",
"gists_url": "http://example.com/{endpoint}",
"hub_url": "http://example.com/{endpoint}",
"issue_search_url": "http://example.com/{endpoint}",
"issues_url": "http://example.com/{endpoint}",
"keys_url": "http://example.com/{endpoint}",
"label_search_url": "http://example.com/{endpoint}",
"notifications_url": "http://example.com/{endpoint}",
"organization_repositories_url": "http://example.com/{endpoint}",
"organization_teams_url": "http://example.com/{endpoint}",
"organization_url": "http://example.com/{endpoint}",
"public_gists_url": "http://example.com/{endpoint}",
"rate_limit_url": "http://example.com/{endpoint}",
"repository_search_url": "http://example.com/{endpoint}",
"repository_url": "http://example.com/{endpoint}",
"starred_gists_url": "http://example.com/{endpoint}",
"starred_url": "http://example.com/{endpoint}",
"topic_search_url": "http://example.com/{endpoint}",
"user_organizations_url": "http://example.com/{endpoint}",
"user_repositories_url": "http://example.com/{endpoint}",
"user_search_url": "http://example.com/{endpoint}",
"user_url": "http://example.com/{endpoint}"
}
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
返回响应
🟢200Response
application/json
Body
authorizations_url
string <uri-template>
必需
code_search_url
string <uri-template>
必需
commit_search_url
string <uri-template>
必需
current_user_authorizations_html_url
string <uri-template>
必需
current_user_repositories_url
string <uri-template>
必需
current_user_url
string <uri-template>
必需
emails_url
string <uri-template>
必需
emojis_url
string <uri-template>
必需
events_url
string <uri-template>
必需
feeds_url
string <uri-template>
必需
followers_url
string <uri-template>
必需
following_url
string <uri-template>
必需
gists_url
string <uri-template>
必需
hub_url
string <uri-template>
必需
issue_search_url
string <uri-template>
必需
issues_url
string <uri-template>
必需
keys_url
string <uri-template>
必需
label_search_url
string <uri-template>
必需
notifications_url
string <uri-template>
必需
organization_repositories_url
string <uri-template>
必需
organization_teams_url
string <uri-template>
必需
organization_url
string <uri-template>
必需
public_gists_url
string <uri-template>
必需
rate_limit_url
string <uri-template>
必需
repository_search_url
string <uri-template>
必需
repository_url
string <uri-template>
必需
starred_gists_url
string <uri-template>
必需
starred_url
string <uri-template>
必需
topic_search_url
string <uri-template>
可选
user_organizations_url
string <uri-template>
必需
user_repositories_url
string <uri-template>
必需
user_search_url
string <uri-template>
必需
user_url
string <uri-template>
必需

【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通


修改于 2022-08-24 13:05:02