GitHub v3 REST API

Create reaction for a team discussion (Legacy)

DEPRECATED

Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Create reaction for a team discussion endpoint.

Create a reaction to a team discussion. OAuth access tokens require the write:discussion scope. A response with an HTTP 200 status means that you already added the reaction type to this team discussion.

post
{protocol}://{hostname}/api/v3/teams/{team_id}/discussions/{discussion_number}/reactions

Path Parameters

team_idintegerrequired
discussion_numberintegerrequired

Body

application/json
contentstringrequired

The reaction type to add to the team discussion.

Allowed values:+1-1laughconfusedhearthoorayrocketeyes

Response

201 application/json

Response

Reaction

Reactions to conversations provide a way to help people express their feelings more simply and effectively.

idintegerrequired

Example:1

node_idstringrequired

Example:MDg6UmVhY3Rpb24x

userobject | nullrequired

Simple User

Show Child Parameters
contentstringrequired

The reaction to use

Allowed values:+1-1laughconfusedhearthoorayrocketeyes

Example:heart

created_atstring(date-time)required

Example:2016-05-20T20:09:31Z

post/teams/{team_id}/discussions/{discussion_number}/reactions

Body

{ "content": "heart" }
 
201 application/json

List organization repositories

Lists repositories for the specified organization.

get
{protocol}://{hostname}/api/v3/orgs/{org}/repos

Query Parameters

typestring

Specifies the types of repositories you want returned. Can be one of all, public, private, forks, sources, member, internal. Note: For GitHub AE, can be one of all, private, forks, sources, member, internal. Default: all. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, type can also be internal. However, the internal value is not yet supported when a GitHub App calls this API with an installation access token.

Allowed values:allpublicprivateforkssourcesmemberinternal

sortstring

Can be one of created, updated, pushed, full_name.

Allowed values:createdupdatedpushedfull_name

Default:created

directionstring

Can be one of asc or desc. Default: when using full_name: asc, otherwise desc

Allowed values:ascdesc

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired

Response

200 application/json

Response

Minimal Repository

idintegerrequired

Example:1296269

node_idstringrequired

Example:MDEwOlJlcG9zaXRvcnkxMjk2MjY5

namestringrequired

Example:Hello-World

full_namestringrequired

Example:octocat/Hello-World

ownerobjectrequired

Simple User

Show Child Parameters
privatebooleanrequired
html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World

descriptionstring | nullrequired

Example:This your first repo!

forkbooleanrequired
urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World

archive_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}

assignees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/assignees{/user}

blobs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}

branches_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/branches{/branch}

collaborators_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}

comments_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/comments{/number}

commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/commits{/sha}

compare_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}

contents_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/contents/{+path}

contributors_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/contributors

deployments_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/deployments

downloads_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/downloads

events_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/events

forks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/forks

git_commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}

git_refs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}

git_tags_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}

git_urlstring
issue_comment_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}

issue_events_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/events{/number}

issues_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues{/number}

keys_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/keys{/key_id}

labels_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/labels{/name}

languages_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/languages

merges_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/merges

milestones_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/milestones{/number}

notifications_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}

pulls_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/pulls{/number}

releases_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/releases{/id}

ssh_urlstring
stargazers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/stargazers

statuses_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/statuses/{sha}

subscribers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscribers

subscription_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscription

tags_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/tags

teams_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/teams

trees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}

clone_urlstring
mirror_urlstring | null
hooks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/hooks

svn_urlstring
homepagestring | null
languagestring | null
forks_countinteger
stargazers_countinteger
watchers_countinteger
sizeinteger
default_branchstring
open_issues_countinteger
is_templateboolean
topicsarray[string]
has_issuesboolean
has_projectsboolean
has_wikiboolean
has_pagesboolean
has_downloadsboolean
archivedboolean
disabledboolean
visibilitystring
pushed_atstring | null(date-time)

Example:2011-01-26T19:06:43Z

created_atstring | null(date-time)

Example:2011-01-26T19:01:12Z

updated_atstring | null(date-time)

