Manage packages for authenticated users and organizations.

Get list of conflicting packages during Docker migration for organization

get /orgs/{org}/docker/conflicts

Lists all packages that are in a specific organization, are readable by the requesting user, and that encountered a conflict during a Docker migration. To use this endpoint, you must authenticate using an access token with the read:packages scope.

org

string

required

The organization name. The name is not case sensitive.

Response

Examples Schema

Response

[
  {
    "id": 197,
    "name": "hello_docker",
    "package_type": "container",
    "owner": {
      "login": "github",
      "id": 9919,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/github",
      "html_url": "https://github.com/github",
      "followers_url": "https://api.github.com/users/github/followers",
      "following_url": "https://api.github.com/users/github/following{/other_user}",
      "gists_url": "https://api.github.com/users/github/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github/subscriptions",
      "organizations_url": "https://api.github.com/users/github/orgs",
      "repos_url": "https://api.github.com/users/github/repos",
      "events_url": "https://api.github.com/users/github/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "version_count": 1,
    "visibility": "private",
    "url": "https://api.github.com/orgs/github/packages/container/hello_docker",
    "created_at": "2020-05-19T22:19:11Z",
    "updated_at": "2020-05-19T22:19:11Z",
    "html_url": "https://github.com/orgs/github/packages/container/package/hello_docker"
  },
  {
    "id": 198,
    "name": "goodbye_docker",
    "package_type": "container",
    "owner": {
      "login": "github",
      "id": 9919,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/github",
      "html_url": "https://github.com/github",
      "followers_url": "https://api.github.com/users/github/followers",
      "following_url": "https://api.github.com/users/github/following{/other_user}",
      "gists_url": "https://api.github.com/users/github/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github/subscriptions",
      "organizations_url": "https://api.github.com/users/github/orgs",
      "repos_url": "https://api.github.com/users/github/repos",
      "events_url": "https://api.github.com/users/github/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "version_count": 2,
    "visibility": "private",
    "url": "https://api.github.com/orgs/github/packages/container/goodbye_docker",
    "created_at": "2020-05-20T22:19:11Z",
    "updated_at": "2020-05-20T22:19:11Z",
    "html_url": "https://github.com/orgs/github/packages/container/package/goodbye_docker"
  }
]

Forbidden

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Requires authentication

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

array[object (Package)]

Package

object (Package)

A software package

id

int

required

Unique identifier of the package.

Example
1

name

string

required

The name of the package.

Example
"super-linter"

package_type

string

required

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container
Example
"docker"

url

string

required

Example
"https://api.github.com/orgs/github/packages/container/super-linter"

html_url

string

required

Example
"https://github.com/orgs/github/packages/container/package/super-linter"

version_count

int

required

The number of versions of the package.

Example
1

visibility

string

required

Enum
  • private
  • public
Example
"private"

owner

object (owner) or null

A GitHub user.

name

string or null

email

string or null

login

string

required

Example
"octocat"

id

int

required

Example
1

node_id

string

required

Example
"MDQ6VXNlcjE="

avatar_url

string

uri

required

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

gravatar_id

string or null

required

Example
"41d064eb2195891e12d0413f63227ea7"

url

string

uri

required

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

html_url

string

uri

required

Example
"https://github.com/octocat"

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}"

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"

organizations_url

string

uri

required

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

repos_url

string

uri

required

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

events_url

string

required

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

received_events_url

string

uri

required

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

type

string

required

Example
"User"

site_admin

boolean

required

starred_at

string

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

repository

object (repository) or null

Minimal Repository

id

int

required

Example
1296269

node_id

string

required

Example
"MDEwOlJlcG9zaXRvcnkxMjk2MjY5"

name

string

required

Example
"Hello-World"

full_name

string

required

Example
"octocat/Hello-World"

owner

object (owner)

required

A GitHub user.

name

string or null

email

string or null

login

string

required

Example
"octocat"

id

int

required

Example
1

node_id

string

required

Example
"MDQ6VXNlcjE="

avatar_url

string

uri

required

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

gravatar_id

string or null

required

Example
"41d064eb2195891e12d0413f63227ea7"

url

string

uri

required

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

html_url

string

uri

required

Example
"https://github.com/octocat"

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}"

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"

organizations_url

string

uri

required

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

repos_url

string

uri

required

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

events_url

string

required

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

received_events_url

string

uri

required

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

type

string

required

Example
"User"

site_admin

boolean

required

starred_at

string

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

private

boolean

required

html_url

string

uri

required

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

description

string or null

required

Example
"This your first repo!"

fork

boolean

required

url

string

uri

required

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

archive_url

string

required

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

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}"

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"

deployments_url

string

uri

required

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

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"

forks_url

string

uri

required

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

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

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}"

languages_url

