GitHub v3 REST API

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

Symlink Content

object

An object describing a symlink

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