Skip to content

Get a gist at a revision

GET/gists/{uuid}/{sha}

Returns a gist as it stood at the given commit SHA, with the same shape as GET /gists/{uuid}.

Visibility rules match the gist endpoint: public and unlisted gists are readable by anyone; a private gist resolves only for its owner with a gist:read-capable token, otherwise 404. An unknown revision also returns 404 so the gist's commit history is not disclosed.

Request

Headers

NameTypeScopes
Authorizationoptionalstring

Path parameters

NameTypeDescription
uuidrequiredstringThe gist's UUID.
sharequiredstringA full or partial commit SHA (hex, 4–40 characters). (pattern: ^[0-9a-fA-F]{4,40}$)

Responses

StatusBodyDescription
200GistThe gist at the requested revision.
400ErrorThe request was malformed.
404ErrorThe requested resource does not exist (or is not visible to the caller).