Skip to main content

List repositories for the authenticated user

Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.

GET/user/repos
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Query Parameters
visibility string
optional

Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`.

affiliation string
optional

Comma-separated list of values. Can include: \* `owner`: Repositories that are owned by the authenticated user. \* `collaborator`: Repositories that the user has been added to as a collaborator. \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.

type string
optional

Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**.

sort string
optional

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

direction string
optional

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

per_page integer
optional

Results per page (max 100)

page integer
optional

Page number of the results to fetch.

since string<date-time>
optional

Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.

before string<date-time>
optional

Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.

Responses

application/json array[Repository object]

Response

items Repository object

A git repository

allow_forking boolean
optional

Whether to allow forking this repo

allow_merge_commit boolean
optional

Whether to allow merge commits for pull requests.

Example: true

allow_rebase_merge boolean
optional

Whether to allow rebase merges for pull requests.

Example: true

allow_squash_merge boolean
optional

Whether to allow squash merges for pull requests.

Example: true

archive_url string
required

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

archived boolean
required

Whether the repository is archived.

assignees_url string
required

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

blobs_url string
required

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

branches_url string
required

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

clone_url string
required

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

collaborators_url string
required

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

comments_url string
required

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

commits_url string
required

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

compare_url string
required

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

contents_url string
required

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

contributors_url string<uri>
required

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

created_at string<date-time>
requirednullable

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

default_branch string
required

The default branch of the repository.

Example: master

delete_branch_on_merge boolean
optional

Whether to delete head branches when pull requests are merged

Example: false

deployments_url string<uri>
required

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

description string
requirednullable

Example: This your first repo!

disabled boolean
required

Returns whether or not this repository disabled.

downloads_url string<uri>
required

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

events_url string<uri>
required

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

fork boolean
required
forks integer
required
forks_count integer
required

Example: 9

forks_url string<uri>
required

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

full_name string
required

Example: octocat/Hello-World

git_commits_url string
required

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

git_refs_url string
required

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

git_tags_url string
required

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

git_url string
required

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

has_downloads boolean
required

Whether downloads are enabled.

Example: true

has_issues boolean
required

Whether issues are enabled.

Example: true

has_pages boolean
required
has_projects boolean
required

Whether projects are enabled.

Example: true

has_wiki boolean
required

Whether the wiki is enabled.

Example: true

homepage string<uri>
requirednullable

Example: https://github.com

hooks_url string<uri>
required

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

html_url string<uri>
required

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

id integer
required

Unique identifier of the repository

Example: 42

is_template boolean
optional

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

Example: true

issue_comment_url string
required

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

issue_events_url string
required

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

issues_url string
required

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

keys_url string
required

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

labels_url string
required

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

language string
requirednullable
languages_url string<uri>
required

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

license License Simple object
requirednullable

License Simple

html_url string<uri>
optional
key string
required

Example: mit

name string
required

Example: MIT License

node_id string
required

Example: MDc6TGljZW5zZW1pdA==

spdx_id string
requirednullable

Example: MIT

url string<uri>
requirednullable

Example: https://api.github.com/licenses/mit

master_branch string
optional
merges_url string<uri>
required

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

milestones_url string
required

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

mirror_url string<uri>
requirednullable

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

name string
required

The name of the repository.

Example: Team Environment

network_count integer
optional
node_id string
required

Example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5

notifications_url string
required

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

open_issues integer
required
open_issues_count integer
required

Example: 0

organization Simple User object
optionalnullable

Simple User

avatar_url string<uri>
required

Example: https://github.com/images/error/octocat_happy.gif

email string
optionalnullable
events_url string
required

Example: https://api.github.com/users/octocat/events{/privacy}

followers_url string<uri>
required

Example: https://api.github.com/users/octocat/followers

following_url string
required

Example: https://api.github.com/users/octocat/following{/other_user}

gists_url string
required

Example: https://api.github.com/users/octocat/gists{/gist_id}

gravatar_id string
requirednullable

Example: 41d064eb2195891e12d0413f63227ea7

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

login string
required

Example: octocat

name string
optionalnullable
node_id string
required

Example: MDQ6VXNlcjE=

organizations_url string<uri>
required

Example: https://api.github.com/users/octocat/orgs

received_events_url string<uri>
required

Example: https://api.github.com/users/octocat/received_events

repos_url string<uri>
required

Example: https://api.github.com/users/octocat/repos

site_admin boolean
required
starred_at string
optional

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

starred_url string
required

Example: https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_url string<uri>
required

Example: https://api.github.com/users/octocat/subscriptions

type string
required

Example: User

url string<uri>
required

Example: https://api.github.com/users/octocat

owner Simple User object
required

Simple User

avatar_url string<uri>
required

Example: https://github.com/images/error/octocat_happy.gif

email string
optionalnullable
events_url string
required

Example: https://api.github.com/users/octocat/events{/privacy}

followers_url string<uri>
required

Example: https://api.github.com/users/octocat/followers

following_url string
required

Example: https://api.github.com/users/octocat/following{/other_user}

gists_url string
required

Example: https://api.github.com/users/octocat/gists{/gist_id}

gravatar_id string
requirednullable

Example: 41d064eb2195891e12d0413f63227ea7

html_url string<uri>
required

Example: https://github.com/octocat

id integer
required

Example: 1

login string
required

Example: octocat

name string
optionalnullable
node_id string
required

Example: MDQ6VXNlcjE=

organizations_url string<uri>
required

Example: https://api.github.com/users/octocat/orgs

received_events_url string<uri>
required

Example: https://api.github.com/users/octocat/received_events

repos_url string<uri>
required

Example: https://api.github.com/users/octocat/repos

site_admin boolean
required
starred_at string
optional

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

starred_url string
required

Example: https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_url string<uri>
required

Example: https://api.github.com/users/octocat/subscriptions

type string
required

Example: User

url string<uri>
required

Example: https://api.github.com/users/octocat

permissions object
optional
admin boolean
required
maintain boolean
optional
pull boolean
required
push boolean
required
triage boolean
optional
private boolean
required

Whether the repository is private or public.

pulls_url string
required

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

pushed_at string<date-time>
requirednullable

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

releases_url string
required

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

size integer
required

Example: 108

ssh_url string
required

Example: [email protected]:octocat/Hello-World.git

stargazers_count integer
required

Example: 80

stargazers_url string<uri>
required

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

starred_at string
optional

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

statuses_url string
required

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

subscribers_count integer
optional
subscribers_url string<uri>
required

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

subscription_url string<uri>
required

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

svn_url string<uri>
required

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

tags_url string<uri>
required

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

teams_url string<uri>
required

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

temp_clone_token string
optional
template_repository object
optionalnullable
allow_merge_commit boolean
optional
allow_rebase_merge boolean
optional
allow_squash_merge boolean
optional
allow_update_branch boolean
optional
archive_url string
optional
archived boolean
optional
assignees_url string
optional
blobs_url string
optional
branches_url string
optional
clone_url string
optional
collaborators_url string
optional
comments_url string
optional
commits_url string
optional
compare_url string
optional
contents_url string
optional
contributors_url string
optional
created_at string
optional
default_branch string
optional
delete_branch_on_merge boolean
optional
deployments_url string
optional
description string
optional
disabled boolean
optional
downloads_url string
optional
events_url string
optional
fork boolean
optional
forks_count integer
optional
forks_url string
optional
full_name string
optional
git_commits_url string
optional
git_refs_url string
optional
git_tags_url string
optional
git_url string
optional
has_downloads boolean
optional
has_issues boolean
optional
has_pages boolean
optional
has_projects boolean
optional
has_wiki boolean
optional
homepage string
optional
hooks_url string
optional
html_url string
optional
id integer
optional
is_template boolean
optional
issue_comment_url string
optional
issue_events_url string
optional
issues_url string
optional
keys_url string
optional
labels_url string
optional
language string
optional
languages_url string
optional
merges_url string
optional
milestones_url string
optional
mirror_url string
optional
name string
optional
network_count integer
optional
node_id string
optional
notifications_url string
optional
open_issues_count integer
optional
owner object
optional
avatar_url string
optional
events_url string
optional
followers_url string
optional
following_url string
optional
gists_url string
optional
gravatar_id string
optional
html_url string
optional
id integer
optional
login string
optional
node_id string
optional
organizations_url string
optional
received_events_url string
optional
repos_url string
optional
site_admin boolean
optional
starred_url string
optional
subscriptions_url string
optional
type string
optional
url string
optional
permissions object
optional
admin boolean
optional
maintain boolean
optional
pull boolean
optional
push boolean
optional
triage boolean
optional
private boolean
optional
pulls_url string
optional
pushed_at string
optional
releases_url string
optional
size integer
optional
ssh_url string
optional
stargazers_count integer
optional
stargazers_url string
optional
statuses_url string
optional
subscribers_count integer
optional
subscribers_url string
optional
subscription_url string
optional
svn_url string
optional
tags_url string
optional
teams_url string
optional
temp_clone_token string
optional
topics array[string]
optional
trees_url string
optional
updated_at string
optional
url string
optional
visibility string
optional
watchers_count integer
optional
topics array[string]
optional
trees_url string
required

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

updated_at string<date-time>
requirednullable

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

url string<uri>
required

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

visibility string
optional

The repository visibility: public, private, or internal.

watchers integer
required
watchers_count integer
required

Example: 80

Not modified

application/json Basic Error object

Requires authentication

documentation_url string
optional
message string
optional
status string
optional
url string
optional
application/json Basic Error object

Forbidden

documentation_url string
optional
message string
optional
status string
optional
url string
optional
application/json Validation Error object

Validation failed

documentation_url string
required
errors array[object]
optional
items object
code string
required
field string
optional
index integer
optional
message string
optional
resource string
optional
value
optional
message string
required