string

uri

required

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

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}"

notifications_url

string

required

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

pulls_url

string

required

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

releases_url

string

required

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

ssh_url

string

stargazers_url

string

uri

required

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

statuses_url

string

required

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

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"

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"

trees_url

string

required

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

clone_url

string

mirror_url

string or null

hooks_url

string

uri

required

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

svn_url

string

homepage

string or null

language

string or null

forks_count

int

stargazers_count

int

watchers_count

int

size

int

The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.

default_branch

string

open_issues_count

int

is_template

boolean

topics

array[string]

string

has_issues

boolean

has_projects

boolean

has_wiki

boolean

has_pages

boolean

has_downloads

boolean

has_discussions

boolean

archived

boolean

disabled

boolean

visibility

string

pushed_at

string or null

date-time

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

created_at

string or null

date-time

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

updated_at

string or null

date-time

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

permissions

object (permissions)

admin

boolean

maintain

boolean

push

boolean

triage

boolean

pull

boolean

role_name

string

Example
"admin"

temp_clone_token

string

delete_branch_on_merge

boolean

subscribers_count

int

network_count

int

code_of_conduct

object (code_of_conduct)

Code Of Conduct

key

string

required

Example
"contributor_covenant"

name

string

required

Example
"Contributor Covenant"

url

string

uri

required

Example
"https://api.github.com/codes_of_conduct/contributor_covenant"

body

string

Example
"# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"

html_url

string or null

uri

required

license

object (license) or null

key

string

name

string

spdx_id

string

url

string

node_id

string

forks

int

Example
0

open_issues

int

Example
0

watchers

int

Example
0

allow_forking

boolean

web_commit_signoff_required

boolean

Example
false

security_and_analysis

object (security_and_analysis) or null

advanced_security

object (advanced_security)

status

string

Enum
  • enabled
  • disabled

secret_scanning

object (secret_scanning)

status

string

Enum
  • enabled
  • disabled

secret_scanning_push_protection

object (secret_scanning_push_protection)

status

string

Enum
  • enabled
  • disabled

created_at

string

date-time

required

updated_at

string

date-time

required

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

List packages for an organization

get /orgs/{org}/packages

Lists packages in an organization readable by the user.

To use this endpoint, you must authenticate using an access token with the read:packages scope. If the package_type belongs to a registry that only supports repository-scoped permissions, your token must also include the repo scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "About permissions for GitHub Packages."

org

string

required

The organization name. The name is not case sensitive.

package_type

string

required

The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container

visibility

string

The selected visibility of the packages. This parameter is optional and only filters an existing result set.

The internal visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems internal is synonymous with private. For the list of GitHub Packages registries that support granular permissions, see "About permissions for GitHub Packages."

Enum
  • public
  • private
  • internal

page

int

Page number of the results to fetch.

Default
1

per_page

int

The number of results per page (max 100).

Default
30

Response

Examples Schema

Response

