GitHub v3 REST API

Commit Comparison

object

Commit Comparison

urlstring(uri)required

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

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/compare/master...topic

permalink_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17

diff_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/compare/master...topic.diff

patch_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/compare/master...topic.patch

base_commitobjectrequired

Commit

Show Child Parameters
merge_base_commitobjectrequired

Commit

Show Child Parameters
statusstringrequired

Allowed values:divergedaheadbehindidentical

Example:ahead

ahead_byintegerrequired

Example:4

behind_byintegerrequired

Example:5

total_commitsintegerrequired

Example:6

commitsarray[object]required

Commit

Show Child Parameters
filesarray[object]

Diff Entry

Show Child Parameters
Example

ContentReferenceAttachment

object

Content Reference attachments allow you to provide context around URLs posted in comments

idintegerrequired

The ID of the attachment

Example:21

titlestringrequired

The title of the attachment

<= 1024 characters

Example:Title of the attachment

bodystringrequired

The body of the attachment

<= 262144 characters

Example:Body of the attachment

node_idstring

The node_id of the content attachment

Example:MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=

Example

Content Tree

object

Content Tree

typestringrequired
sizeintegerrequired
namestringrequired
pathstringrequired
shastringrequired
urlstring(uri)required
git_urlstring(uri)required
html_urlstring(uri)required
download_urlstring(uri)required
entriesarray[object]
Show Child Parameters
_linksobjectrequired
Show Child Parameters
Example

Content Directory

array

A list of directory items

typestringrequired
sizeintegerrequired
namestringrequired
pathstringrequired
contentstring
shastringrequired
urlstring(uri)required
git_urlstring(uri)required
html_urlstring(uri)required
download_urlstring(uri)required
_linksobjectrequired
Show Child Parameters

Content File

object

Content File

typestringrequired
encodingstringrequired
sizeintegerrequired
namestringrequired
pathstringrequired
contentstringrequired
shastringrequired
urlstring(uri)required
git_urlstring(uri)required
html_urlstring(uri)required
download_urlstring(uri)required
_linksobjectrequired
Show Child Parameters
targetstring

Example:"actual/actual.md"

submodule_git_urlstring

Example:"git://example.com/defunkt/dotjs.git"

Example