Replace all repository topics
Path Parameters
Body
application/json
Body
An array of topics to add to the repository. Pass one or more topics to replace the set of existing topics. Send an empty array ([]
) to clear all topics from the repository. Note: Topic names
cannot contain uppercase letters.
Response
application/json
Response
Response
Topic
A topic aggregates entities that are related to a subject.
Path Parameters
Body
Transfer a repository
A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original owner
, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see about repository transfers.
Path Parameters
Body
application/json
Body
The username or organization name the repository will be transferred to.
ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
Response
202 application/json
Response
Response
Minimal Repository
Minimal Repository
Example:1296269
Example:MDEwOlJlcG9zaXRvcnkxMjk2MjY5
Example:Hello-World
Example:octocat/Hello-World
Simple User
Show Child Parameters
Example:https://github.com/octocat/Hello-World
Example:This your first repo!
Example:https://api.github.com/repos/octocat/Hello-World
Example:http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}
Example:http://api.github.com/repos/octocat/Hello-World/assignees{/user}
Example:http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/branches{/branch}
Example:http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}
Example:http://api.github.com/repos/octocat/Hello-World/comments{/number}
Example:http://api.github.com/repos/octocat/Hello-World/commits{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}
Example:http://api.github.com/repos/octocat/Hello-World/contents/{+path}
Example:http://api.github.com/repos/octocat/Hello-World/contributors
Example:http://api.github.com/repos/octocat/Hello-World/deployments
Example:http://api.github.com/repos/octocat/Hello-World/downloads
Example:http://api.github.com/repos/octocat/Hello-World/events
Example:http://api.github.com/repos/octocat/Hello-World/forks
Example:http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}
Example:http://api.github.com/repos/octocat/Hello-World/issues/events{/number}
Example:http://api.github.com/repos/octocat/Hello-World/issues{/number}
Example:http://api.github.com/repos/octocat/Hello-World/keys{/key_id}
Example:http://api.github.com/repos/octocat/Hello-World/labels{/name}
Example:http://api.github.com/repos/octocat/Hello-World/languages
Example:http://api.github.com/repos/octocat/Hello-World/merges
Example:http://api.github.com/repos/octocat/Hello-World/milestones{/number}
Example:http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}
Example:http://api.github.com/repos/octocat/Hello-World/pulls{/number}
Example:http://api.github.com/repos/octocat/Hello-World/releases{/id}
Example:http://api.github.com/repos/octocat/Hello-World/stargazers
Example:http://api.github.com/repos/octocat/Hello-World/statuses/{sha}
Example:http://api.github.com/repos/octocat/Hello-World/subscribers
Example:http://api.github.com/repos/octocat/Hello-World/subscription
Example:http://api.github.com/repos/octocat/Hello-World/tags
Example:http://api.github.com/repos/octocat/Hello-World/teams
Example:http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/hooks
Example:2011-01-26T19:06:43Z
Example:2011-01-26T19:01:12Z
Example:2011-01-26T19:14:43Z
Show Child Parameters
A git repository
Show Child Parameters
Code Of Conduct
Show Child Parameters
Show Child Parameters
Example:0
Example:0
Example:0
Path Parameters
Body
Download a repository archive (zip)
Gets a redirect URL to download a zip archive for a repository. If you omit :ref
, the repository’s default branch (usually
master
) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
the Location
header to make a second GET
request.
Note: For private repositories, these links are temporary and expire after five minutes.
Path Parameters
Response
302
Response
Response
Path Parameters
Create a repository using a template
Creates a new repository using a repository template. Use the template_owner
and template_repo
route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository’s information using the Get a repository endpoint and check that the is_template
key is true
.
OAuth scope requirements
When using OAuth, authorizations must include:
public_repo
scope orrepo
scope to create a public repository. Note: For GitHub AE, userepo
scope to create an internal repository.repo
scope to create a private repository
Path Parameters
Body
application/json
Body
The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.
The name of the new repository.
A short description of the new repository.
Set to true
to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: false
.
Default:false
Either true
to create a new private repository or false
to create a new public one.
Default:false
Response
201 application/json
Response
Response
Repository
A git repository
Unique identifier of the repository
Example:42
Example:MDEwOlJlcG9zaXRvcnkxMjk2MjY5
The name of the repository.
Example:Team Environment
Example:octocat/Hello-World
License Simple
Show Child Parameters
Simple User
Show Child Parameters
Show Child Parameters
Simple User
Show Child Parameters
Whether the repository is private or public.
Default:false
Example:https://github.com/octocat/Hello-World
Example:This your first repo!
Example:https://api.github.com/repos/octocat/Hello-World
Example:http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}
Example:http://api.github.com/repos/octocat/Hello-World/assignees{/user}
Example:http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/branches{/branch}
Example:http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}
Example:http://api.github.com/repos/octocat/Hello-World/comments{/number}
Example:http://api.github.com/repos/octocat/Hello-World/commits{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}
Example:http://api.github.com/repos/octocat/Hello-World/contents/{+path}
Example:http://api.github.com/repos/octocat/Hello-World/contributors
Example:http://api.github.com/repos/octocat/Hello-World/deployments
Example:http://api.github.com/repos/octocat/Hello-World/downloads
Example:http://api.github.com/repos/octocat/Hello-World/events
Example:http://api.github.com/repos/octocat/Hello-World/forks
Example:http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}
Example:git:github.com/octocat/Hello-World.git
Example:http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}
Example:http://api.github.com/repos/octocat/Hello-World/issues/events{/number}
Example:http://api.github.com/repos/octocat/Hello-World/issues{/number}
Example:http://api.github.com/repos/octocat/Hello-World/keys{/key_id}
Example:http://api.github.com/repos/octocat/Hello-World/labels{/name}
Example:http://api.github.com/repos/octocat/Hello-World/languages
Example:http://api.github.com/repos/octocat/Hello-World/merges
Example:http://api.github.com/repos/octocat/Hello-World/milestones{/number}
Example:http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}
Example:http://api.github.com/repos/octocat/Hello-World/pulls{/number}
Example:http://api.github.com/repos/octocat/Hello-World/releases{/id}
Example:git@github.com:octocat/Hello-World.git
Example:http://api.github.com/repos/octocat/Hello-World/stargazers
Example:http://api.github.com/repos/octocat/Hello-World/statuses/{sha}
Example:http://api.github.com/repos/octocat/Hello-World/subscribers
Example:http://api.github.com/repos/octocat/Hello-World/subscription
Example:http://api.github.com/repos/octocat/Hello-World/tags
Example:http://api.github.com/repos/octocat/Hello-World/teams
Example:http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}
Example:https://github.com/octocat/Hello-World.git
Example:git:git.example.com/octocat/Hello-World
Example:http://api.github.com/repos/octocat/Hello-World/hooks
Example:https://svn.github.com/octocat/Hello-World
Example:https://github.com
Example:9
Example:80
Example:80
Example:108
The default branch of the repository.
Example:master
Example:0
Whether this repository acts as a template that can be used to generate new repositories.
Default:false
Example:true
Whether issues are enabled.
Default:true
Example:true
Whether projects are enabled.
Default:true
Example:true
Whether the wiki is enabled.
Default:true
Example:true
Whether downloads are enabled.
Default:true
Example:true
Whether the repository is archived.
Default:false
Returns whether or not this repository disabled.
The repository visibility: public, private, or internal.
Default:public
Example:2011-01-26T19:06:43Z
Example:2011-01-26T19:01:12Z
Example:2011-01-26T19:14:43Z
Whether to allow rebase merges for pull requests.
Default:true
Example:true
Show Child Parameters
Whether to allow squash merges for pull requests.
Default:true
Example:true
Whether to delete head branches when pull requests are merged
Default:false
Example:false
Whether to allow merge commits for pull requests.
Default:true
Example:true
Whether to allow forking this repo
Example:"2020-07-09T00:17:42Z"
Path Parameters
Body
List public repositories
Lists all public repositories in the order that they were created.
Note:
- For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.
- Pagination is powered exclusively by the
since
parameter. Use the Link header to get the URL for the next page of repositories.
Query Parameters
A repository ID. Only return repositories with an ID greater than this ID.
Specifies the types of repositories to return. Can be one of all
or public
. Default: public
. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise.
Allowed values:allpublic
Default:public
Example:all
Response
application/json
Response
Response
Minimal Repository
Example:1296269
Example:MDEwOlJlcG9zaXRvcnkxMjk2MjY5
Example:Hello-World
Example:octocat/Hello-World
Simple User
Show Child Parameters
Example:https://github.com/octocat/Hello-World
Example:This your first repo!
Example:https://api.github.com/repos/octocat/Hello-World
Example:http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}
Example:http://api.github.com/repos/octocat/Hello-World/assignees{/user}
Example:http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/branches{/branch}
Example:http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}
Example:http://api.github.com/repos/octocat/Hello-World/comments{/number}
Example:http://api.github.com/repos/octocat/Hello-World/commits{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}
Example:http://api.github.com/repos/octocat/Hello-World/contents/{+path}
Example:http://api.github.com/repos/octocat/Hello-World/contributors
Example:http://api.github.com/repos/octocat/Hello-World/deployments
Example:http://api.github.com/repos/octocat/Hello-World/downloads
Example:http://api.github.com/repos/octocat/Hello-World/events
Example:http://api.github.com/repos/octocat/Hello-World/forks
Example:http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}
Example:http://api.github.com/repos/octocat/Hello-World/issues/events{/number}
Example:http://api.github.com/repos/octocat/Hello-World/issues{/number}
Example:http://api.github.com/repos/octocat/Hello-World/keys{/key_id}
Example:http://api.github.com/repos/octocat/Hello-World/labels{/name}
Example:http://api.github.com/repos/octocat/Hello-World/languages
Example:http://api.github.com/repos/octocat/Hello-World/merges
Example:http://api.github.com/repos/octocat/Hello-World/milestones{/number}
Example:http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}
Example:http://api.github.com/repos/octocat/Hello-World/pulls{/number}
Example:http://api.github.com/repos/octocat/Hello-World/releases{/id}
Example:http://api.github.com/repos/octocat/Hello-World/stargazers
Example:http://api.github.com/repos/octocat/Hello-World/statuses/{sha}
Example:http://api.github.com/repos/octocat/Hello-World/subscribers
Example:http://api.github.com/repos/octocat/Hello-World/subscription
Example:http://api.github.com/repos/octocat/Hello-World/tags
Example:http://api.github.com/repos/octocat/Hello-World/teams
Example:http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}
Example:http://api.github.com/repos/octocat/Hello-World/hooks
Example:2011-01-26T19:06:43Z
Example:2011-01-26T19:01:12Z
Example:2011-01-26T19:14:43Z
Show Child Parameters
A git repository
Show Child Parameters
Code Of Conduct
Show Child Parameters
Show Child Parameters
Example:0
Example:0
Example:0