GitHub v3 REST API

Delete a label

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

Path Parameters

ownerstringrequired
repostringrequired
namestringrequired

Response

204

Response

delete/repos/{owner}/{repo}/labels/{name}
 
204

List milestones

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

Query Parameters

statestring

The state of the milestone. Either open, closed, or all.

Allowed values:openclosedall

Default:open

sortstring

What to sort results by. Either due_on or completeness.

Allowed values:due_oncompleteness

Default:due_on

directionstring

The direction of the sort. Either asc or desc.

Allowed values:ascdesc

Default:asc

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

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

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

Create a milestone

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

Path Parameters

ownerstringrequired
repostringrequired

Body

application/json
titlestringrequired

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

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

post/repos/{owner}/{repo}/milestones

Body

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

Get a milestone

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

Path Parameters

ownerstringrequired
repostringrequired
milestone_numberintegerrequired

milestone_number parameter

Response

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

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

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