GitHub v3 REST API

Create a gist comment

post
http://HOSTNAME/api/v3/gists/{gist_id}/comments

Path Parameters

gist_idstringrequired

gist_id parameter

Body

application/json
bodystringrequired

The comment text.

<= 65535 characters

Example:Body of the attachment

Response

application/json

Response

Gist Comment

A comment made to a gist.

idintegerrequired

Example:1

node_idstringrequired

Example:MDExOkdpc3RDb21tZW50MQ==

urlstring(uri)required

Example:https://api.github.com/gists/a6db0bec360bb87e9418/comments/1

bodystringrequired

The comment text.

<= 65535 characters

Example:Body of the attachment

userobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required

Example:2011-04-18T23:23:56Z

updated_atstring(date-time)required

Example:2011-04-18T23:23:56Z

author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

post/gists/{gist_id}/comments

Body

{ "body": "Body of the attachment" }
 
application/json

Get a gist comment

get
http://HOSTNAME/api/v3/gists/{gist_id}/comments/{comment_id}

Path Parameters

gist_idstringrequired

gist_id parameter

comment_idintegerrequired

comment_id parameter

Response

application/json

Response

Gist Comment

A comment made to a gist.

idintegerrequired

Example:1

node_idstringrequired

Example:MDExOkdpc3RDb21tZW50MQ==

urlstring(uri)required

Example:https://api.github.com/gists/a6db0bec360bb87e9418/comments/1

bodystringrequired

The comment text.

<= 65535 characters

Example:Body of the attachment

userobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required

Example:2011-04-18T23:23:56Z

updated_atstring(date-time)required

Example:2011-04-18T23:23:56Z

author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

get/gists/{gist_id}/comments/{comment_id}
 
application/json

Update a gist comment

patch
http://HOSTNAME/api/v3/gists/{gist_id}/comments/{comment_id}

Path Parameters

gist_idstringrequired

gist_id parameter

comment_idintegerrequired

comment_id parameter

Body

application/json
bodystringrequired

The comment text.

<= 65535 characters

Example:Body of the attachment

Response

application/json

Response

Gist Comment

A comment made to a gist.

idintegerrequired

Example:1

node_idstringrequired

Example:MDExOkdpc3RDb21tZW50MQ==

urlstring(uri)required

Example:https://api.github.com/gists/a6db0bec360bb87e9418/comments/1

bodystringrequired

The comment text.

<= 65535 characters

Example:Body of the attachment

userobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required

Example:2011-04-18T23:23:56Z

updated_atstring(date-time)required

Example:2011-04-18T23:23:56Z

author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

patch/gists/{gist_id}/comments/{comment_id}

Body

{ "body": "Body of the attachment" }
 
application/json

Delete a gist comment

delete
http://HOSTNAME/api/v3/gists/{gist_id}/comments/{comment_id}

Path Parameters

gist_idstringrequired

gist_id parameter

comment_idintegerrequired

comment_id parameter

Response

Response

delete/gists/{gist_id}/comments/{comment_id}
 

List gist commits

get
http://HOSTNAME/api/v3/gists/{gist_id}/commits

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

gist_idstringrequired

gist_id parameter

Response

application/json

Response

Gist Commit

urlstring(uri)required

Example:https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f

versionstringrequired

Example:57a7f021a713b1c5a6a199b54cc514735d2d462f

userobject | nullrequired

Simple User

Show Child Parameters
change_statusobjectrequired
Show Child Parameters
committed_atstring(date-time)required

Example:2010-04-14T02:15:15Z

get/gists/{gist_id}/commits
 
application/json