GitHub v3 REST API

Create a repository project

Creates a repository project board. Returns a 404 Not Found status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.

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

Path Parameters

ownerstringrequired
repostringrequired

Body

application/json
namestringrequired

The name of the project.

bodystring

The description of the project.

Response

application/json

Response

Project

Projects are a way to organize columns and cards of work.

owner_urlstring(uri)required

Example:https://api.github.com/repos/api-playground/projects-test

urlstring(uri)required

Example:https://api.github.com/projects/1002604

html_urlstring(uri)required

Example:https://github.com/api-playground/projects-test/projects/12

columns_urlstring(uri)required

Example:https://api.github.com/projects/1002604/columns

idintegerrequired

Example:1002604

node_idstringrequired

Example:MDc6UHJvamVjdDEwMDI2MDQ=

namestringrequired

Name of the project

Example:Week One Sprint

bodystring | nullrequired

Body of the project

Example:This project represents the sprint of the first week in January

numberintegerrequired

Example:1

statestringrequired

State of the project; either ‘open’ or ‘closed’

Example:open

creatorobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required

Example:2011-04-10T20:09:31Z

updated_atstring(date-time)required

Example:2014-03-03T18:58:10Z

organization_permissionstring

The baseline permission that all organization members have on this project. Only present if owner is an organization.

Allowed values:readwriteadminnone

privateboolean

Whether or not this project can be seen by everyone. Only present if owner is an organization.

post/repos/{owner}/{repo}/projects

Body

{ "name": "Projects Documentation", "body": "Developer documentation project for the developer site." }
 
application/json

Create a user project

post
{protocol}://{hostname}/api/v3/user/projects

Body

application/json
namestringrequired

Name of the project

Example:Week One Sprint

bodystring | null

Body of the project

Example:This project represents the sprint of the first week in January

Response

application/json

Response

Project

Projects are a way to organize columns and cards of work.

owner_urlstring(uri)required

Example:https://api.github.com/repos/api-playground/projects-test

urlstring(uri)required

Example:https://api.github.com/projects/1002604

html_urlstring(uri)required

Example:https://github.com/api-playground/projects-test/projects/12

columns_urlstring(uri)required

Example:https://api.github.com/projects/1002604/columns

idintegerrequired

Example:1002604

node_idstringrequired

Example:MDc6UHJvamVjdDEwMDI2MDQ=

namestringrequired

Name of the project

Example:Week One Sprint

bodystring | nullrequired

Body of the project

Example:This project represents the sprint of the first week in January

numberintegerrequired

Example:1

statestringrequired

State of the project; either ‘open’ or ‘closed’

Example:open

creatorobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required

Example:2011-04-10T20:09:31Z

updated_atstring(date-time)required

Example:2014-03-03T18:58:10Z

organization_permissionstring

The baseline permission that all organization members have on this project. Only present if owner is an organization.

Allowed values:readwriteadminnone

privateboolean

Whether or not this project can be seen by everyone. Only present if owner is an organization.

post/user/projects

Body

{ "name": "Week One Sprint" }
 
application/json

List user projects

get
{protocol}://{hostname}/api/v3/users/{username}/projects

Query Parameters

statestring

Indicates the state of the projects to return. Can be either open, closed, or all.

Allowed values:openclosedall

Default:open

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

usernamestringrequired

Response

application/json

Response

Projects are a way to organize columns and cards of work.

owner_urlstring(uri)required

Example:https://api.github.com/repos/api-playground/projects-test

urlstring(uri)required

Example:https://api.github.com/projects/1002604

html_urlstring(uri)required

Example:https://github.com/api-playground/projects-test/projects/12

columns_urlstring(uri)required

Example:https://api.github.com/projects/1002604/columns

idintegerrequired

Example:1002604

node_idstringrequired

Example:MDc6UHJvamVjdDEwMDI2MDQ=

namestringrequired

Name of the project

Example:Week One Sprint

bodystring | nullrequired

Body of the project

Example:This project represents the sprint of the first week in January

numberintegerrequired

Example:1

statestringrequired

State of the project; either ‘open’ or ‘closed’

Example:open

creatorobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required

Example:2011-04-10T20:09:31Z

updated_atstring(date-time)required

Example:2014-03-03T18:58:10Z

organization_permissionstring

The baseline permission that all organization members have on this project. Only present if owner is an organization.

Allowed values:readwriteadminnone

privateboolean

Whether or not this project can be seen by everyone. Only present if owner is an organization.

get/users/{username}/projects
 
application/json

List pull requests

Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub’s products in the GitHub Help documentation.

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

Query Parameters

statestring

Either open, closed, or all to filter by state.

Allowed values:openclosedall

Default:open

headstring

Filter pulls by head user or head organization and branch name in the format of user:ref-name or organization:ref-name. For example: github:new-script-format or octocat:test-branch.

basestring

Filter pulls by base branch name. Example: gh-pages.

sortstring

What to sort results by. Can be either created, updated, popularity (comment count) or long-running (age, filtering by pulls updated in the last month).

Allowed values:createdupdatedpopularitylong-running

Default:created

directionstring

The direction of the sort. Can be either asc or desc. Default: desc when sort is created or sort is not specified, otherwise asc.