Example:2011-01-26T19:14:43Z

permissionsobject
Show Child Parameters
template_repositoryobject | null

A git repository

Show Child Parameters
temp_clone_tokenstring
delete_branch_on_mergeboolean
subscribers_countinteger
network_countinteger
code_of_conductobject

Code Of Conduct

Show Child Parameters
licenseobject | null
Show Child Parameters
forksinteger

Example:0

open_issuesinteger

Example:0

watchersinteger

Example:0

allow_forkingboolean
get/orgs/{org}/repos
 
200 application/json

Create an organization repository

Creates a new repository in the specified organization. The authenticated user must be a member of the organization.

OAuth scope requirements

When using OAuth, authorizations must include:

  • public_repo scope or repo scope to create a public repository. Note: For GitHub AE, use repo scope to create an internal repository.
  • repo scope to create a private repository
post
{protocol}://{hostname}/api/v3/orgs/{org}/repos

Path Parameters

orgstringrequired

Body

application/json
namestringrequired

The name of the repository.

descriptionstring

A short description of the repository.

homepagestring

A URL with more information about the repository.

privateboolean

Whether the repository is private.

Default:false

visibilitystring

Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see “Creating an internal repository” in the GitHub Help documentation.
The visibility parameter overrides the private parameter when you use both parameters with the nebula-preview preview header.

Allowed values:publicprivateinternal

has_issuesboolean

Either true to enable issues for this repository or false to disable them.

Default:true

has_projectsboolean

Either true to enable projects for this repository or false to disable them. Note: If you’re creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.

Default:true

has_wikiboolean

Either true to enable the wiki for this repository or false to disable it.

Default:true

is_templateboolean

Either true to make this repo available as a template repository or false to prevent it.

Default:false

team_idinteger

The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.

auto_initboolean

Pass true to create an initial commit with empty README.

Default:false

gitignore_templatestring

Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, “Haskell”.

license_templatestring

Choose an open source license template that best suits your needs, and then use the license keyword as the license_template string. For example, “mit” or “mpl-2.0”.

allow_squash_mergeboolean

Either true to allow squash-merging pull requests, or false to prevent squash-merging.

Default:true

allow_merge_commitboolean

Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.

Default:true

allow_rebase_mergeboolean

Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.

Default:true

delete_branch_on_mergeboolean

Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.

Default:false

Response

application/json

Response

Repository

A git repository

idintegerrequired

Unique identifier of the repository

Example:42

node_idstringrequired

Example:MDEwOlJlcG9zaXRvcnkxMjk2MjY5

namestringrequired

The name of the repository.

Example:Team Environment

full_namestringrequired

Example:octocat/Hello-World

licenseobject | nullrequired

License Simple

Show Child Parameters
organizationobject | null

Simple User

Show Child Parameters
forksintegerrequired
permissionsobject
Show Child Parameters
ownerobjectrequired

Simple User

Show Child Parameters
privatebooleanrequired

Whether the repository is private or public.

Default:false

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World

descriptionstring | nullrequired

Example:This your first repo!

forkbooleanrequired
urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World

archive_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}

assignees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/assignees{/user}

blobs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}

branches_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/branches{/branch}

collaborators_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}

comments_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/comments{/number}

commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/commits{/sha}

compare_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}

contents_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/contents/{+path}

contributors_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/contributors

deployments_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/deployments

downloads_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/downloads

events_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/events

forks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/forks

git_commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}

git_refs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}

git_tags_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}

git_urlstringrequired

Example:git:github.com/octocat/Hello-World.git

issue_comment_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}

issue_events_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/events{/number}

issues_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues{/number}

keys_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/keys{/key_id}

labels_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/labels{/name}

languages_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/languages

merges_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/merges

milestones_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/milestones{/number}

notifications_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}

pulls_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/pulls{/number}

releases_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/releases{/id}

ssh_urlstringrequired

Example:git@github.com:octocat/Hello-World.git

stargazers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/stargazers

statuses_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/statuses/{sha}

subscribers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscribers

subscription_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscription

tags_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/tags

teams_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/teams

