Use this API to manage milestones for both projects and groups.

List all group milestones

GET /api/v4/groups/{id}/milestones

Lists all group milestones for a specified group.

Parameters

NameTypeDescription
id
Path, required
StringThe ID of a group
state
Query
StringReturn “active”, “closed”, or “all” milestones
Allowed values: active, closed, all
Default: all
iids
Query
Array of integersThe IIDs of the milestones
title
Query
StringThe title of the milestones
search
Query
StringThe search criteria for the title or description of the milestone
include_parent_milestones
Query
BooleanDeprecated: see include_ancestors. Mutually exclusive with include_ancestors
include_ancestors
Query
BooleanInclude milestones from all parent groups. Mutually exclusive with include_parent_milestones
updated_before
Query
String (date-time)Return milestones updated before the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ
updated_after
Query
String (date-time)Return milestones updated after the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
include_descendants
Query
BooleanInclude milestones from all subgroups and subprojects

Responses

CodeDescriptionSchema
200OKAPIEntitiesMilestone
400Bad Request—
404Not Found—

Create a group milestone

POST /api/v4/groups/{id}/milestones

Creates a milestone for the specified group.

Parameters

NameTypeDescription
id
Path, required
StringThe ID of a group

Request body (application/json)

PropertyTypeDescription
descriptionStringThe description of the milestone
due_dateStringThe due date of the milestone. The ISO 8601 date format (%Y-%m-%d)
start_dateStringThe start date of the milestone. The ISO 8601 date format (%Y-%m-%d)
title
Required
StringThe title of the milestone

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesMilestone
400Bad Request—
404Not Found—

Retrieve a group milestone

GET /api/v4/groups/{id}/milestones/{milestone_id}

Retrieves a specified group milestone.

Parameters

NameTypeDescription
id
Path, required
StringThe ID of a group
milestone_id
Path, required
IntegerThe ID of a group milestone

Responses

CodeDescriptionSchema
200OKAPIEntitiesMilestone
400Bad Request—
404Not Found—

Update a group milestone

PUT /api/v4/groups/{id}/milestones/{milestone_id}

Updates the specified group milestone.

Parameters

NameTypeDescription
id
Path, required
StringThe ID of a group
milestone_id
Path, required
IntegerThe milestone ID number

Request body (application/json)

PropertyTypeDescription
descriptionStringThe description of the milestone
due_dateStringThe due date of the milestone. The ISO 8601 date format (%Y-%m-%d)
start_dateStringThe start date of the milestone. The ISO 8601 date format (%Y-%m-%d)
state_eventStringThe state event of the milestone
Allowed values: close, activate
titleStringThe title of the milestone

Responses

CodeDescriptionSchema
200OKAPIEntitiesMilestone
400Bad Request—
404Not Found—

Delete a group milestone

DELETE /api/v4/groups/{id}/milestones/{milestone_id}

Deletes the specified group milestone.

Parameters

NameTypeDescription
id
Path, required
StringThe ID of a group
milestone_id
Path, required
IntegerThe ID of a group milestone

Responses

CodeDescriptionSchema
204204 No Content—
400Bad Request—
404Not Found—

List all issues assigned to a single milestone

GET /api/v4/groups/{id}/milestones/{milestone_id}/issues

Lists all issues assigned to a specified group milestone.

Parameters

NameTypeDescription
id
Path, required
StringThe ID of a group
milestone_id
Path, required
IntegerThe ID of a group milestone
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesIssueBasic
400Bad Request—
404Not Found—

List all merge requests assigned to a single milestone

GET /api/v4/groups/{id}/milestones/{milestone_id}/merge_requests

Lists all merge requests assigned to a specified group milestone.

Parameters

NameTypeDescription
id
Path, required
StringThe ID of a group
milestone_id
Path, required
IntegerThe ID of a group milestone
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestBasic
400Bad Request—
404Not Found—

List all project milestones

GET /api/v4/projects/{id}/milestones

