Skip to content

GitHub: Git schemas

7 GitHub schemas with complete fields and constraints.

← Git operations · All schemas

Create a blob — response body

FieldTypePresenceDescription and constraints
$objectRootShort Blob
shastringRequired within parent
urlstringRequired within parent

Create a commit — response body

FieldTypePresenceDescription and constraints
$objectRootLow-level Git commit operations within a repository
authorobjectRequired within parentIdentifying information for the git-user
author.datestringRequired within parentTimestamp of the commit
Format: date-time
author.emailstringRequired within parentGit email address of the user
author.namestringRequired within parentName of the git user
committerobjectRequired within parentIdentifying information for the git-user
committer.datestringRequired within parentTimestamp of the commit
Format: date-time
committer.emailstringRequired within parentGit email address of the user
committer.namestringRequired within parentName of the git user
html_urlstringRequired within parentFormat: uri
messagestringRequired within parentMessage describing the purpose of the commit
node_idstringRequired within parent
parentsarrayRequired within parent
parents[]objectEach item
parents[].html_urlstringRequired within parentFormat: uri
parents[].shastringRequired within parentSHA for the commit
parents[].urlstringRequired within parentFormat: uri
shastringRequired within parentSHA for the commit
treeobjectRequired within parent
tree.shastringRequired within parentSHA for the commit
tree.urlstringRequired within parentFormat: uri
urlstringRequired within parentFormat: uri
verificationobjectRequired within parent
verification.payloadJSONRequired within parent
verification.payload (anyOf 1)stringAlternative
verification.payload (anyOf 2)nullAlternative
verification.reasonstringRequired within parent
verification.signatureJSONRequired within parent
verification.signature (anyOf 1)stringAlternative
verification.signature (anyOf 2)nullAlternative
verification.verifiedbooleanRequired within parent
verification.verified_atJSONRequired within parent
verification.verified_at (anyOf 1)stringAlternative
verification.verified_at (anyOf 2)nullAlternative

Get a blob — response body

FieldTypePresenceDescription and constraints
$objectRootBlob
contentstringRequired within parent
encodingstringRequired within parent
highlighted_contentstringOptional
node_idstringRequired within parent
shastringRequired within parent
sizeJSONRequired within parent
size (anyOf 1)JSONAlternative
size (anyOf 1) (anyOf 1)integerAlternative
size (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
size (anyOf 2)nullAlternative
urlstringRequired within parentFormat: uri

Get a reference — response body

FieldTypePresenceDescription and constraints
$objectRootGit references within a repository
node_idstringRequired within parent
objectobjectRequired within parent
object.shastringRequired within parentSHA for the reference
Maximum length: 40
Minimum length: 40
object.typestringRequired within parent
object.urlstringRequired within parentFormat: uri
refstringRequired within parent
urlstringRequired within parentFormat: uri

Get a tag — response body

FieldTypePresenceDescription and constraints
$objectRootMetadata for a Git tag
messagestringRequired within parentMessage describing the purpose of the tag
node_idstringRequired within parent
objectobjectRequired within parent
object.shastringRequired within parent
object.typestringRequired within parent
object.urlstringRequired within parentFormat: uri
shastringRequired within parent
tagstringRequired within parentName of the tag
taggerobjectRequired within parent
tagger.datestringRequired within parent
tagger.emailstringRequired within parent
tagger.namestringRequired within parent
urlstringRequired within parentURL for the tag
Format: uri
verificationModelOptionalExpand Get a tag — response body — verification

Referenced models: Get a tag — response body — verification

Get a tag — response body — verification

FieldTypePresenceDescription and constraints
$objectRoot
payloadJSONRequired within parent
payload (anyOf 1)stringAlternative
payload (anyOf 2)nullAlternative
reasonstringRequired within parent
signatureJSONRequired within parent
signature (anyOf 1)stringAlternative
signature (anyOf 2)nullAlternative
verifiedbooleanRequired within parent
verified_atJSONRequired within parent
verified_at (anyOf 1)stringAlternative
verified_at (anyOf 2)nullAlternative

Get a tree — response body

FieldTypePresenceDescription and constraints
$objectRootThe hierarchy between files in a Git repository.
shastringRequired within parent
treearrayRequired within parentObjects specifying a tree structure
tree[]objectEach item
tree[].modestringRequired within parent
tree[].pathstringRequired within parent
tree[].shastringRequired within parent
tree[].sizeJSONOptional
tree[].size (anyOf 1)integerAlternative
tree[].size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
tree[].typestringRequired within parent
tree[].urlstringOptional
truncatedbooleanRequired within parent
urlstringOptionalFormat: uri

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.