GitHub v3 REST API

Merge a branch

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

Create a GitHub Enterprise Server Pages site

Configures a GitHub Enterprise Server Pages site. For more information, see “About GitHub Pages.”

post
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pages

Path Parameters

ownerstringrequired
repostringrequired

Body

application/json

The source branch and directory used to publish your Pages site.

sourceobjectrequired

The source branch and directory used to publish your Pages site.

Show Child Parameters

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

post/repos/{owner}/{repo}/pages

Body

{ "source": { "branch": "main", "path": "/docs" } }
 
application/json

Update information about a GitHub Enterprise Server Pages site

Updates information for a GitHub Enterprise Server Pages site. For more information, see "About GitHub Pages.

put
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pages

Path Parameters

ownerstringrequired
repostringrequired

Body

application/json
Any Of

Response

Response

put/repos/{owner}/{repo}/pages

Body

{ "cname": "octocatblog.com", "source": { "branch": "main", "path": "/" } }
 

Delete a GitHub Enterprise Server Pages site

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

Path Parameters

ownerstringrequired
repostringrequired

Response

Response

delete/repos/{owner}/{repo}/pages