Skip to content

List a gist's commits

GET/gists/{uuid}/commits

Lists the commits of a gist's repository, most recent first. Each commit's author is resolved to an Opengist account when one matches the commit email.

Public and unlisted gists are readable by anyone; a private gist resolves only for its owner with a gist:read-capable token, otherwise 404.

Results are a JSON array; pagination is conveyed via the Link and X-* response headers. Unlike the other list endpoints, commits omit X-Total / X-Total-Pages (computing the total would require an extra git call).

Request

Headers

NameTypeScopes
Authorizationoptionalstring

Path parameters

NameTypeDescription
uuidrequiredstringThe gist's UUID.

Query parameters

NameTypeDescription
pageintegerPage number, 1-based. (default: 1, min: 1)
per_pageintegerItems per page. (default: 30, min: 1, max: 100)

Responses

StatusBodyDescription
200GistCommit[]A list of commits.
Headers:LinkX-PageX-Per-Page
404ErrorThe requested resource does not exist (or is not visible to the caller).