GitHub v3 REST API

Update a milestone

patch
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/milestones/{milestone_number}

Path Parameters

ownerstringrequired
repostringrequired
milestone_numberintegerrequired

milestone_number parameter

Body

application/json
titlestring

The title of the milestone.

statestring

The state of the milestone. Either open or closed.

Allowed values:openclosed

Default:open

descriptionstring

A description of the milestone.

due_onstring(date-time)

The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

Response

200 application/json

Response

Milestone

A collection of related issues and pull requests.

urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/milestones/1

html_urlstring(uri)required

Example:https://github.com/octocat/Hello-World/milestones/v1.0

labels_urlstring(uri)required

Example:https://api.github.com/repos/octocat/Hello-World/milestones/1/labels

idintegerrequired

Example:1002604

node_idstringrequired

Example:MDk6TWlsZXN0b25lMTAwMjYwNA==

numberintegerrequired

The number of the milestone.

Example:42

statestringrequired

The state of the milestone.

Allowed values:openclosed

Default:open

Example:open

titlestringrequired

The title of the milestone.

Example:v1.0

descriptionstring | nullrequired

Example:Tracking milestone for version 1.0

creatorobject | nullrequired

Simple User

Show Child Parameters
open_issuesintegerrequired

Example:4

closed_issuesintegerrequired

Example:8

created_atstring(date-time)required

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

updated_atstring(date-time)required

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

closed_atstring | null(date-time)required

Example:2013-02-12T13:22:01Z

due_onstring | null(date-time)required

Example:2012-10-09T23:39:01Z

patch/repos/{owner}/{repo}/milestones/{milestone_number}

Body

{ "title": "v1.0", "state": "open", "description": "Tracking milestone for version 1.0", "due_on": "2012-10-09T23:39:01Z" }
 
200 application/json

Delete a milestone

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

Path Parameters

ownerstringrequired
repostringrequired
milestone_numberintegerrequired

milestone_number parameter

Response

Response

delete/repos/{owner}/{repo}/milestones/{milestone_number}
 

List labels for issues in a milestone

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/milestones/{milestone_number}/labels

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired
milestone_numberintegerrequired

milestone_number parameter

Response

200 application/json

Response

Color-coded labels help you categorize and filter your issues (just like labels in Gmail).

idinteger(int64)required

Example:208045946

node_idstringrequired

Example:MDU6TGFiZWwyMDgwNDU5NDY=

urlstring(uri)required

URL for the label

Example:https://api.github.com/repositories/42/labels/bug

namestringrequired

The name of the label.

Example:bug

descriptionstring | nullrequired

Example:Something isn't working

colorstringrequired

6-character hex code, without the leading #, identifying the color

Example:FFFFFF

defaultbooleanrequired

Example:true

get/repos/{owner}/{repo}/milestones/{milestone_number}/labels
 
200 application/json

List user account issues assigned to the authenticated user

List issues across owned and member repositories assigned to the authenticated user.

Note: GitHub’s REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
reason, “Issues” endpoints may return both issues and pull requests in the response. You can identify pull requests by
the pull_request key. Be aware that the id of a pull request returned from “Issues” endpoints will be an issue id. To find out the pull
request id, use the “List pull requests” endpoint.

get
{protocol}://{hostname}/api/v3/user/issues

Query Parameters

filterstring

Indicates which sorts of issues to return. Can be one of:
* assigned: Issues assigned to you
* created: Issues created by you
* mentioned: Issues mentioning you
* subscribed: Issues you’re subscribed to updates for
* all or repos: All issues the authenticated user can see, regardless of participation or creation

Allowed values:assignedcreatedmentionedsubscribedreposall

Default:assigned

statestring

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

Allowed values:openclosedall

Default:open

labelsstring

A list of comma separated label names. Example: bug,ui,@high

sortstring

What to sort results by. Can be either created, updated, comments.

Allowed values:createdupdatedcomments

Default:created

directionstring

One of asc (ascending) or desc (descending).

Allowed values:ascdesc

Default:desc

sincestring(date-time)

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Response

application/json

Response

Issues are a great way to keep track of tasks, enhancements, and bugs for your projects.

idintegerrequired
node_idstringrequired
urlstring(uri)required

URL for the issue

Example:https://api.github.com/repositories/42/issues/1

repository_urlstring(uri)required
labels_urlstringrequired
comments_urlstring(uri)required
events_urlstring(uri)required
html_urlstring(uri)required
numberintegerrequired

Number uniquely identifying the issue within its repository

Example:42

statestringrequired

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

Example:open

titlestringrequired

Title of the issue

Example:Widget creation fails in Safari on OS X 10.8

bodystring | null

Contents of the issue

Example:It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug?

userobject | nullrequired

Simple User

Show Child Parameters
labelsOne Of
arrayrequired

Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository

Example:["bug","registration"]

Variant 1string
assigneeobject | nullrequired

Simple User

Show Child Parameters
assigneesarray | null[object]

Simple User

Show Child Parameters
milestoneobject | nullrequired

A collection of related issues and pull requests.

Show Child Parameters
lockedbooleanrequired
active_lock_reasonstring | null
commentsintegerrequired
pull_requestobject
Show Child Parameters
closed_atstring | null(date-time)required
created_atstring(date-time)required
updated_atstring(date-time)required
draftboolean
closed_byobject | null

Simple User

Show Child Parameters
body_htmlstring
body_textstring
timeline_urlstring(uri)
repositoryobject

A git repository

Show Child Parameters
performed_via_github_appobject | null

GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.

Show Child Parameters
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

reactionsobject
Show Child Parameters
get/user/issues
 
application/json

Get all commonly used licenses

get
{protocol}://{hostname}/api/v3/licenses

Query Parameters

featuredboolean
per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Response

application/json

Response

License Simple

keystringrequired

Example:mit

namestringrequired

Example:MIT License

urlstring | null(uri)required

Example:https://api.github.com/licenses/mit

spdx_idstring | nullrequired

Example:MIT

node_idstringrequired

Example:MDc6TGljZW5zZW1pdA==

html_urlstring(uri)
get/licenses
 
application/json