[
  {
    "id": 197,
    "name": "hello_docker",
    "package_type": "container",
    "owner": {
      "login": "github",
      "id": 9919,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/github",
      "html_url": "https://github.com/github",
      "followers_url": "https://api.github.com/users/github/followers",
      "following_url": "https://api.github.com/users/github/following{/other_user}",
      "gists_url": "https://api.github.com/users/github/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github/subscriptions",
      "organizations_url": "https://api.github.com/users/github/orgs",
      "repos_url": "https://api.github.com/users/github/repos",
      "events_url": "https://api.github.com/users/github/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "version_count": 1,
    "visibility": "private",
    "url": "https://api.github.com/orgs/github/packages/container/hello_docker",
    "created_at": "2020-05-19T22:19:11Z",
    "updated_at": "2020-05-19T22:19:11Z",
    "html_url": "https://github.com/orgs/github/packages/container/package/hello_docker"
  },
  {
    "id": 198,
    "name": "goodbye_docker",
    "package_type": "container",
    "owner": {
      "login": "github",
      "id": 9919,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/github",
      "html_url": "https://github.com/github",
      "followers_url": "https://api.github.com/users/github/followers",
      "following_url": "https://api.github.com/users/github/following{/other_user}",
      "gists_url": "https://api.github.com/users/github/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github/subscriptions",
      "organizations_url": "https://api.github.com/users/github/orgs",
      "repos_url": "https://api.github.com/users/github/repos",
      "events_url": "https://api.github.com/users/github/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "version_count": 2,
    "visibility": "private",
    "url": "https://api.github.com/orgs/github/packages/container/goodbye_docker",
    "created_at": "2020-05-20T22:19:11Z",
    "updated_at": "2020-05-20T22:19:11Z",
    "html_url": "https://github.com/orgs/github/packages/container/package/goodbye_docker"
  }
]

Forbidden

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Requires authentication

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

The value of per_page multiplied by page cannot be greater than 10000.

Empty response

array[object (Package)]

Package

object (Package)

A software package

id

int

required

Unique identifier of the package.

Example
1

name

string

required

The name of the package.

Example
"super-linter"

package_type

string

required

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container
Example
"docker"

url

string

required

Example
"https://api.github.com/orgs/github/packages/container/super-linter"

html_url

string

required

Example
"https://github.com/orgs/github/packages/container/package/super-linter"

version_count

int

required

The number of versions of the package.

Example
1

visibility

string

required

Enum
  • private
  • public
Example
"private"

owner

object (owner) or null

A GitHub user.

name

string or null

email

string or null

login

string

required

Example
"octocat"

id

int

required

Example
1

node_id

string

required

Example
"MDQ6VXNlcjE="

avatar_url

string

uri

required

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

gravatar_id

string or null

required

Example
"41d064eb2195891e12d0413f63227ea7"

url

string

uri

required

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

html_url

string

uri

required

Example
"https://github.com/octocat"

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}"

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"

organizations_url

string

uri

required

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

repos_url

string

uri

required

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

events_url

string

required

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

received_events_url

string

uri

required

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

type

string

required

Example
"User"

site_admin

boolean

required

starred_at

string

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

repository

object (repository) or null

Minimal Repository

id

int

required

Example
1296269

node_id

string

required

Example
"MDEwOlJlcG9zaXRvcnkxMjk2MjY5"

name

string

required

Example
"Hello-World"

full_name

string

required

Example
"octocat/Hello-World"

owner

object (owner)

required

A GitHub user.

name

string or null

email

string or null

login

string

required

Example
"octocat"

id

int

required

Example
1

node_id

string

required

Example
"MDQ6VXNlcjE="

avatar_url

string

uri

required

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

gravatar_id

string or null

required

Example
"41d064eb2195891e12d0413f63227ea7"

url

string

uri

required

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

html_url

string

uri

required

Example
"https://github.com/octocat"

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}"

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"

organizations_url

string

uri

required

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

repos_url

string

uri

required

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

events_url

string

required

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

received_events_url

string

uri

required

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

type

string

required

Example
"User"

site_admin

boolean

required

starred_at

string

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

private

boolean

required

html_url

string

uri

required

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

description

string or null

required

Example
"This your first repo!"

fork

boolean

required

url

string

uri

required

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

archive_url

string

required

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

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}"

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"

deployments_url

string

uri

required

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

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"

forks_url

string

uri

required

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

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

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}"

languages_url

string

uri

required

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

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}"

notifications_url

string

required

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

pulls_url

string

required

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

releases_url

string

required

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

ssh_url

string

stargazers_url

string

uri

required

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

statuses_url

string

required

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

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"

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"

trees_url

string

required

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

clone_url

string

mirror_url

string or null

hooks_url

string

uri

required

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

svn_url

string

homepage

string or null

language

string or null

forks_count

int

stargazers_count

int

watchers_count

int

size

int

The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.

default_branch

string

open_issues_count

int

is_template

boolean

topics

array[string]

string

has_issues

boolean

has_projects

boolean

has_wiki

boolean

has_pages

boolean

has_downloads

boolean

has_discussions

boolean

archived

boolean

disabled

boolean

visibility

string

pushed_at

string or null

date-time

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

created_at

string or null

date-time

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

updated_at

string or null

date-time

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

permissions

object (permissions)

admin

boolean

maintain

boolean

push

boolean

triage

boolean

pull

boolean

role_name

string

Example
"admin"

temp_clone_token

string

delete_branch_on_merge

boolean

subscribers_count

int

network_count

int

code_of_conduct

object (code_of_conduct)

Code Of Conduct

key

string

required

Example
"contributor_covenant"

name

string

required

Example
"Contributor Covenant"

url

string

uri

required

Example
"https://api.github.com/codes_of_conduct/contributor_covenant"

body

string

Example
"# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"

html_url

string or null

uri

required

license

object (license) or null

key

string

name

string

spdx_id

string

url

string

node_id

string

forks

int

Example
0

open_issues

int

Example
0

watchers

int

Example
0

allow_forking

boolean

web_commit_signoff_required

boolean

Example
false

security_and_analysis

object (security_and_analysis) or null

advanced_security

object (advanced_security)

status

string

Enum
  • enabled
  • disabled

secret_scanning

object (secret_scanning)

status

string

Enum
  • enabled
  • disabled

secret_scanning_push_protection

object (secret_scanning_push_protection)

status

string

Enum
  • enabled
  • disabled

created_at

string

date-time

required

updated_at

string

date-time

required

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

No schema

Get a package for an organization

get /orgs/{org}/packages/{package_type}/{package_name}

