Skip to content

GitHub: Packages schemas

4 GitHub schemas with complete fields and constraints.

← Packages operations · All schemas

Get a package for a user — response body

FieldTypePresenceDescription and constraints
$objectRootA software package
created_atstringRequired within parentFormat: date-time
html_urlstringRequired within parent
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the package.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe name of the package.
ownerModelOptionalExpand Get an issue — response body — user
package_typestringRequired within parentKnown values: npm, maven, rubygems, docker, nuget, container
repositoryModelOptionalExpand Get a package for a user — response body — repository
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parent
version_countJSONRequired within parent
version_count (anyOf 1)integerAlternativeThe number of versions of the package.
version_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
visibilitystringRequired within parentKnown values: private, public

Referenced models: Get a package for a user — response body — repository, Get an issue — response body — user

Get a package for a user — response body — repository

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Get a package for a user — response body — repository / pull_request_creation_policy: all, collaborators only
$ (anyOf 2)nullAlternative

Referenced models: Get a package for a user — response body — repository / pull_request_creation_policy: all, collaborators only

Get a package for a user — response body — repository / pull_request_creation_policy: all, collaborators only

FieldTypePresenceDescription and constraints
$objectRootMinimal Repository
allow_forkingbooleanOptional
archive_urlstringRequired within parent
archivedbooleanOptional
assignees_urlstringRequired within parent
blobs_urlstringRequired within parent
branches_urlstringRequired within parent
clone_urlstringOptional
code_of_conductModelOptionalExpand Get a code of conduct — response body
collaborators_urlstringRequired within parent
comments_urlstringRequired within parent
commits_urlstringRequired within parent
compare_urlstringRequired within parent
contents_urlstringRequired within parent
contributors_urlstringRequired within parentFormat: uri
created_atJSONOptional
created_at (anyOf 1)stringAlternativeFormat: date-time
created_at (anyOf 2)nullAlternative
custom_propertiesobjectOptionalThe custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.
Additional keys: allowed
default_branchstringOptional
delete_branch_on_mergebooleanOptional
deployments_urlstringRequired within parentFormat: uri
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
disabledbooleanOptional
downloads_urlstringRequired within parentFormat: uri
events_urlstringRequired within parentFormat: uri
forkbooleanRequired within parent
forksJSONOptional
forks (anyOf 1)integerAlternative
forks (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_countJSONOptional
forks_count (anyOf 1)integerAlternative
forks_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_urlstringRequired within parentFormat: uri
full_namestringRequired within parent
git_commits_urlstringRequired within parent
git_refs_urlstringRequired within parent
git_tags_urlstringRequired within parent
git_urlstringOptional
has_discussionsbooleanOptional
has_issuesbooleanOptional
has_pagesbooleanOptional
has_projectsbooleanOptional
has_pull_requestsbooleanOptional
has_wikibooleanOptional
homepageJSONOptional
homepage (anyOf 1)stringAlternative
homepage (anyOf 2)nullAlternative
hooks_urlstringRequired within parentFormat: uri
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
is_templatebooleanOptional
issue_comment_urlstringRequired within parent
issue_events_urlstringRequired within parent
issues_urlstringRequired within parent
keys_urlstringRequired within parent
labels_urlstringRequired within parent
languageJSONOptional
language (anyOf 1)stringAlternative
language (anyOf 2)nullAlternative
languages_urlstringRequired within parentFormat: uri
licenseJSONOptional
license (anyOf 1)objectAlternative
license (anyOf 1).keystringOptional
license (anyOf 1).namestringOptional
license (anyOf 1).node_idstringOptional
license (anyOf 1).spdx_idstringOptional
license (anyOf 1).urlJSONOptional
license (anyOf 1).url (anyOf 1)stringAlternative
license (anyOf 1).url (anyOf 2)nullAlternative
license (anyOf 2)nullAlternative
merges_urlstringRequired within parentFormat: uri
milestones_urlstringRequired within parent
mirror_urlJSONOptional
mirror_url (anyOf 1)stringAlternative
mirror_url (anyOf 2)nullAlternative
namestringRequired within parent
network_countJSONOptional
network_count (anyOf 1)integerAlternative
network_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
node_idstringRequired within parent
notifications_urlstringRequired within parent
open_issuesJSONOptional
open_issues (anyOf 1)integerAlternative
open_issues (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
open_issues_countJSONOptional
open_issues_count (anyOf 1)integerAlternative
open_issues_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ownerModelRequired within parentExpand List users — response body — item
permissionsobjectOptional
permissions.adminbooleanOptional
permissions.maintainbooleanOptional
permissions.pullbooleanOptional
permissions.pushbooleanOptional
permissions.triagebooleanOptional
privatebooleanRequired within parent
pull_request_creation_policystringOptionalThe policy controlling who can create pull requests: all or collaborators_only.
Known values: all, collaborators_only
pulls_urlstringRequired within parent
pushed_atJSONOptional
pushed_at (anyOf 1)stringAlternativeFormat: date-time
pushed_at (anyOf 2)nullAlternative
releases_urlstringRequired within parent
role_namestringOptional
security_and_analysisModelOptionalExpand Create a fork — response body — security and analysis
sizeJSONOptional
size (anyOf 1)integerAlternativeThe size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ssh_urlstringOptional
stargazers_countJSONOptional
stargazers_count (anyOf 1)integerAlternative
stargazers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
stargazers_urlstringRequired within parentFormat: uri
statuses_urlstringRequired within parent
subscribers_countJSONOptional
subscribers_count (anyOf 1)integerAlternative
subscribers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
subscribers_urlstringRequired within parentFormat: uri
subscription_urlstringRequired within parentFormat: uri
svn_urlstringOptional
tags_urlstringRequired within parentFormat: uri
teams_urlstringRequired within parentFormat: uri
temp_clone_tokenstringOptionalWhen present and non-empty, a temporary credential for read-only Git access to this repository.
It expires five minutes after generation and cannot be used to push changes.
Treat this value as sensitive and avoid recording it in logs.
topicsarrayOptional
topics[]stringEach item
trees_urlstringRequired within parent
updated_atJSONOptional
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative
urlstringRequired within parentFormat: uri
visibilitystringOptional
watchersJSONOptional
watchers (anyOf 1)integerAlternative
watchers (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
watchers_countJSONOptional
watchers_count (anyOf 1)integerAlternative
watchers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
web_commit_signoff_requiredbooleanOptional

Referenced models: Get a code of conduct — response body, Create a fork — response body — security and analysis, List users — response body — item

Get a package version for a user — response body

FieldTypePresenceDescription and constraints
$objectRootA version of a software package
created_atstringRequired within parentFormat: date-time
deleted_atstringOptionalFormat: date-time
descriptionstringOptional
html_urlstringOptional
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the package version.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
licensestringOptional
metadataobjectOptional
metadata.containerobjectOptional
metadata.container.tagsarrayRequired within parent
metadata.container.tags[]stringEach item
metadata.dockerobjectOptional
metadata.docker.tagarrayOptional
metadata.docker.tag[]stringEach item
metadata.package_typestringRequired within parentKnown values: npm, maven, rubygems, docker, nuget, container
namestringRequired within parentThe name of the package version.
package_html_urlstringRequired within parent
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parent

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.