GitHub v3 REST API

List repository issues

List issues in a repository.

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/repos/{owner}/{repo}/issues

Query Parameters

milestonestring

If an integer is passed, it should refer to a milestone by its number field. If the string * is passed, issues with any milestone are accepted. If the string none is passed, issues without milestones are returned.

statestring

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

Allowed values:openclosedall

Default:open

assigneestring

Can be the name of a user. Pass in none for issues with no assigned user, and * for issues assigned to any user.

creatorstring

The user that created the issue.

mentionedstring

A user that’s mentioned in the issue.

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

Path Parameters

ownerstringrequired
repostringrequired

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/repos/{owner}/{repo}/issues
 
application/json

Create an issue

Any user with pull access to a repository can create an issue. If issues are disabled in the repository, the API returns a 410 Gone status.

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}/issues

Path Parameters

ownerstringrequired
repostringrequired

Body

application/json
titleOne Of
required

The title of the issue.

Variant 1string
bodystring

The contents of the issue.

assigneestring | null

Login for the user that this issue should be assigned to. NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. This field is deprecated.

milestoneOne Of
Variant 1string
labelsOne Of
array

Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.

Variant 1string
assigneesarray[string]

Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.

Response

application/json

Response

Issue

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
post/repos/{owner}/{repo}/issues

Body

{ "title": "Found a bug", "body": "I'm having a problem with this.", "assignees": [ "octocat" ], "milestone": 1, "labels": [ "bug" ] }
 
application/json

List issue comments for a repository

By default, Issue Comments are ordered by ascending ID.

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

Query Parameters

sortstring

One of created (when the repository was starred) or updated (when it was last pushed to).

Allowed values:createdupdated

Default:created

directionstring

Either asc or desc. Ignored without the sort parameter.

Allowed values:ascdesc

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

Path Parameters

ownerstringrequired
repostringrequired

Response

application/json

Response

Comments provide a way for people to collaborate on an issue.

idintegerrequired

Unique identifier of the issue comment

Example:42

node_idstringrequired
urlstring(uri)required

URL for the issue comment

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

bodystring

Contents of the issue comment

Example:What version of Safari were you using when you observed this bug?

body_textstring
body_htmlstring
html_urlstring(uri)required
userobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required

Example:2011-04-14T16:00:49Z

updated_atstring(date-time)required

Example:2011-04-14T16:00:49Z

issue_urlstring(uri)required
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

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
reactionsobject
Show Child Parameters
get/repos/{owner}/{repo}/issues/comments
 
application/json

Get an issue comment

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/issues/comments/{comment_id}

Path Parameters

ownerstringrequired
repostringrequired
comment_idintegerrequired

comment_id parameter

Response

application/json

Response

Issue Comment

Comments provide a way for people to collaborate on an issue.

idintegerrequired

Unique identifier of the issue comment

Example:42

node_idstringrequired
urlstring(uri)required

URL for the issue comment

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

bodystring

Contents of the issue comment

Example:What version of Safari were you using when you observed this bug?

body_textstring
body_htmlstring
html_urlstring(uri)required
userobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required

Example:2011-04-14T16:00:49Z

updated_atstring(date-time)required

Example:2011-04-14T16:00:49Z

issue_urlstring(uri)required
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

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
reactionsobject
Show Child Parameters
get/repos/{owner}/{repo}/issues/comments/{comment_id}
 
application/json

Update an issue comment

patch
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/issues/comments/{comment_id}

Path Parameters

ownerstringrequired
repostringrequired
comment_idintegerrequired

comment_id parameter

Body

application/json
bodystringrequired

The contents of the comment.

Response

application/json

Response

Issue Comment

Comments provide a way for people to collaborate on an issue.

idintegerrequired

Unique identifier of the issue comment

Example:42

node_idstringrequired
urlstring(uri)required

URL for the issue comment

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

bodystring

Contents of the issue comment

Example:What version of Safari were you using when you observed this bug?

body_textstring
body_htmlstring
html_urlstring(uri)required
userobject | nullrequired

Simple User

Show Child Parameters
created_atstring(date-time)required

Example:2011-04-14T16:00:49Z

updated_atstring(date-time)required

Example:2011-04-14T16:00:49Z

issue_urlstring(uri)required
author_associationstringrequired

How the author is associated with the repository.

Allowed values:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER

Example:OWNER

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
reactionsobject
Show Child Parameters
patch/repos/{owner}/{repo}/issues/comments/{comment_id}

Body

{ "body": "Me too" }
 
application/json