GitHub v3 REST API

Get a deploy key

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/keys/{key_id}

Path Parameters

ownerstringrequired
repostringrequired
key_idintegerrequired

key_id parameter

Response

application/json

Response

Deploy Key

An SSH key granting access to a single repository.

idintegerrequired
keystringrequired
urlstringrequired
titlestringrequired
verifiedbooleanrequired
created_atstringrequired
read_onlybooleanrequired
get/repos/{owner}/{repo}/keys/{key_id}
 
application/json

Delete a deploy key

Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead.

delete
http://HOSTNAME/api/v3/repos/{owner}/{repo}/keys/{key_id}

Path Parameters

ownerstringrequired
repostringrequired
key_idintegerrequired

key_id parameter

Response

204

Response

delete/repos/{owner}/{repo}/keys/{key_id}
 
204

List repository languages

Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/languages

Path Parameters

ownerstringrequired
repostringrequired

Response

200 application/json

Response

Language

Languageobject

Language

get/repos/{owner}/{repo}/languages
 
200 application/json

Merge a branch

post
http://HOSTNAME/api/v3/repos/{owner}/{repo}/merges

Path Parameters

ownerstringrequired
repostringrequired

Body

application/json
basestringrequired

The name of the base branch that the head will be merged into.

headstringrequired

The head to merge. This can be a branch name or a commit SHA1.

commit_messagestring

Commit message to use for the merge commit. If omitted, a default message will be used.

Response

application/json

Successful Response (The resulting merge commit)

Commit

Commit

urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e

shastringrequired

Example:6dcb09b5b57875f334f61aebed695e2e4193db5e

node_idstringrequired

Example:MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e

comments_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments

commitobjectrequired
Show Child Parameters
authorobject | nullrequired

Simple User

Show Child Parameters
committerobject | nullrequired

Simple User

Show Child Parameters
parentsarray[object]required
Show Child Parameters
statsobject
Show Child Parameters
filesarray[object]

Diff Entry

Show Child Parameters
post/repos/{owner}/{repo}/merges

Body

{ "base": "master", "head": "cool_feature", "commit_message": "Shipped cool_feature!" }
 
application/json

Get a GitHub Enterprise Server Pages site

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/pages

Path Parameters

ownerstringrequired
repostringrequired

Response

application/json

Response

GitHub Pages

The configuration for GitHub Pages for a repository.

urlstring(uri)required

The API address for accessing this Page resource.

Example:https://api.github.com/repos/github/hello-world/pages

statusstring | nullrequired

The status of the most recent build of the Page.

Allowed values:builtbuildingerrored

Example:built

cnamestring | nullrequired

The Pages site’s custom domain

Example:example.com

protected_domain_statestring | null

The state if the domain is verified

Allowed values:pendingverifiedunverified

Example:pending

pending_domain_unverified_atstring | null(date-time)

The timestamp when a pending domain becomes unverified.

custom_404booleanrequired

Whether the Page has a custom 404 page.

Default:false

Example:false

html_urlstring(uri)

The web address the Page can be accessed from.

Example:https://example.com

sourceobject
Show Child Parameters
publicbooleanrequired

Whether the GitHub Pages site is publicly visible. If set to true, the site is accessible to anyone on the internet. If set to false, the site will only be accessible to users who have at least read access to the repository that published the site.

Example:true

https_certificateobject
Show Child Parameters
https_enforcedboolean

Whether https is enabled on the domain

Example:true

get/repos/{owner}/{repo}/pages
 
application/json