Allowed values:ascdesc

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired

Response

application/json

Response

Pull Request Simple

urlstring(uri)required

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

idintegerrequired

Example:1

node_idstringrequired

Example:MDExOlB1bGxSZXF1ZXN0MQ==

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347

diff_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347.diff

patch_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347.patch

issue_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/issues/1347

commits_urlstring(uri)required

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

review_comments_urlstring(uri)required

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

review_comment_urlstringrequired

Example:https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}

comments_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/issues/1347/comments

statuses_urlstring(uri)required

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

numberintegerrequired

Example:1347

statestringrequired

Example:open

lockedbooleanrequired

Example:true

titlestringrequired

Example:new-feature

userobject | nullrequired

Simple User

Show Child Parameters
bodystring | nullrequired

Example:Please pull these awesome changes

labelsarray[object]required
Show Child Parameters
milestoneobject | nullrequired

A collection of related issues and pull requests.

Show Child Parameters
active_lock_reasonstring | null

Example:too heated

created_atstring(date-time)required

Example:2011-01-26T19:01:12Z

updated_atstring(date-time)required

Example:2011-01-26T19:01:12Z

closed_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

merged_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

merge_commit_shastring | nullrequired

Example:e5bd3914e2e596debea16f433f57875b5b90bcd6

assigneeobject | nullrequired

Simple User

Show Child Parameters
assigneesarray | null[object]

Simple User

Show Child Parameters
requested_reviewersarray | null[object]

Simple User

Show Child Parameters
requested_teamsarray | null[object]

Groups of organization members that gives permissions on specified repositories.

Show Child Parameters
headobjectrequired
Show Child Parameters
baseobjectrequired
Show Child Parameters
_linksobjectrequired
Show Child Parameters
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

draftboolean

Indicates whether or not the pull request is a draft.

Example:false

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

Create a pull request

Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub’s products in the GitHub Help documentation.

To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.

You can create a new pull request.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.

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

Path Parameters

ownerstringrequired
repostringrequired

Body

application/json
titlestring

The title of the new pull request.

headstringrequired

The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch.

basestringrequired

The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.

bodystring

The contents of the pull request.

maintainer_can_modifyboolean

Indicates whether maintainers can modify the pull request.

draftboolean

Indicates whether the pull request is a draft. See “Draft Pull Requests” in the GitHub Help documentation to learn more.

issueinteger

Example:1

Response

application/json

Response

Pull Request

Pull requests let you tell others about changes you’ve pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.

urlstring(uri)required

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

idintegerrequired

Example:1

node_idstringrequired

Example:MDExOlB1bGxSZXF1ZXN0MQ==

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347

diff_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347.diff

patch_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/pull/1347.patch

issue_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/issues/1347

commits_urlstring(uri)required

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

review_comments_urlstring(uri)required

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

review_comment_urlstringrequired

Example:https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}

comments_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/issues/1347/comments

statuses_urlstring(uri)required

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

numberintegerrequired

Number uniquely identifying the pull request within its repository.

Example:42

statestringrequired

State of this Pull Request. Either open or closed.

Allowed values:openclosed

Example:open

lockedbooleanrequired

Example:true

titlestringrequired

The title of the pull request.

Example:Amazing new feature

userobject | nullrequired

Simple User

Show Child Parameters
bodystring | nullrequired

Example:Please pull these awesome changes

labelsarray[object]required
Show Child Parameters
milestoneobject | nullrequired

A collection of related issues and pull requests.

Show Child Parameters
active_lock_reasonstring | null

Example:too heated

created_atstring(date-time)required

Example:2011-01-26T19:01:12Z

updated_atstring(date-time)required

Example:2011-01-26T19:01:12Z

closed_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

merged_atstring | null(date-time)required

Example:2011-01-26T19:01:12Z

merge_commit_shastring | nullrequired

Example:e5bd3914e2e596debea16f433f57875b5b90bcd6

assigneeobject | nullrequired

Simple User

Show Child Parameters
assigneesarray | null[object]

Simple User

Show Child Parameters
requested_reviewersarray | null[object]

Simple User

Show Child Parameters
requested_teamsarray | null[object]

Groups of organization members that gives permissions on specified repositories.

Show Child Parameters
headobjectrequired
Show Child Parameters
baseobjectrequired
Show Child Parameters
_linksobjectrequired
Show Child Parameters
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

draftboolean

Indicates whether or not the pull request is a draft.

Example:false

mergedbooleanrequired
mergeableboolean | nullrequired

Example:true

rebaseableboolean | null

Example:true

mergeable_statestringrequired

Example:clean

merged_byobject | nullrequired

Simple User

Show Child Parameters
commentsintegerrequired

Example:10

review_commentsintegerrequired

Example:0

maintainer_can_modifybooleanrequired

Indicates whether maintainers can modify the pull request.

Example:true

commitsintegerrequired

Example:3

additionsintegerrequired

Example:100

deletionsintegerrequired

Example:3

changed_filesintegerrequired

Example:5

post/repos/{owner}/{repo}/pulls

Body

{ "title": "Amazing new feature", "body": "Please pull these awesome changes in!", "head": "octocat:new-feature", "base": "master" }
 
application/json