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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
stateQuery | String | Return “active”, Allowed values: active,closed,allDefault: all |
iidsQuery | Array of integers | Return only the milestones having the given iid.include_ is true |
titleQuery | String | The title of the milestones |
searchQuery | String | The search criteria for the title or description of the milestone |
search_Query | String | The search criteria for the title of the milestone |
include_Query | Boolean | If true,include_ instead.include_ |
include_Query | Boolean | Include milestones from all parent groups.include_ |
updated_Query | String (date- | Return milestones updated before the specified datetime. |
updated_Query | String (date- | Return milestones updated after the specified datetime. |
containing_Query | String (date- | Return milestones where start_ |
start_Query | String (date- | Return milestones where due_ |
end_Query | String (date- | Return milestones where start_ |
sortQuery | String | Return milestones sorted in the given order Allowed values: due_,due_,start_,start_,name_,name_,created_,created_,updated_,updated_Default: due_ |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
include_Query | Boolean | If true, |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Create a group milestone
POST /api/v4/groups/{id}/milestones
Creates a milestone for the specified group.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
description | String | The description of the milestone |
due_ | String | Due date of the milestone,YYYY-) |
start_ | String | Start date of the milestone,YYYY-) |
titleRequired | String | The title of the milestone |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a group milestone
GET /api/v4/groups/{id}/milestones/{milestone_id}
Retrieves a specified group milestone.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
milestone_Path, | Integer | ID of the group milestone |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Update a group milestone
PUT /api/v4/groups/{id}/milestones/{milestone_id}
Updates the specified group milestone.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
milestone_Path, | Integer | The milestone ID number |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
description | String | The description of the milestone.title,description,start_,due_,state_ must be provided |
due_ | String | Due date of the milestone,YYYY-).title,description,start_,due_,state_ must be provided |
start_ | String | Start date of the milestone,YYYY-).title,description,start_,due_,state_ must be provided |
state_ | String | State event of the milestone.title,description,start_,due_,state_ must be providedAllowed values: close,activate |
title | String | The title of the milestone.title,description,start_,due_,state_ must be provided |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete a group milestone
DELETE /api/v4/groups/{id}/milestones/{milestone_id}
Deletes the specified group milestone.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
milestone_Path, | Integer | ID of the group milestone |
Responses
| Code | Description | Schema |
|---|---|---|
204 | 204 No Content | — |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
milestone_Path, | Integer | ID of the group milestone |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
milestone_Path, | Integer | ID of the group milestone |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all project milestones
GET /api/v4/projects/{id}/milestones
Lists all milestones for a specified project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
stateQuery | String | Return “active”, Allowed values: active,closed,allDefault: all |
iidsQuery | Array of integers | Return only the milestones having the given iid.include_ is true |
titleQuery | String | The title of the milestones |
searchQuery | String | The search criteria for the title or description of the milestone |
search_Query | String | The search criteria for the title of the milestone |
include_Query | Boolean | If true,include_ instead.include_ |
include_Query | Boolean | Include milestones from all parent groups.include_ |
updated_Query | String (date- | Return milestones updated before the specified datetime. |
updated_Query | String (date- | Return milestones updated after the specified datetime. |
containing_Query | String (date- | Return milestones where start_ |
start_Query | String (date- | Return milestones where due_ |
end_Query | String (date- | Return milestones where start_ |
sortQuery | String | Return milestones sorted in the given order Allowed values: due_,due_,start_,start_,name_,name_,created_,created_,updated_,updated_Default: due_ |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Create a project milestone
POST /api/v4/projects/{id}/milestones
Creates a project milestone.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
description | String | The description of the milestone |
due_ | String | Due date of the milestone,YYYY-) |
start_ | String | Start date of the milestone,YYYY-) |
titleRequired | String | The title of the milestone |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a project milestone
GET /api/v4/projects/{id}/milestones/{milestone_id}
Retrieves a specified project milestone.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
milestone_Path, | Integer | ID of the project milestone |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Update a project milestone
PUT /api/v4/projects/{id}/milestones/{milestone_id}
Updates a specified project milestone.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
milestone_Path, | Integer | The milestone ID number |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
description | String | The description of the milestone.title,description,start_,due_,state_ must be provided |
due_ | String | Due date of the milestone,YYYY-).title,description,start_,due_,state_ must be provided |
start_ | String | Start date of the milestone,YYYY-).title,description,start_,due_,state_ must be provided |
state_ | String | State event of the milestone.title,description,start_,due_,state_ must be providedAllowed values: close,activate |
title | String | The title of the milestone.title,description,start_,due_,state_ must be provided |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
milestone_Path, | Integer | ID of the project milestone |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | — |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
milestone_Path, | Integer | ID of the project milestone |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
milestone_Path, | Integer | ID of the project milestone |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
milestone_Path, | Integer | ID of the project milestone |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |
APIEntitiesIssuableReferences
| Property | Type | Description |
|---|---|---|
full | String | Example:test&6 |
relative | String | Example:&6 |
short | String | Example:&6 |
APIEntitiesIssuableTimeStats
| Property | Type | Description |
|---|---|---|
human_ | String | Example:3h 30m |
human_ | String | Example:1h |
time_ | Integer | Example:12600 |
total_ | Integer | Example:3600 |
APIEntitiesIssueBasic
| Property | Type | Description |
|---|---|---|
assignee | APIEntities | — |
assignees | Array of APIEntities | — |
author | APIEntities | — |
closed_ | String (date- | Example:2022- |
closed_ | APIEntities | — |
confidential | Boolean | — |
created_ | String (date- | Example:2022- |
description | String | Example:Repellendus impedit et vel velit dignissimos. |
discussion_ | Boolean | — |
downvotes | Integer | — |
due_ | String (date) | Example:2022- |
id | Integer (int64) | Example:84 |
iid | Integer | Example:14 |
issue_ | String | Example:issue |
labels | Array of strings | Example:["bug"] |
merge_ | Integer | — |
milestone | APIEntities | — |
project_ | Integer (int64) | Example:4 |
start_ | String (date) | Example:2022- |
state | String | Example:closed |
task_ | APIEntities | — |
time_ | APIEntities | — |
title | String | Example:Impedit et ut et dolores vero provident ullam est |
type | String | The type of the issue Allowed values: ISSUE,INCIDENT,TEST_,REQUIREMENT,TASK,TICKETExample: ISSUE |
updated_ | String (date- | Example:2022- |
upvotes | Integer | — |
user_ | Integer | — |
web_ | String | Example:http: |
APIEntitiesMergeRequestAuthor
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
bot | Boolean | If true,Example: false |
custom_ | Array of APIEntities | — |
id | Integer (int64) | ID of the user Example: 1 |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |
APIEntitiesMergeRequestBasic
| Property | Type | Description |
|---|---|---|
allow_ | Boolean | If true, |
allow_ | Boolean | Returned only for merge requests from forks.allow_ instead |
assignee | APIEntities | First user assigned to the merge request.assignees instead |
assignees | Array of APIEntities | Users assigned to the merge request |
author | APIEntities | User who created the merge request |
blocking_ | Boolean | If true,true if the project does not require all threads to be resolved before merge |
closed_ | String (date- | Timestamp of when the merge request was closed Example: 2022- |
closed_ | APIEntities | User who closed the merge request.null if the merge request is not closed |
created_ | String (date- | Example:2022- |
description | String | Example:Repellendus impedit et vel velit dignissimos. |
description_ | String | Description of the merge request rendered as HTML.render_ is true |
detailed_ | String | Detailed merge status of the merge request.approvals_ (approvals are syncing),checking (Git is testing whether a valid merge is possible),ci_ (a CI/ci_ (a CI/commits_ (the source branch must exist and contain commits),conflict (conflicts exist between the source and target branches),discussions_ (all discussions must be resolved before merge),draft_ (the merge request is a draft),jira_ (the title or description must reference a Jira issue),locked_ (LFS files locked by other users must be unlocked before merge),locked_ (paths locked by other users must be unlocked before merging to the default branch),merge_ (blocked by another merge request),merge_ (cannot be merged until after the specified time),mergeable (the branch can merge cleanly into the target branch),need_ (the merge request must be rebased),not_ (approval is required before merge),not_ (the merge request must be open before merge),preparing (the merge request diff is being created),requested_ (reviewers have requested changes),security_ (when security policies are enforced,security_ (all security policies must be satisfied),status_ (all status checks must pass before merge),title_ (the title must match the regular expression set in the project settings),unchecked (Git has not yet tested whether a valid merge is possible)Example: mergeable |
discussion_ | Boolean | If true, |
downvotes | Integer | Number of downvotes for the merge request |
draft | Boolean | If true, |
force_ | Boolean | If true, |
has_ | Boolean | If true,false unless merge_ is cannot_ |
id | Integer (int64) | Example:84 |
iid | Integer | Example:14 |
imported | Boolean | If true, |
imported_ | String | Source of the import,bitbucketExample: bitbucket |
labels | Array of strings | Names of the labels assigned to the merge request,with_ is true,id,name,color,text_,description,description_ and archived instead |
merge_ | String (date- | If set, Example: 2022- |
merge_ | String | SHA of the merge commit.null until the merge request is mergedExample: 1234abcd |
merge_ | String | Status of the merge request.unchecked,checking,can_,cannot_ or cannot_.has_.detailed_ insteadExample: unchecked |
merge_ | APIEntities | User who merged the merge request or set it to auto-null |
merge_ | Boolean | If true, |
merged_ | String (date- | Timestamp of when the merge request was merged Example: 2022- |
merged_ | APIEntities | User who merged the merge request or set it to auto-merge_ instead |
milestone | APIEntities | Milestone assigned to the merge request |
prepared_ | String (date- | Timestamp of when the merge request was prepared. Example: 2022- |
project_ | Integer (int64) | Example:4 |
reference | String | Internal reference of the merge request,references insteadExample: !1 |
references | APIEntities | Internal references of the merge request:short,relative and full.relative matches short.relative matches full |
reviewers | Array of APIEntities | Reviewers of the merge request |
sha | String | SHA of the head commit of the source branch Example: 1234abcd |
should_ | Boolean | If true, |
source_ | String | Name of the source branch |
source_ | Integer (int64) | ID of the source project.target_, |
squash | Boolean | If true,squash_ to take them into account |
squash_ | String | SHA of the squash commit. Example: 1234abcd |
squash_ | Boolean | If true, |
state | String | Example:closed |
target_ | String | Name of the target branch |
target_ | Integer (int64) | ID of the target project |
task_ | APIEntities | Completion status of the task list:count and completed_ |
time_ | APIEntities | Time tracking statistics of the merge request:time_,total_,human_ and human_ |
title | String | Example:Impedit et ut et dolores vero provident ullam est |
title_ | String | Title of the merge request rendered as HTML.render_ is true |
updated_ | String (date- | Example:2022- |
upvotes | Integer | Number of upvotes for the merge request |
user_ | Integer | Number of user comments on the merge request |
web_ | String | Web URL of the merge request Example: https: |
work_ | Boolean | If true,draft instead |
APIEntitiesMilestone
| Property | Type | Description |
|---|---|---|
created_ | String | — |
description | String | — |
due_ | String | — |
expired | Boolean | — |
group_ | String | — |
id | Integer (int64) | — |
iid | Integer (int64) | — |
project_ | Integer (int64) | — |
start_ | String | — |
state | String | — |
title | String | — |
updated_ | String | — |
web_ | String | — |
APIEntitiesTaskCompletionStatus
| Property | Type | Description |
|---|---|---|
completed_ | Integer | Example:3 |
count | Integer | Example:5 |
APIEntitiesUserBasic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | ID of the user Example: 1 |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |