GET
/repos/{owner}/{repo}/milestonesList repository milestones
Lists the milestones for a repository. Filter by milestone state, choose the sort field and direction, and use pagination parameters to control the result set. Use page and per_page to paginate the results.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
statestringoptional
The milestone state to include: `open`, `closed`, or `all`. Defaults to `open` when omitted.
sortstringoptional
The field used to sort milestones: `due_on` or `completeness`. Defaults to `due_on` when omitted.
directionstringoptional
The sort direction: `asc` or `desc`. Defaults to `asc` when omitted.
per_pageintegeroptional
The number of milestones to return per page. Must not exceed 100 and defaults to 30 when omitted.
pageintegeroptional
The page number to retrieve. Defaults to 1 when omitted.
200Returns an array of milestone objects containing milestone identifiers, numbers, titles, states, descriptions, due dates, issue counts, creator information, and timestamps.
urlstringrequired
html_urlstringrequired
labels_urlstringrequired
idintegerrequired
node_idstringrequired
numberintegerrequired
The number of the milestone.
statestringrequired
The state of the milestone.
titlestringrequired
The title of the milestone.
descriptionstringrequired
creatorobjectrequired
A GitHub user.
open_issuesintegerrequired
closed_issuesintegerrequired
created_atstringrequired
updated_atstringrequired
closed_atstringrequired
due_onstringrequired
404Returned when the repository does not exist.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
Error handling
A 404 is returned when the repository identified by owner and repo cannot be found. state must be open, closed, or all; sort must be due_on or completeness; and direction must be asc or desc. per_page accepts a maximum of 100 and defaults to 30, while page defaults to 1.