Lists all milestones for a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
state
Query
StringReturn “active”, “closed”, or “all” milestones
Allowed values: active, closed, all
Default: all
iids
Query
Array of integersThe IIDs of the milestones
title
Query
StringThe title of the milestones
search
Query
StringThe search criteria for the title or description of the milestone
include_parent_milestones
Query
BooleanDeprecated: see include_ancestors. Mutually exclusive with include_ancestors
include_ancestors
Query
BooleanInclude milestones from all parent groups. Mutually exclusive with include_parent_milestones
updated_before
Query
String (date-time)Return milestones updated before the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ
updated_after
Query
String (date-time)Return milestones updated after the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesMilestone
400Bad Request—
404Not Found—

Create a project milestone

POST /api/v4/projects/{id}/milestones

Creates a project milestone.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Request body (application/json)

PropertyTypeDescription
descriptionStringThe description of the milestone
due_dateStringThe due date of the milestone. The ISO 8601 date format (%Y-%m-%d)
start_dateStringThe start date of the milestone. The ISO 8601 date format (%Y-%m-%d)
title
Required
StringThe title of the milestone

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesMilestone
400Bad Request—
404Not Found—

Retrieve a project milestone

GET /api/v4/projects/{id}/milestones/{milestone_id}

Retrieves a specified project milestone.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
milestone_id
Path, required
IntegerThe ID of a project milestone

Responses

CodeDescriptionSchema
200OKAPIEntitiesMilestone
400Bad Request—
404Not Found—

Update a project milestone

PUT /api/v4/projects/{id}/milestones/{milestone_id}

Updates a specified project milestone.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
milestone_id
Path, required
IntegerThe milestone ID number

Request body (application/json)

PropertyTypeDescription
descriptionStringThe description of the milestone
due_dateStringThe due date of the milestone. The ISO 8601 date format (%Y-%m-%d)
start_dateStringThe start date of the milestone. The ISO 8601 date format (%Y-%m-%d)
state_eventStringThe state event of the milestone
Allowed values: close, activate
titleStringThe title of the milestone

Responses

CodeDescriptionSchema
200OKAPIEntitiesMilestone
400Bad Request—
404Not Found—

Delete a project milestone

DELETE /api/v4/projects/{id}/milestones/{milestone_id}

Deletes a specified project milestone. Only for users with the Planner, Reporter, Developer, Maintainer, or Owner role for the project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
milestone_id
Path, required
IntegerThe ID of a project milestone

Responses

CodeDescriptionSchema
204No Content—
400Bad Request—
404Not Found—

List all issues for a project milestone

GET /api/v4/projects/{id}/milestones/{milestone_id}/issues

Lists all issues assigned to a specified project milestone.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
milestone_id
Path, required
IntegerThe ID of a project milestone
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesIssueBasic
400Bad Request—
404Not Found—

List all merge requests for a project milestone

GET /api/v4/projects/{id}/milestones/{milestone_id}/merge_requests

Lists all merge requests assigned to a specified project milestone.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
milestone_id
Path, required
IntegerThe ID of a project milestone
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesMergeRequestBasic
400Bad Request—
404Not Found—

Promote a project milestone to a group milestone

POST /api/v4/projects/{id}/milestones/{milestone_id}/promote

Promotes a specified project milestone to a group milestone. Only for users with the Planner, Reporter, Developer, Maintainer, or Owner role for the group.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
milestone_id
Path, required
IntegerThe ID of a project milestone

Responses

CodeDescriptionSchema
201Created—
400Bad Request—
404Not Found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesCustomAttribute

PropertyTypeDescription
keyStringExample: foo
valueStringExample: bar

APIEntitiesIssuableReferences

PropertyTypeDescription
fullStringExample: test&6
relativeStringExample: &6
shortStringExample: &6

APIEntitiesIssuableTimeStats

PropertyTypeDescription
human_time_estimateStringExample: 3h 30m
human_total_time_spentStringExample: 1h
time_estimateIntegerExample: 12600
total_time_spentIntegerExample: 3600

APIEntitiesIssueBasic