Gets a specific package in an organization.

To use this endpoint, you must authenticate using an access token with the read:packages scope. If the package_type belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the repo scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "About permissions for GitHub Packages."

package_type

string

required

The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container

package_name

string

required

The name of the package.

org

string

required

The organization name. The name is not case sensitive.

Response

Examples Schema

Response

{
  "id": 197,
  "name": "hello_docker",
  "package_type": "container",
  "owner": {
    "login": "github",
    "id": 9919,
    "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
    "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/github",
    "html_url": "https://github.com/github",
    "followers_url": "https://api.github.com/users/github/followers",
    "following_url": "https://api.github.com/users/github/following{/other_user}",
    "gists_url": "https://api.github.com/users/github/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/github/subscriptions",
    "organizations_url": "https://api.github.com/users/github/orgs",
    "repos_url": "https://api.github.com/users/github/repos",
    "events_url": "https://api.github.com/users/github/events{/privacy}",
    "received_events_url": "https://api.github.com/users/github/received_events",
    "type": "Organization",
    "site_admin": false
  },
  "version_count": 1,
  "visibility": "private",
  "url": "https://api.github.com/orgs/github/packages/container/hello_docker",
  "created_at": "2020-05-19T22:19:11Z",
  "updated_at": "2020-05-19T22:19:11Z",
  "html_url": "https://github.com/orgs/github/packages/container/package/hello_docker"
}

id

int

required

Unique identifier of the package.

Example
1

name

string

required

The name of the package.

Example
"super-linter"

package_type

string

required

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container
Example
"docker"

url

string

required

Example
"https://api.github.com/orgs/github/packages/container/super-linter"

html_url

string

required

Example
"https://github.com/orgs/github/packages/container/package/super-linter"

version_count

int

required

The number of versions of the package.

Example
1

visibility

string

required

Enum
  • private
  • public
Example
"private"

owner

object (owner) or null

A GitHub user.

name

string or null

email

string or null

login

string

required

Example
"octocat"

id

int

required

Example
1

node_id

string

required

Example
"MDQ6VXNlcjE="

avatar_url

string

uri

required

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

gravatar_id

string or null

required

Example
"41d064eb2195891e12d0413f63227ea7"

url

string

uri

required

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

html_url

string

uri

required

Example
"https://github.com/octocat"

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}"

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"

organizations_url

string

uri

required

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

repos_url

string

uri

required

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

events_url

string

required

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

received_events_url

string

uri

required

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

type

string

required

Example
"User"

site_admin

boolean

required

starred_at

string

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

repository

object (repository) or null

Minimal Repository

id

int

required

Example
1296269

node_id

string

required

Example
"MDEwOlJlcG9zaXRvcnkxMjk2MjY5"

name

string

required

Example
"Hello-World"

full_name

string

required

Example
"octocat/Hello-World"

owner

object (owner)

required

A GitHub user.

name

string or null

email

string or null

login

string

required

Example
"octocat"

id

int

required

Example
1

node_id

string

required

Example
"MDQ6VXNlcjE="

avatar_url

string

uri

required

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

gravatar_id

string or null

required

Example
"41d064eb2195891e12d0413f63227ea7"

url

string

uri

required

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

html_url

string

uri

required

Example
"https://github.com/octocat"

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}"

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"

organizations_url

string

uri

required

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

repos_url

string

uri

required

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

events_url

string

required

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

received_events_url

string

uri

required

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

type

string

required

Example
"User"

site_admin

boolean

required

starred_at

string

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

private

boolean

required

html_url

string

uri

required

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

description

string or null

required

Example
"This your first repo!"

fork

boolean

required

url

string

uri

required

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

archive_url

string

required

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

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}"

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"

deployments_url

string

uri

required

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

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"

forks_url

string

uri

required

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

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

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}"

languages_url

string

uri

required

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

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}"

notifications_url

string

required

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

pulls_url

string

required

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

releases_url

string

required

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

ssh_url

string

stargazers_url

string

uri

required

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

statuses_url

string

required

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

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"

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"

trees_url

string

required

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

clone_url

string

mirror_url

string or null

hooks_url

string

uri

required

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

svn_url

string

homepage

string or null

language

string or null

forks_count

int

stargazers_count

int

watchers_count

int

size

int

The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.

default_branch

string

open_issues_count

int

is_template

boolean

topics

array[string]

string

has_issues

boolean

has_projects

boolean

has_wiki

boolean

has_pages

boolean

has_downloads

boolean

has_discussions

boolean

archived

boolean

disabled

boolean

visibility

string

pushed_at

string or null

date-time

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

created_at

string or null

date-time

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

updated_at

string or null

date-time

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

permissions

object (permissions)

admin

boolean

maintain

boolean

