Get all of a repository's opened milestones
GET
/repos/{owner}/{repo}/milestones
const url = 'https://gitea.com/api/v1/repos/example/example/milestones';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.com/api/v1/repos/example/example/milestones \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”owner
required
string
Owner of the repo
repo
required
string
Name of the repo
Query Parameters
Section titled “Query Parameters”state
string
Milestone state, Recognized values are open, closed and all. Defaults to “open”
name
string
Filter by milestone name
page
integer
Page number of results to return (1-based)
limit
integer
Page size of results
Responses
Section titled “Responses”MilestoneList
Media typeapplication/json
Array<object>
Milestone milestone is a collection of issues on one repository
object
closed_at
string format: date-time
closed_issues
ClosedIssues is the number of closed issues in this milestone
integer format: int64
created_at
string format: date-time
description
Description provides details about the milestone
string
due_on
string format: date-time
id
ID is the unique identifier for the milestone
integer format: int64
open_issues
OpenIssues is the number of open issues in this milestone
integer format: int64
state
State indicates if the milestone is open or closed open StateOpen pr is opened closed StateClosed pr is closed
string
title
Title is the title of the milestone
string
updated_at
string format: date-time
Example
[ { "state": "open" }]APINotFound is a not found empty response