GET
/gists/{gist_id}/{sha}Get a gist revision
Retrieves a specified revision of a gist. Supply gist_id and sha to identify the gist and revision; the application/vnd.github.raw+json media type returns the raw Markdown and is the default when you do not specify a media type.
gist_idstringrequired
The unique identifier of the gist containing the revision.
shastringrequired
The SHA identifying the gist revision to retrieve.
200Returns the gist object for the specified revision, including its files and revision details.
forksarray<object>deprecatedoptional
historyarray<GistHistory>deprecatedoptional
fork_ofobjectoptional
Gist
urlstringoptional
forks_urlstringoptional
commits_urlstringoptional
idstringoptional
node_idstringoptional
git_pull_urlstringoptional
git_push_urlstringoptional
html_urlstringoptional
filesobjectoptional
publicbooleanoptional
created_atstringoptional
updated_atstringoptional
descriptionstringoptional
commentsintegeroptional
comments_enabledbooleanoptional
userstringoptional
comments_urlstringoptional
ownerobjectoptional
A GitHub user.
truncatedbooleanoptional
403Returned when the authenticated user is not permitted to access the gist revision.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Returned when the gist or specified revision does not exist.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Returned when validation fails or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 403 is returned when the authenticated user cannot access the gist revision. A 404 is returned when the gist or revision identified by the gist_id path parameter and sha path parameter cannot be found. A 422 is returned when validation fails or the endpoint has been spammed.