push

boolean

triage

boolean

pull

boolean

role_name

string

Example
"admin"

temp_clone_token

string

delete_branch_on_merge

boolean

subscribers_count

int

network_count

int

code_of_conduct

object (code_of_conduct)

Code Of Conduct

key

string

required

Example
"contributor_covenant"

name

string

required

Example
"Contributor Covenant"

url

string

uri

required

Example
"https://api.github.com/codes_of_conduct/contributor_covenant"

body

string

Example
"# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"

html_url

string or null

uri

required

license

object (license) or null

key

string

name

string

spdx_id

string

url

string

node_id

string

forks

int

Example
0

open_issues

int

Example
0

watchers

int

Example
0

allow_forking

boolean

web_commit_signoff_required

boolean

Example
false

security_and_analysis

object (security_and_analysis) or null

advanced_security

object (advanced_security)

status

string

Enum
  • enabled
  • disabled

secret_scanning

object (secret_scanning)

status

string

Enum
  • enabled
  • disabled

secret_scanning_push_protection

object (secret_scanning_push_protection)

status

string

Enum
  • enabled
  • disabled

created_at

string

date-time

required

updated_at

string

date-time

required

Delete a package for an organization

delete /orgs/{org}/packages/{package_type}/{package_name}

Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the read:packages and delete:packages scopes. In addition:

  • If the package_type belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the repo scope. For the list of these registries, see "About permissions for GitHub Packages."
  • If the package_type belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see "About permissions for GitHub Packages."

package_type

string

required

The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container

package_name

string

required

The name of the package.

org

string

required

The organization name. The name is not case sensitive.

Response

Examples Schema

Response

Empty response

Resource not found

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Forbidden

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Requires authentication

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

No schema

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

Restore a package for an organization

post /orgs/{org}/packages/{package_type}/{package_name}/restore

Restores an entire package in an organization.

You can restore a deleted package under the following conditions:

  • The package was deleted within the last 30 days.
  • The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the read:packages and write:packages scopes. In addition:

  • If the package_type belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the repo scope. For the list of these registries, see "About permissions for GitHub Packages."
  • If the package_type belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see "About permissions for GitHub Packages."

package_type

string

required

The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container

package_name

string

required

The name of the package.

org

string

required

The organization name. The name is not case sensitive.

token

string

package token

Response

Examples Schema

Response

Empty response

Resource not found

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Forbidden

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Requires authentication

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

No schema

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

List package versions for a package owned by an organization

get /orgs/{org}/packages/{package_type}/{package_name}/versions

Lists package versions for a package owned by an organization.

If the package_type belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the repo scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "About permissions for GitHub Packages."

package_type

string

required

The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container

package_name

string

required

The name of the package.

org

string

required

The organization name. The name is not case sensitive.

page

int

Page number of the results to fetch.

Default
1

per_page

int

The number of results per page (max 100).

Default
30

state

string

The state of the package, either active or deleted.

Default
"active"
Enum
  • active
  • deleted

Response

Examples Schema

Response

[
  {
    "id": 245301,
    "name": "1.0.4",
    "url": "https://api.github.com/orgs/octo-org/packages/npm/hello-world-npm/versions/245301",
    "package_html_url": "https://github.com/octo-org/hello-world-npm/packages/43752",
    "created_at": "2019-11-05T22:49:04Z",
    "updated_at": "2019-11-05T22:49:04Z",
    "html_url": "https://github.com/octo-org/hello-world-npm/packages/43752?version=1.0.4",
    "metadata": {
      "package_type": "npm"
    }
  },
  {
    "id": 209672,
    "name": "1.0.3",
    "url": "https://api.github.com/orgs/octo-org/packages/npm/hello-world-npm/versions/209672",
    "package_html_url": "https://github.com/octo-org/hello-world-npm/packages/43752",
    "created_at": "2019-10-29T15:42:11Z",
    "updated_at": "2019-10-29T15:42:12Z",
    "html_url": "https://github.com/octo-org/hello-world-npm/packages/43752?version=1.0.3",
    "metadata": {
      "package_type": "npm"
    }
  }
]

Resource not found

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Forbidden

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Requires authentication

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

array[object (Package Version)]

Package Version

object (Package Version)

A version of a software package

id

int

required

Unique identifier of the package version.

Example
1

name

string

required

The name of the package version.

Example
"latest"

url

string

required

Example
"https://api.github.com/orgs/github/packages/container/super-linter/versions/786068"

package_html_url

string

required

Example
"https://github.com/orgs/github/packages/container/package/super-linter"

html_url

string

Example
"https://github.com/orgs/github/packages/container/super-linter/786068"

license

string

Example
"MIT"

description

string

created_at

string

date-time

required

Example
"2011-04-10T20:09:31Z"

