GitHub v3 REST API

Remove a repository collaborator

delete
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/collaborators/{username}

Path Parameters

ownerstringrequired
repostringrequired
usernamestringrequired

Response

204

Response

delete/repos/{owner}/{repo}/collaborators/{username}
 
204

Get repository permissions for a user

Checks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/collaborators/{username}/permission

Path Parameters

ownerstringrequired
repostringrequired
usernamestringrequired

Response

application/json

if user has admin permissions

Repository Collaborator Permission

Repository Collaborator Permission

permissionstringrequired
userobject | nullrequired

Collaborator

Show Child Parameters
get/repos/{owner}/{repo}/collaborators/{username}/permission
 
application/json

List commit comments for a repository

Commit Comments use these custom media types. You can read more about the use of media types in the API here.

Comments are ordered by ascending ID.

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/comments

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired

Response

200 application/json

Response

Commit Comment

html_urlstring(uri)required
urlstring(uri)required
idintegerrequired
node_idstringrequired
bodystringrequired
pathstring | nullrequired
positioninteger | nullrequired
lineinteger | nullrequired
commit_idstringrequired
userobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required
updated_atstring(date-time)required
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

reactionsobject
Show Child Parameters
get/repos/{owner}/{repo}/comments
 
200 application/json

Get a commit comment

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/comments/{comment_id}

Path Parameters

ownerstringrequired
repostringrequired
comment_idintegerrequired

comment_id parameter

Response

application/json

Response

Commit Comment

Commit Comment

html_urlstring(uri)required
urlstring(uri)required
idintegerrequired
node_idstringrequired
bodystringrequired
pathstring | nullrequired
positioninteger | nullrequired
lineinteger | nullrequired
commit_idstringrequired
userobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required
updated_atstring(date-time)required
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

reactionsobject
Show Child Parameters
get/repos/{owner}/{repo}/comments/{comment_id}
 
application/json

Update a commit comment

patch
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/comments/{comment_id}

Path Parameters

ownerstringrequired
repostringrequired
comment_idintegerrequired

comment_id parameter

Body

application/json
bodystringrequired

The contents of the comment

Response

application/json

Response

Commit Comment

Commit Comment

html_urlstring(uri)required
urlstring(uri)required
idintegerrequired
node_idstringrequired
bodystringrequired
pathstring | nullrequired
positioninteger | nullrequired
lineinteger | nullrequired
commit_idstringrequired
userobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required
updated_atstring(date-time)required
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

reactionsobject
Show Child Parameters
patch/repos/{owner}/{repo}/comments/{comment_id}

Body

{ "body": "Nice change" }
 
application/json