PropertyTypeDescription
assigneeAPIEntitiesUserBasic—
assigneesAPIEntitiesUserBasic—
authorAPIEntitiesUserBasic—
closed_atString (date-time)Example: 2022-11-15T08:30:55.232Z
closed_byAPIEntitiesUserBasic—
confidentialBoolean—
created_atString (date-time)Example: 2022-08-17T12:46:35.053Z
descriptionStringExample: Repellendus impedit et vel velit dignissimos.
discussion_lockedBoolean—
downvotesInteger—
due_dateString (date)Example: 2022-11-20
idInteger (int64)Example: 84
iidIntegerExample: 14
issue_typeStringExample: issue
labelsArray of stringsExample: ["bug"]
merge_requests_countInteger—
milestoneAPIEntitiesMilestone—
project_idInteger (int64)Example: 4
start_dateString (date)Example: 2022-11-18
stateStringExample: closed
task_completion_statusAPIEntitiesTaskCompletionStatus—
time_statsAPIEntitiesIssuableTimeStats—
titleStringExample: Impedit et ut et dolores vero provident ullam est
typeStringOne of [“ISSUE”, “INCIDENT”, “TEST_CASE”, “REQUIREMENT”, “TASK”, “TICKET”]
Example: ISSUE
updated_atString (date-time)Example: 2022-11-14T17:22:01.470Z
upvotesInteger—
user_notes_countInteger—
web_urlStringExample: http://example.com/example/example/issues/14

APIEntitiesMergeRequestBasic

PropertyTypeDescription
allow_collaborationBoolean—
allow_maintainer_to_pushBoolean—
assigneeAPIEntitiesUserBasic—
assigneesAPIEntitiesUserBasic—
authorAPIEntitiesUserBasic—
blocking_discussions_resolvedBoolean—
closed_atString (date-time)Example: 2022-01-31T15:10:45.080Z
closed_byAPIEntitiesUserBasic—
created_atString (date-time)Example: 2022-08-17T12:46:35.053Z
descriptionStringExample: Repellendus impedit et vel velit dignissimos.
description_htmlString—
detailed_merge_statusStringExample: mergeable
discussion_lockedBoolean—
downvotesInteger—
draftBoolean—
force_remove_source_branchBoolean—
has_conflictsBoolean—
idInteger (int64)Example: 84
iidIntegerExample: 14
importedBoolean—
imported_fromStringExample: bitbucket
labelsArray of strings—
merge_afterString (date-time)Example: 2022-01-31T15:10:45.080Z
merge_commit_shaStringExample: 1234abcd
merge_statusStringExample: unchecked
merge_userAPIEntitiesUserBasic—
merge_when_pipeline_succeedsBoolean—
merged_atString (date-time)Example: 2022-01-31T15:10:45.080Z
merged_byAPIEntitiesUserBasic—
milestoneAPIEntitiesMilestone—
prepared_atString (date-time)Example: 2022-01-31T15:10:45.080Z
project_idInteger (int64)Example: 4
referenceStringExample: !1
referencesAPIEntitiesIssuableReferences—
reviewersAPIEntitiesUserBasic—
shaStringExample: 1234abcd
should_remove_source_branchBoolean—
source_branchString—
source_project_idInteger (int64)—
squashBoolean—
squash_commit_shaStringExample: 1234abcd
squash_on_mergeBoolean—
stateStringExample: closed
target_branchString—
target_project_idInteger (int64)—
task_completion_statusAPIEntitiesTaskCompletionStatus—
time_statsAPIEntitiesIssuableTimeStats—
titleStringExample: Impedit et ut et dolores vero provident ullam est
title_htmlString—
updated_atString (date-time)Example: 2022-11-14T17:22:01.470Z
upvotesInteger—
user_notes_countInteger—
web_urlStringExample: https://gitlab.example.com/my-group/my-project/-/merge_requests/1
work_in_progressBoolean—

APIEntitiesMilestone

PropertyTypeDescription
created_atString—
descriptionString—
due_dateString—
expiredBoolean—
group_idString—
idInteger (int64)—
iidInteger (int64)—
project_idInteger (int64)—
start_dateString—
stateString—
titleString—
updated_atString—
web_urlString—

APIEntitiesTaskCompletionStatus

PropertyTypeDescription
completed_countIntegerExample: 3
countIntegerExample: 5

APIEntitiesUserBasic

PropertyTypeDescription
avatar_pathStringExample: /user/avatar/28/The-Big-Lebowski-400-400.png
avatar_urlStringExample: https://gravatar.com/avatar/1
custom_attributesArray of APIEntitiesCustomAttribute—
idInteger (int64)Example: 1
lockedBoolean—
nameStringExample: Administrator
public_emailStringExample: john@example.com
stateStringExample: active
usernameStringExample: admin
web_urlStringExample: https://gitlab.example.com/root