updated_at

string

date-time

required

Example
"2014-03-03T18:58:10Z"

deleted_at

string

date-time

Example
"2014-03-03T18:58:10Z"

metadata

object (metadata)

package_type

string

required

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container
Example
"docker"

container

object (container)

tags

array[string]

required

string

docker

object (docker)

tag

array[string]

string

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

Get a package version for an organization

get /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}

Gets a specific package version in an organization.

You must authenticate using an access token with the read:packages scope. If the package_type belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the repo scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "About permissions for GitHub Packages."

package_type

string

required

The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container

package_name

string

required

The name of the package.

org

string

required

The organization name. The name is not case sensitive.

package_version_id

int

required

Unique identifier of the package version.

Response

Examples Schema

Response

{
  "id": 836,
  "name": "sha256:b3d3e366b55f9a54599220198b3db5da8f53592acbbb7dc7e4e9878762fc5344",
  "url": "https://api.github.com/orgs/github/packages/container/hello_docker/versions/836",
  "package_html_url": "https://github.com/orgs/github/packages/container/package/hello_docker",
  "created_at": "2020-05-19T22:19:11Z",
  "updated_at": "2020-05-19T22:19:11Z",
  "html_url": "https://github.com/orgs/github/packages/container/hello_docker/836",
  "metadata": {
    "package_type": "container",
    "container": {
      "tags": [
        "latest"
      ]
    }
  }
}

id

int

required

Unique identifier of the package version.

Example
1

name

string

required

The name of the package version.

Example
"latest"

url

string

required

Example
"https://api.github.com/orgs/github/packages/container/super-linter/versions/786068"

package_html_url

string

required

Example
"https://github.com/orgs/github/packages/container/package/super-linter"

html_url

string

Example
"https://github.com/orgs/github/packages/container/super-linter/786068"

license

string

Example
"MIT"

description

string

created_at

string

date-time

required

Example
"2011-04-10T20:09:31Z"

updated_at

string

date-time

required

Example
"2014-03-03T18:58:10Z"

deleted_at

string

date-time

Example
"2014-03-03T18:58:10Z"

metadata

object (metadata)

package_type

string

required

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container
Example
"docker"

container

object (container)

tags

array[string]

required

string

docker

object (docker)

tag

array[string]

string

Delete package version for an organization

delete /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}

Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the read:packages and delete:packages scopes. In addition:

  • If the package_type belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the repo scope. For the list of these registries, see "About permissions for GitHub Packages."
  • If the package_type belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see "About permissions for GitHub Packages."

package_type

string

required

The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container

package_name

string

required

The name of the package.

org

string

required

The organization name. The name is not case sensitive.

package_version_id

int

required

Unique identifier of the package version.

Response

Examples Schema

Response

Empty response

Resource not found

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Forbidden

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Requires authentication

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

No schema

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

Restore package version for an organization

post /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore

Restores a specific package version in an organization.

You can restore a deleted package under the following conditions:

  • The package was deleted within the last 30 days.
  • The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the read:packages and write:packages scopes. In addition:

  • If the package_type belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the repo scope. For the list of these registries, see "About permissions for GitHub Packages."
  • If the package_type belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see "About permissions for GitHub Packages."

package_type

string

required

The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container

package_name

string

required

The name of the package.

org

string

required

The organization name. The name is not case sensitive.

package_version_id

int

required

Unique identifier of the package version.

Response

Examples Schema

Response

Empty response

Resource not found

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Forbidden

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

Requires authentication

{
  "message": "string",
  "documentation_url": "string",
  "url": "string",
  "status": "string"
}

No schema

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

message

string

documentation_url

string

url

string

status

string

Get list of conflicting packages during Docker migration for authenticated-user

get /user/docker/conflicts

Lists all packages that are owned by the authenticated user within the user's namespace, and that encountered a conflict during a Docker migration. To use this endpoint, you must authenticate using an access token with the read:packages scope.

Response

Examples Schema

Response