trees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}

clone_urlstringrequired

Example:https://github.com/octocat/Hello-World.git

mirror_urlstring | null(uri)required

Example:git:git.example.com/octocat/Hello-World

hooks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/hooks

svn_urlstring(uri)required

Example:https://svn.github.com/octocat/Hello-World

homepagestring | null(uri)required

Example:https://github.com

languagestring | nullrequired
forks_countintegerrequired

Example:9

stargazers_countintegerrequired

Example:80

watchers_countintegerrequired

Example:80

sizeintegerrequired

Example:108

default_branchstringrequired

The default branch of the repository.

Example:master

open_issues_countintegerrequired

Example:0

is_templateboolean

Whether this repository acts as a template that can be used to generate new repositories.

Default:false

Example:true

topicsarray[string]
has_issuesbooleanrequired

Whether issues are enabled.

Default:true

Example:true

has_projectsbooleanrequired

Whether projects are enabled.

Default:true

Example:true

has_wikibooleanrequired

Whether the wiki is enabled.

Default:true

Example:true

has_pagesbooleanrequired
has_downloadsbooleanrequired

Whether downloads are enabled.

Default:true

Example:true

archivedbooleanrequired

Whether the repository is archived.

Default:false

disabledbooleanrequired

Returns whether or not this repository disabled.

visibilitystring

The repository visibility: public, private, or internal.

Default:public

pushed_atstring | null(date-time)required

Example:2011-01-26T19:06:43Z

created_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

updated_atstring | null(date-time)required

Example:2011-01-26T19:14:43Z

allow_rebase_mergeboolean

Whether to allow rebase merges for pull requests.

Default:true

Example:true

template_repositoryobject | null
Show Child Parameters
temp_clone_tokenstring
allow_squash_mergeboolean

Whether to allow squash merges for pull requests.

Default:true

Example:true

delete_branch_on_mergeboolean

Whether to delete head branches when pull requests are merged

Default:false

Example:false

allow_merge_commitboolean

Whether to allow merge commits for pull requests.

Default:true

Example:true

allow_forkingboolean

Whether to allow forking this repo

subscribers_countinteger
network_countinteger
open_issuesintegerrequired
watchersintegerrequired
master_branchstring
starred_atstring

Example:"2020-07-09T00:17:42Z"

post/orgs/{org}/repos

Body

{ "name": "Hello-World", "description": "This is your first repository", "homepage": "https://github.com", "private": false, "has_issues": true, "has_projects": true, "has_wiki": true }
 
application/json

Get a repository

When you pass the scarlet-witch-preview media type, requests to get a repository will also return the repository’s code of conduct if it can be detected from the repository’s code of conduct file.

The parent and source objects are present when the repository is a fork. parent is the repository this repository was forked from, source is the ultimate source for the network.

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}

Path Parameters

ownerstringrequired
repostringrequired

Response

application/json

Response

Full Repository

Full Repository

idintegerrequired

Example:1296269

node_idstringrequired

Example:MDEwOlJlcG9zaXRvcnkxMjk2MjY5

namestringrequired

Example:Hello-World

full_namestringrequired

Example:octocat/Hello-World

ownerobjectrequired

Simple User

Show Child Parameters
privatebooleanrequired
html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World

descriptionstring | nullrequired

Example:This your first repo!

forkbooleanrequired
urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World

archive_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}

assignees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/assignees{/user}

blobs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}

branches_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/branches{/branch}

collaborators_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}

comments_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/comments{/number}

commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/commits{/sha}

compare_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}

contents_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/contents/{+path}

contributors_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/contributors

deployments_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/deployments

downloads_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/downloads

events_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/events

forks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/forks

git_commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}

git_refs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}

git_tags_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}

git_urlstringrequired

Example:git:github.com/octocat/Hello-World.git

issue_comment_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}

issue_events_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/events{/number}

issues_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues{/number}

keys_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/keys{/key_id}

labels_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/labels{/name}

languages_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/languages

merges_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/merges

milestones_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/milestones{/number}

notifications_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}

