GitHub v3 REST API

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
{protocol}://{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

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
{protocol}://{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

List reactions for a team discussion comment

List the reactions to a team discussion comment. OAuth access tokens require the read:discussion scope.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions.

get
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions

Query Parameters

contentstring

Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment.

Allowed values:+1-1laughconfusedhearthoorayrocketeyes

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

discussion_numberintegerrequired
comment_numberintegerrequired

Response

200 application/json

Response

Reactions to conversations provide a way to help people express their feelings more simply and effectively.

idintegerrequired

Example:1

node_idstringrequired

Example:MDg6UmVhY3Rpb24x

userobject | nullrequired

Simple User

Show Child Parameters
contentstringrequired

The reaction to use

Allowed values:+1-1laughconfusedhearthoorayrocketeyes

Example:heart

created_atstring(date-time)required

Example:2016-05-20T20:09:31Z

get/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions
 
200 application/json

Create reaction for a team discussion comment

Create a reaction to a team discussion comment. OAuth access tokens require the write:discussion scope. A response with an HTTP 200 status means that you already added the reaction type to this team discussion comment.

Note: You can also specify a team by org_id and team_id using the route POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions.

post
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

discussion_numberintegerrequired
comment_numberintegerrequired

Body

application/json
contentstringrequired

The reaction type to add to the team discussion comment.

Allowed values:+1-1laughconfusedhearthoorayrocketeyes

Response

application/json

Response

Reaction

Reactions to conversations provide a way to help people express their feelings more simply and effectively.

idintegerrequired

Example:1

node_idstringrequired

Example:MDg6UmVhY3Rpb24x

userobject | nullrequired

Simple User

Show Child Parameters
contentstringrequired

The reaction to use

Allowed values:+1-1laughconfusedhearthoorayrocketeyes

Example:heart

created_atstring(date-time)required

Example:2016-05-20T20:09:31Z

post/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions

Body

{ "content": "heart" }
 
application/json

Delete team discussion comment reaction

Note: You can also specify a team or organization with team_id and org_id using the route DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id.

Delete a reaction to a team discussion comment. OAuth access tokens require the write:discussion scope.

delete
{protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}

Path Parameters

orgstringrequired
team_slugstringrequired

team_slug parameter

discussion_numberintegerrequired
comment_numberintegerrequired
reaction_idintegerrequired

Response

204

Response

delete/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}
 
204