[
  {
    "id": 197,
    "name": "hello_docker",
    "package_type": "container",
    "owner": {
      "login": "octocat",
      "id": 9919,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
      "avatar_url": "https://avatars.octocatusercontent.com/u/9919?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/github",
      "followers_url": "https://api.github.com/users/github/followers",
      "following_url": "https://api.github.com/users/github/following{/other_user}",
      "gists_url": "https://api.github.com/users/github/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github/subscriptions",
      "organizations_url": "https://api.github.com/users/github/orgs",
      "repos_url": "https://api.github.com/users/github/repos",
      "events_url": "https://api.github.com/users/github/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github/received_events",
      "type": "User",
      "site_admin": false
    },
    "version_count": 1,
    "visibility": "private",
    "url": "https://api.github.com/orgs/github/packages/container/hello_docker",
    "created_at": "2020-05-19T22:19:11Z",
    "updated_at": "2020-05-19T22:19:11Z",
    "html_url": "https://github.com/orgs/github/packages/container/package/hello_docker"
  },
  {
    "id": 198,
    "name": "goodbye_docker",
    "package_type": "container",
    "owner": {
      "login": "github",
      "id": 9919,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/github",
      "followers_url": "https://api.github.com/users/github/followers",
      "following_url": "https://api.github.com/users/github/following{/other_user}",
      "gists_url": "https://api.github.com/users/github/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github/subscriptions",
      "organizations_url": "https://api.github.com/users/github/orgs",
      "repos_url": "https://api.github.com/users/github/repos",
      "events_url": "https://api.github.com/users/github/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github/received_events",
      "type": "User",
      "site_admin": false
    },
    "version_count": 2,
    "visibility": "private",
    "url": "https://api.github.com/user/octocat/packages/container/goodbye_docker",
    "created_at": "2020-05-20T22:19:11Z",
    "updated_at": "2020-05-20T22:19:11Z",
    "html_url": "https://github.com/user/octocat/packages/container/package/goodbye_docker"
  }
]

array[object (Package)]

Package

object (Package)

A software package

id

int

required

Unique identifier of the package.

Example
1

name

string

required

The name of the package.

Example
"super-linter"

package_type

string

required

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container
Example
"docker"

url

string

required

Example
"https://api.github.com/orgs/github/packages/container/super-linter"

html_url

string

required

Example
"https://github.com/orgs/github/packages/container/package/super-linter"

version_count

int

required

The number of versions of the package.

Example
1

visibility

string

required

Enum
  • private
  • public
Example
"private"

owner

object (owner) or null

A GitHub user.

name

string or null

email

string or null

login

string

required

Example
"octocat"

id

int

required

Example
1

node_id

string

required

Example
"MDQ6VXNlcjE="

avatar_url

string

uri

required

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

gravatar_id

string or null

required

Example
"41d064eb2195891e12d0413f63227ea7"

url

string

uri

required

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

html_url

string

uri

required

Example
"https://github.com/octocat"

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}"

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"

organizations_url

string

uri

required

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

repos_url

string

uri

required

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

events_url

string

required

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

received_events_url

string

uri

required

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

type

string

required

Example
"User"

site_admin

boolean

required

starred_at

string

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

repository

object (repository) or null

Minimal Repository

id

int

required

Example
1296269

node_id

string

required

Example
"MDEwOlJlcG9zaXRvcnkxMjk2MjY5"

name

string

required

Example
"Hello-World"

full_name

string

required

Example
"octocat/Hello-World"

owner

object (owner)

required

A GitHub user.

name

string or null

email

string or null

login

string

required

Example
"octocat"

id

int

required

Example
1

node_id

string

required

Example
"MDQ6VXNlcjE="

avatar_url

string

uri

required

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

gravatar_id

string or null

required

Example
"41d064eb2195891e12d0413f63227ea7"

url

string

uri

required

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

html_url

string

uri

required

Example
"https://github.com/octocat"

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}"

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"

organizations_url

string

uri

required

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

repos_url

string

uri

required

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

events_url

string

required

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

received_events_url

string

uri

required

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

type

string

required

Example
"User"

site_admin

boolean

required

starred_at

string

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

private

boolean

required

html_url

string

uri

required

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

description

string or null

required

Example
"This your first repo!"

fork

boolean

required

url

string

uri

required

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

archive_url

string

required

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

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}"

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"

deployments_url

string

uri

required

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

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"

forks_url

string

uri

required

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

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

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}"

languages_url

string

uri

required

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

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}"

notifications_url

string

required

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

pulls_url

string

required

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

releases_url

string

required

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

ssh_url

string

stargazers_url

string

uri

required

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

statuses_url

string

required

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

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"

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"

trees_url

string

required

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

clone_url

string

mirror_url

string or null

hooks_url

string

uri

required

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

svn_url

string

homepage

string or null

language

string or null

forks_count

int

stargazers_count

int

watchers_count

int

size

int

The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.

default_branch

string

open_issues_count

int

is_template

boolean

topics

array[string]

string

has_issues

boolean

has_projects

boolean

has_wiki

boolean

has_pages

boolean

has_downloads

boolean

has_discussions

boolean

archived

boolean

disabled

boolean

visibility

string

pushed_at

string or null

date-time

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

created_at

string or null

date-time

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

updated_at

string or null

date-time

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

permissions

object (permissions)

admin

boolean

maintain

boolean

push

boolean

triage

boolean

pull

boolean

role_name

string

Example
"admin"

temp_clone_token

string

delete_branch_on_merge

boolean

