GitHub v3 REST API

Dismiss a review for a pull request

Note: To dismiss a pull request review on a protected branch, you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.

put
http://HOSTNAME/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired
review_idintegerrequired

review_id parameter

Body

application/json
messagestringrequired

The message for the pull request review dismissal

eventstring

Example:"APPROVE"

Response

application/json

Response

Pull Request Review

Pull Request Reviews are reviews on pull requests.

idintegerrequired

Unique identifier of the review

Example:42

node_idstringrequired

Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=

userobject | nullrequired

Simple User

Show Child Parameters
bodystringrequired

The text of the review.

Example:This looks great.

statestringrequired

Example:CHANGES_REQUESTED

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80

pull_request_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/12

_linksobjectrequired
Show Child Parameters
submitted_atstring(date-time)
commit_idstringrequired

A commit SHA for the review.

Example:54bb654c9e6025347f57900a4a5c2313a96b8035

body_htmlstring
body_textstring
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

put/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals

Body

{ "message": "message" }
 
application/json

Submit a review for a pull request

post
http://HOSTNAME/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired
review_idintegerrequired

review_id parameter

Body

application/json
bodystring

The body text of the pull request review

eventstringrequired

The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. When you leave this blank, the API returns HTTP 422 (Unrecognizable entity) and sets the review action state to PENDING, which means you will need to re-submit the pull request review using a review action.

Allowed values:APPROVEREQUEST_CHANGESCOMMENT

Response

application/json

Response

Pull Request Review

Pull Request Reviews are reviews on pull requests.

idintegerrequired

Unique identifier of the review

Example:42

node_idstringrequired

Example:MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=

userobject | nullrequired

Simple User

Show Child Parameters
bodystringrequired

The text of the review.

Example:This looks great.

statestringrequired

Example:CHANGES_REQUESTED

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80

pull_request_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/pulls/12

_linksobjectrequired
Show Child Parameters
submitted_atstring(date-time)
commit_idstringrequired

A commit SHA for the review.

Example:54bb654c9e6025347f57900a4a5c2313a96b8035

body_htmlstring
body_textstring
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

post/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events

Body

{ "event": "APPROVE" }
 
application/json

Update a pull request branch

Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.

put
http://HOSTNAME/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/update-branch

Path Parameters

ownerstringrequired
repostringrequired
pull_numberintegerrequired

Body

application/json
expected_head_shastring

The expected SHA of the pull request’s HEAD ref. This is the most recent commit on the pull request’s branch. If the expected SHA does not match the pull request’s HEAD, you will receive a 422 Unprocessable Entity status. You can use the “List commits” endpoint to find the most recent commit SHA. Default: SHA of the pull request’s current HEAD ref.

Response

application/json

Response

messagestring
urlstring
put/repos/{owner}/{repo}/pulls/{pull_number}/update-branch

Body

{ "expected_head_sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" }
 
application/json

rate-limit

Check your current rate limit status

Get rate limit status for the authenticated user

Note: Accessing this endpoint does not count against your REST API rate limit.

Note: The rate object is deprecated. If you’re writing new API client code or updating existing code, you should use the core object instead of the rate object. The core object contains the same information that is present in the rate object.

get
http://HOSTNAME/api/v3/rate_limit

Response

application/json

Response

Rate Limit Overview

Rate Limit Overview

resourcesobjectrequired
Show Child Parameters
rateobjectrequired
Show Child Parameters
get/rate_limit
 
application/json