pulls_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/pulls{/number}

releases_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/releases{/id}

ssh_urlstringrequired

Example:git@github.com:octocat/Hello-World.git

stargazers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/stargazers

statuses_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/statuses/{sha}

subscribers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscribers

subscription_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscription

tags_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/tags

teams_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/teams

trees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}

clone_urlstringrequired

Example:https://github.com/octocat/Hello-World.git

mirror_urlstring | null(uri)required

Example:git:git.example.com/octocat/Hello-World

hooks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/hooks

svn_urlstring(uri)required

Example:https://svn.github.com/octocat/Hello-World

homepagestring | null(uri)required

Example:https://github.com

languagestring | nullrequired
forks_countintegerrequired

Example:9

stargazers_countintegerrequired

Example:80

watchers_countintegerrequired

Example:80

sizeintegerrequired

Example:108

default_branchstringrequired

Example:master

open_issues_countintegerrequired

Example:0

is_templateboolean

Example:true

topicsarray[string]

Example:["octocat","atom","electron","API"]

has_issuesbooleanrequired

Example:true

has_projectsbooleanrequired

Example:true

has_wikibooleanrequired

Example:true

has_pagesbooleanrequired
has_downloadsbooleanrequired

Example:true

archivedbooleanrequired
disabledbooleanrequired

Returns whether or not this repository disabled.

visibilitystring

The repository visibility: public, private, or internal.

Example:public

pushed_atstring(date-time)required

Example:2011-01-26T19:06:43Z

created_atstring(date-time)required

Example:2011-01-26T19:01:12Z

updated_atstring(date-time)required

Example:2011-01-26T19:14:43Z

permissionsobject
Show Child Parameters
allow_rebase_mergeboolean

Example:true

template_repositoryobject | null

A git repository

Show Child Parameters
temp_clone_tokenstring | null
allow_squash_mergeboolean

Example:true

delete_branch_on_mergeboolean

Example:false

allow_merge_commitboolean

Example:true

allow_forkingboolean

Example:true

subscribers_countintegerrequired

Example:42

network_countintegerrequired

Example:0

licenseobject | nullrequired

License Simple

Show Child Parameters
organizationobject | null

Simple User

Show Child Parameters
parentobject

A git repository

Show Child Parameters
sourceobject

A git repository

Show Child Parameters
forksintegerrequired
master_branchstring
open_issuesintegerrequired
watchersintegerrequired
anonymous_access_enabledboolean

Whether anonymous git access is allowed.

Default:true

code_of_conductobject

Code of Conduct Simple

Show Child Parameters
get/repos/{owner}/{repo}
 
application/json

Update a repository

Note: To edit a repository’s topics, use the Replace all repository topics endpoint.

patch
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}

Path Parameters

ownerstringrequired
repostringrequired

Body

application/json
namestring

The name of the repository.

descriptionstring

A short description of the repository.

homepagestring

A URL with more information about the repository.

privateboolean

Either true to make the repository private or false to make it public. Default: false.
Note: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. Note: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.

Default:false

visibilitystring

Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal."

Allowed values:publicprivateinternal

has_issuesboolean

Either true to enable issues for this repository or false to disable them.

Default:true

has_projectsboolean

Either true to enable projects for this repository or false to disable them. Note: If you’re creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.

Default:true

has_wikiboolean

Either true to enable the wiki for this repository or false to disable it.

Default:true

is_templateboolean

Either true to make this repo available as a template repository or false to prevent it.

Default:false

default_branchstring

Updates the default branch for this repository.

allow_squash_mergeboolean

Either true to allow squash-merging pull requests, or false to prevent squash-merging.

Default:true

allow_merge_commitboolean

Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.

Default:true

allow_rebase_mergeboolean

Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.

Default:true

delete_branch_on_mergeboolean

Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.

Default:false

archivedboolean

true to archive this repository. Note: You cannot unarchive repositories through the API.

Default:false

allow_forkingboolean

Either true to allow private forks, or false to prevent private forks.

Default:false

Response

application/json

Response

Full Repository

Full Repository

idintegerrequired