subscribers_count

int

network_count

int

code_of_conduct

object (code_of_conduct)

Code Of Conduct

key

string

required

Example
"contributor_covenant"

name

string

required

Example
"Contributor Covenant"

url

string

uri

required

Example
"https://api.github.com/codes_of_conduct/contributor_covenant"

body

string

Example
"# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"

html_url

string or null

uri

required

license

object (license) or null

key

string

name

string

spdx_id

string

url

string

node_id

string

forks

int

Example
0

open_issues

int

Example
0

watchers

int

Example
0

allow_forking

boolean

web_commit_signoff_required

boolean

Example
false

security_and_analysis

object (security_and_analysis) or null

advanced_security

object (advanced_security)

status

string

Enum
  • enabled
  • disabled

secret_scanning

object (secret_scanning)

status

string

Enum
  • enabled
  • disabled

secret_scanning_push_protection

object (secret_scanning_push_protection)

status

string

Enum
  • enabled
  • disabled

created_at

string

date-time

required

updated_at

string

date-time

required

List packages for the authenticated user's namespace

get /user/packages

Lists packages owned by the authenticated user within the user's namespace.

To use this endpoint, you must authenticate using an access token with the read:packages scope. If the package_type belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the repo scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see "About permissions for GitHub Packages."

package_type

string

required

The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container

visibility

string

The selected visibility of the packages. This parameter is optional and only filters an existing result set.

The internal visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems internal is synonymous with private. For the list of GitHub Packages registries that support granular permissions, see "About permissions for GitHub Packages."

Enum
  • public
  • private
  • internal

page

int

Page number of the results to fetch.

Default
1

per_page

int

The number of results per page (max 100).

Default
30

Response

Examples Schema

Response

[
  {
    "id": 197,
    "name": "hello_docker",
    "package_type": "container",
    "owner": {
      "login": "octocat",
      "id": 9919,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
      "avatar_url": "https://avatars.octocatusercontent.com/u/9919?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/github",
      "followers_url": "https://api.github.com/users/github/followers",
      "following_url": "https://api.github.com/users/github/following{/other_user}",
      "gists_url": "https://api.github.com/users/github/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github/subscriptions",
      "organizations_url": "https://api.github.com/users/github/orgs",
      "repos_url": "https://api.github.com/users/github/repos",
      "events_url": "https://api.github.com/users/github/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github/received_events",
      "type": "User",
      "site_admin": false
    },
    "version_count": 1,
    "visibility": "private",
    "url": "https://api.github.com/orgs/github/packages/container/hello_docker",
    "created_at": "2020-05-19T22:19:11Z",
    "updated_at": "2020-05-19T22:19:11Z",
    "html_url": "https://github.com/orgs/github/packages/container/package/hello_docker"
  },
  {
    "id": 198,
    "name": "goodbye_docker",
    "package_type": "container",
    "owner": {
      "login": "github",
      "id": 9919,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
      "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/github",
      "followers_url": "https://api.github.com/users/github/followers",
      "following_url": "https://api.github.com/users/github/following{/other_user}",
      "gists_url": "https://api.github.com/users/github/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github/subscriptions",
      "organizations_url": "https://api.github.com/users/github/orgs",
      "repos_url": "https://api.github.com/users/github/repos",
      "events_url": "https://api.github.com/users/github/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github/received_events",
      "type": "User",
      "site_admin": false
    },
    "version_count": 2,
    "visibility": "private",
    "url": "https://api.github.com/user/octocat/packages/container/goodbye_docker",
    "created_at": "2020-05-20T22:19:11Z",
    "updated_at": "2020-05-20T22:19:11Z",
    "html_url": "https://github.com/user/octocat/packages/container/package/goodbye_docker"
  }
]

The value of per_page multiplied by page cannot be greater than 10000.

Empty response

array[object (Package)]

Package

object (Package)

A software package

id

int

required

Unique identifier of the package.

Example
1

name

string

required

The name of the package.

Example
"super-linter"

package_type

string

required

Enum
  • npm
  • maven
  • rubygems
  • docker
  • nuget
  • container
Example
"docker"

url

string

required

Example
"https://api.github.com/orgs/github/packages/container/super-linter"

html_url

string

required

Example
"https://github.com/orgs/github/packages/container/package/super-linter"

version_count

int

required

The number of versions of the package.

Example
1

visibility

string

required

Enum
  • private
  • public
Example
"private"

owner

object (owner) or null

A GitHub user.

name

string or null

email

string or null

login

string

required

Example
"octocat"

id

int

required

Example
1

node_id

string

required

Example
"MDQ6VXNlcjE="

avatar_url

string

uri

required

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

gravatar_id

string or null

required

Example
"41d064eb2195891e12d0413f63227ea7"