Example:1296269

node_idstringrequired

Example:MDEwOlJlcG9zaXRvcnkxMjk2MjY5

namestringrequired

Example:Hello-World

full_namestringrequired

Example:octocat/Hello-World

ownerobjectrequired

Simple User

Show Child Parameters
privatebooleanrequired
html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World

descriptionstring | nullrequired

Example:This your first repo!

forkbooleanrequired
urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World

archive_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}

assignees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/assignees{/user}

blobs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}

branches_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/branches{/branch}

collaborators_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}

comments_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/comments{/number}

commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/commits{/sha}

compare_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}

contents_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/contents/{+path}

contributors_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/contributors

deployments_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/deployments

downloads_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/downloads

events_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/events

forks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/forks

git_commits_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}

git_refs_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}

git_tags_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}

git_urlstringrequired

Example:git:github.com/octocat/Hello-World.git

issue_comment_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}

issue_events_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues/events{/number}

issues_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/issues{/number}

keys_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/keys{/key_id}

labels_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/labels{/name}

languages_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/languages

merges_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/merges

milestones_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/milestones{/number}

notifications_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}

pulls_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/pulls{/number}

releases_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/releases{/id}

ssh_urlstringrequired

Example:git@github.com:octocat/Hello-World.git

stargazers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/stargazers

statuses_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/statuses/{sha}

subscribers_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscribers

subscription_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/subscription

tags_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/tags

teams_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/teams

trees_urlstringrequired

Example:http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}

clone_urlstringrequired

Example:https://github.com/octocat/Hello-World.git

mirror_urlstring | null(uri)required

Example:git:git.example.com/octocat/Hello-World

hooks_urlstring(uri)required

Example:http://api.github.com/repos/octocat/Hello-World/hooks

svn_urlstring(uri)required

Example:https://svn.github.com/octocat/Hello-World

homepagestring | null(uri)required

Example:https://github.com

languagestring | nullrequired
forks_countintegerrequired

Example:9

stargazers_countintegerrequired

Example:80

watchers_countintegerrequired

Example:80

sizeintegerrequired

Example:108

default_branchstringrequired

Example:master

open_issues_countintegerrequired

Example:0

is_templateboolean

Example:true

topicsarray[string]

Example:["octocat","atom","electron","API"]

has_issuesbooleanrequired

Example:true

has_projectsbooleanrequired

Example:true

has_wikibooleanrequired

Example:true

has_pagesbooleanrequired
has_downloadsbooleanrequired

Example:true

archivedbooleanrequired
disabledbooleanrequired

Returns whether or not this repository disabled.

visibilitystring

The repository visibility: public, private, or internal.

Example:public

pushed_atstring(date-time)required

Example:2011-01-26T19:06:43Z

created_atstring(date-time)required

Example:2011-01-26T19:01:12Z

updated_atstring(date-time)required

Example:2011-01-26T19:14:43Z

permissionsobject
Show Child Parameters
allow_rebase_mergeboolean

Example:true

template_repositoryobject | null

A git repository

Show Child Parameters
temp_clone_tokenstring | null
allow_squash_mergeboolean

Example:true

delete_branch_on_mergeboolean

Example:false

allow_merge_commitboolean

Example:true

allow_forkingboolean

Example:true

subscribers_countintegerrequired

Example:42

network_countintegerrequired

Example:0

licenseobject | nullrequired

License Simple

Show Child Parameters
organizationobject | null

Simple User

Show Child Parameters
parentobject

A git repository

Show Child Parameters
sourceobject

A git repository

Show Child Parameters
forksintegerrequired
master_branchstring
open_issuesintegerrequired
watchersintegerrequired
anonymous_access_enabledboolean

Whether anonymous git access is allowed.

Default:true

code_of_conductobject

Code of Conduct Simple

Show Child Parameters
patch/repos/{owner}/{repo}

Body

{ "name": "Hello-World", "description": "This is your first repository", "homepage": "https://github.com", "private": true, "has_issues": true, "has_projects": true, "has_wiki": true }
 
application/json