2020-05-26 23:08:26 -04:00
---
stage: Plan
2020-11-02 16:09:10 -05:00
group: Product Planning
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-05-26 23:08:26 -04:00
---
2020-02-14 13:08:45 -05:00
# Epics API **(PREMIUM)**
2019-05-18 17:27:41 -04:00
2020-04-23 11:09:55 -04:00
> - Introduced in [GitLab Ultimate](https://about.gitlab.com/pricing/) 10.2.
2020-05-21 02:08:25 -04:00
> - Single-level Epics [were moved](https://gitlab.com/gitlab-org/gitlab/-/issues/37081) to [GitLab Premium](https://about.gitlab.com/pricing/) in 12.8.
2020-04-23 11:09:55 -04:00
2019-05-18 17:27:41 -04:00
Every API call to epic must be authenticated.
2020-12-17 19:10:04 -05:00
If a user is not a member of a private group, a `GET` request on that group results in a `404` status code.
2019-05-18 17:27:41 -04:00
2020-12-17 19:10:04 -05:00
If epics feature is not available a `403` status code is returned.
2019-05-18 17:27:41 -04:00
## Epic issues API
The [epic issues API ](epic_issues.md ) allows you to interact with issues associated with an epic.
2019-07-24 09:10:06 -04:00
## Milestone dates integration
2019-05-18 17:27:41 -04:00
2020-03-31 23:07:57 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6448) in GitLab 11.3.
2019-05-18 17:27:41 -04:00
2020-12-17 19:10:04 -05:00
Because start date and due date can be dynamically sourced from related issue milestones,
additional fields are shown when user has edit permission. These include two boolean
fields `start_date_is_fixed` and `due_date_is_fixed` , and four date fields `start_date_fixed` ,
`start_date_from_inherited_source` , `due_date_fixed` and `due_date_from_inherited_source` .
2019-05-18 17:27:41 -04:00
2019-10-23 08:06:18 -04:00
- `end_date` has been deprecated in favor of `due_date` .
- `start_date_from_milestones` has been deprecated in favor of `start_date_from_inherited_source`
- `due_date_from_milestones` has been deprecated in favor of `due_date_from_inherited_source`
2019-05-18 17:27:41 -04:00
## Epics pagination
By default, `GET` requests return 20 results at a time because the API results
are paginated.
2021-06-28 11:08:03 -04:00
Read more on [pagination ](index.md#pagination ).
2019-05-18 17:27:41 -04:00
2020-12-04 16:09:29 -05:00
WARNING:
2022-01-27 13:14:37 -05:00
In [GitLab 12.6 ](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20354 ) and later,
the `reference` attribute in responses is deprecated in favor of `references` .
2019-12-27 10:08:16 -05:00
2020-12-04 16:09:29 -05:00
NOTE:
2022-01-27 13:14:37 -05:00
`references.relative` is relative to the group that the epic is being requested from. When an epic
is fetched from its origin group, the `relative` format is the same as the `short` format.
When an epic is requested across groups, the `relative` format is expected to be the same as the `full` format.
2019-12-27 10:08:16 -05:00
2019-05-18 17:27:41 -04:00
## List epics for a group
2021-12-14 13:11:35 -05:00
> `parent_iid` and `_links[parent]` in response were [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/347527) in GitLab 14.6.
2019-05-18 17:27:41 -04:00
Gets all epics of the requested group and its subgroups.
2020-02-27 04:09:01 -05:00
```plaintext
2019-05-18 17:27:41 -04:00
GET /groups/:id/epics
GET /groups/:id/epics?author_id=5
GET /groups/:id/epics?labels=bug,reproduced
GET /groups/:id/epics?state=opened
```
| Attribute | Type | Required | Description |
| ------------------- | ---------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------- |
2021-06-28 11:08:03 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the group ](index.md#namespaced-path-encoding ) owned by the authenticated user |
2019-05-18 17:27:41 -04:00
| `author_id` | integer | no | Return epics created by the given user `id` |
2021-12-22 16:11:42 -05:00
| `author_username` | string | no | Return epics created by the user with the given `username` . Available in [GitLab 14.7 ](https://gitlab.com/gitlab-org/gitlab/-/issues/348257 ) and later |
2021-11-22 13:10:55 -05:00
| `labels` | string | no | Return epics matching a comma-separated list of labels names. Label names from the epic group or a parent group can be used |
2020-12-17 19:10:04 -05:00
| `with_labels_details` | boolean | no | If `true` , response returns more details for each label in labels field: `:name` , `:color` , `:description` , `:description_html` , `:text_color` . Default is `false` . Available in [GitLab 12.7 ](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/21413 ) and later |
2021-06-18 08:10:03 -04:00
| `order_by` | string | no | Return epics ordered by `created_at` , `updated_at` , or `title` fields. Default is `created_at` |
2019-05-18 17:27:41 -04:00
| `sort` | string | no | Return epics sorted in `asc` or `desc` order. Default is `desc` |
| `search` | string | no | Search epics against their `title` and `description` |
| `state` | string | no | Search epics against their `state` , possible filters: `opened` , `closed` and `all` , default: `all` |
2020-10-30 17:08:52 -04:00
| `created_after` | datetime | no | Return epics created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
| `created_before` | datetime | no | Return epics created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
| `updated_after` | datetime | no | Return epics updated on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
| `updated_before` | datetime | no | Return epics updated on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
2019-09-16 17:06:30 -04:00
| `include_ancestor_groups` | boolean | no | Include epics from the requested group's ancestors. Default is `false` |
| `include_descendant_groups` | boolean | no | Include epics from the requested group's descendants. Default is `true` |
2020-12-17 19:10:04 -05:00
| `my_reaction_emoji` | string | no | Return epics reacted by the authenticated user by the given emoji. `None` returns epics not given a reaction. `Any` returns epics given at least one reaction. Available in [GitLab 13.0 ](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31479 ) and later |
2021-12-22 16:11:42 -05:00
| `not` | Hash | no | Return epics that do not match the parameters supplied. Accepts: `author_id` , `author_username` ([GitLab 14.7](https://gitlab.com/gitlab-org/gitlab/-/issues/348257) and later) and `labels` . Available in [GitLab 14.6 ](https://gitlab.com/gitlab-org/gitlab/-/issues/347525 ) and later |
2019-05-18 17:27:41 -04:00
2020-01-30 10:09:15 -05:00
```shell
2020-05-27 20:08:37 -04:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/groups/1/epics"
2019-05-18 17:27:41 -04:00
```
Example response:
```json
[
{
"id": 29,
"iid": 4,
"group_id": 7,
2020-04-09 08:09:24 -04:00
"parent_id": 23,
2021-12-14 13:11:35 -05:00
"parent_iid": 3,
2019-05-18 17:27:41 -04:00
"title": "Accusamus iste et ullam ratione voluptatem omnis debitis dolor est.",
"description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.",
"state": "opened",
2020-04-09 17:09:19 -04:00
"confidential": "false",
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/groups/test/-/epics/4",
2019-08-15 12:19:25 -04:00
"reference": "& 4",
2019-12-27 10:08:16 -05:00
"references": {
"short": "& 4",
"relative": "& 4",
"full": "test& 4"
},
"author": {
"id": 10,
"name": "Lu Mayer",
"username": "kam",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/018729e129a6f31c80a6327a30196823?s=80& d=identicon",
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/kam"
2019-12-27 10:08:16 -05:00
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
"start_date_from_milestones": null, //deprecated in favor of start_date_from_inherited_source
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", //deprecated in favor of due_date
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
"due_date_from_milestones": "2018-07-31", //deprecated in favor of start_date_from_inherited_source
"due_date_from_inherited_source": "2018-07-31",
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
"closed_at": "2018-08-18T12:22:05.239Z",
"labels": [],
"upvotes": 4,
2020-08-12 08:10:25 -04:00
"downvotes": 0,
2022-02-24 16:15:17 -05:00
"color": "#1068bf",
2020-08-12 08:10:25 -04:00
"_links":{
"self": "http://gitlab.example.com/api/v4/groups/7/epics/4",
"epic_issues": "http://gitlab.example.com/api/v4/groups/7/epics/4/issues",
2021-12-14 13:11:35 -05:00
"group":"http://gitlab.example.com/api/v4/groups/7",
"parent":"http://gitlab.example.com/api/v4/groups/7/epics/3"
2020-08-12 08:10:25 -04:00
}
2019-12-27 10:08:16 -05:00
},
{
"id": 50,
"iid": 35,
"group_id": 17,
2020-04-09 08:09:24 -04:00
"parent_id": 19,
2021-12-14 13:11:35 -05:00
"parent_iid": 1,
2019-12-27 10:08:16 -05:00
"title": "Accusamus iste et ullam ratione voluptatem omnis debitis dolor est.",
"description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.",
"state": "opened",
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/groups/test/sample/-/epics/35",
2019-12-27 10:08:16 -05:00
"reference": "& 4",
"references": {
"short": "& 4",
"relative": "sample& 4",
"full": "test/sample& 4"
},
2019-05-18 17:27:41 -04:00
"author": {
"id": 10,
"name": "Lu Mayer",
"username": "kam",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/018729e129a6f31c80a6327a30196823?s=80& d=identicon",
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/kam"
2019-05-18 17:27:41 -04:00
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
2019-10-23 08:06:18 -04:00
"start_date_from_milestones": null, //deprecated in favor of start_date_from_inherited_source
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", //deprecated in favor of due_date
2019-05-18 17:27:41 -04:00
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
2019-10-23 08:06:18 -04:00
"due_date_from_milestones": "2018-07-31", //deprecated in favor of start_date_from_inherited_source
"due_date_from_inherited_source": "2018-07-31",
2019-05-18 17:27:41 -04:00
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
2019-10-01 14:06:28 -04:00
"closed_at": "2018-08-18T12:22:05.239Z",
2019-05-18 17:27:41 -04:00
"labels": [],
"upvotes": 4,
2020-08-12 08:10:25 -04:00
"downvotes": 0,
2022-02-24 16:15:17 -05:00
"color": "#1068bf",
2020-08-12 08:10:25 -04:00
"_links":{
"self": "http://gitlab.example.com/api/v4/groups/17/epics/35",
"epic_issues": "http://gitlab.example.com/api/v4/groups/17/epics/35/issues",
2021-12-14 13:11:35 -05:00
"group":"http://gitlab.example.com/api/v4/groups/17",
"parent":"http://gitlab.example.com/api/v4/groups/17/epics/1"
2020-08-12 08:10:25 -04:00
}
2019-05-18 17:27:41 -04:00
}
]
```
## Single epic
2021-12-14 13:11:35 -05:00
> `parent_iid` and `_links[parent]` in response were [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/347527) in GitLab 14.6.
2019-05-18 17:27:41 -04:00
Gets a single epic
2020-02-27 04:09:01 -05:00
```plaintext
2019-05-18 17:27:41 -04:00
GET /groups/:id/epics/:epic_iid
```
| Attribute | Type | Required | Description |
| ------------------- | ---------------- | ---------- | ---------------------------------------------------------------------------------------|
2021-06-28 11:08:03 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the group ](index.md#namespaced-path-encoding ) owned by the authenticated user |
2020-03-13 05:09:23 -04:00
| `epic_iid` | integer/string | yes | The internal ID of the epic. |
2019-05-18 17:27:41 -04:00
2020-01-30 10:09:15 -05:00
```shell
2020-05-27 20:08:37 -04:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/groups/1/epics/5"
2019-05-18 17:27:41 -04:00
```
Example response:
```json
{
"id": 30,
"iid": 5,
"group_id": 7,
2021-12-14 13:11:35 -05:00
"parent_id": null,
"parent_iid": null,
2019-05-18 17:27:41 -04:00
"title": "Ea cupiditate dolores ut vero consequatur quasi veniam voluptatem et non.",
"description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.",
"state": "opened",
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/groups/test/-/epics/5",
2019-08-15 12:19:25 -04:00
"reference": "& 5",
2019-12-27 10:08:16 -05:00
"references": {
"short": "& 5",
"relative": "& 5",
"full": "test& 5"
},
2019-05-18 17:27:41 -04:00
"author":{
"id": 7,
"name": "Pamella Huel",
"username": "arnita",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/a2f5c6fcef64c9c69cb8779cb292be1b?s=80& d=identicon",
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/arnita"
2019-05-18 17:27:41 -04:00
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
2019-10-23 08:06:18 -04:00
"start_date_from_milestones": null, //deprecated in favor of start_date_from_inherited_source
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", //deprecated in favor of due_date
2019-05-18 17:27:41 -04:00
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
2019-10-23 08:06:18 -04:00
"due_date_from_milestones": "2018-07-31", //deprecated in favor of start_date_from_inherited_source
"due_date_from_inherited_source": "2018-07-31",
2019-05-18 17:27:41 -04:00
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
2019-10-01 14:06:28 -04:00
"closed_at": "2018-08-18T12:22:05.239Z",
2019-05-18 17:27:41 -04:00
"labels": [],
"upvotes": 4,
2019-10-16 08:06:32 -04:00
"downvotes": 0,
2022-02-24 16:15:17 -05:00
"color": "#1068bf",
2020-08-12 08:10:25 -04:00
"subscribed": true,
"_links":{
"self": "http://gitlab.example.com/api/v4/groups/7/epics/5",
"epic_issues": "http://gitlab.example.com/api/v4/groups/7/epics/5/issues",
2021-12-14 13:11:35 -05:00
"group":"http://gitlab.example.com/api/v4/groups/7",
"parent": null
2020-08-12 08:10:25 -04:00
}
2019-05-18 17:27:41 -04:00
}
```
## New epic
2021-12-14 13:11:35 -05:00
> `parent_iid` and `_links[parent]` in response were [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/347527) in GitLab 14.6.
2019-05-18 17:27:41 -04:00
Creates a new epic.
2020-12-04 16:09:29 -05:00
NOTE:
2020-03-31 23:07:57 -04:00
Starting with GitLab [11.3 ](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6448 ), `start_date` and `end_date` should no longer be assigned
2019-05-18 17:27:41 -04:00
directly, as they now represent composite values. You can configure it via the `*_is_fixed` and
`*_fixed` fields instead.
2020-02-27 04:09:01 -05:00
```plaintext
2019-05-18 17:27:41 -04:00
POST /groups/:id/epics
```
| Attribute | Type | Required | Description |
| ------------------- | ---------------- | ---------- | ---------------------------------------------------------------------------------------|
2021-06-28 11:08:03 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the group ](index.md#namespaced-path-encoding ) owned by the authenticated user |
2019-05-18 17:27:41 -04:00
| `title` | string | yes | The title of the epic |
2021-11-22 13:10:55 -05:00
| `labels` | string | no | The comma-separated list of labels |
2019-10-20 17:06:17 -04:00
| `description` | string | no | The description of the epic. Limited to 1,048,576 characters. |
2022-02-24 16:15:17 -05:00
| `color` | string | no | The color of the epic. [Introduced ](https://gitlab.com/gitlab-org/gitlab/-/issues/7641 ) in GitLab 14.8, behind a feature flag named `epic_highlight_color` (disabled by default) |
2020-09-12 08:09:44 -04:00
| `confidential` | boolean | no | Whether the epic should be confidential |
2020-12-17 19:10:04 -05:00
| `created_at` | string | no | When the epic was created. Date time string, ISO 8601 formatted, for example `2016-03-11T03:45:40Z` . Requires administrator or project/group owner privileges ([available](https://gitlab.com/gitlab-org/gitlab/-/issues/255309) in GitLab 13.5 and later) |
| `start_date_is_fixed` | boolean | no | Whether start date should be sourced from `start_date_fixed` or from milestones (in GitLab 11.3 and later) |
| `start_date_fixed` | string | no | The fixed start date of an epic (in GitLab 11.3 and later) |
| `due_date_is_fixed` | boolean | no | Whether due date should be sourced from `due_date_fixed` or from milestones (in GitLab 11.3 and later) |
| `due_date_fixed` | string | no | The fixed due date of an epic (in GitLab 11.3 and later) |
| `parent_id` | integer/string | no | The ID of a parent epic (in GitLab 11.11 and later) |
2019-05-18 17:27:41 -04:00
2020-01-30 10:09:15 -05:00
```shell
2021-12-14 13:11:35 -05:00
curl --request POST --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/groups/1/epics?title=Epic& description=Epic%20description& parent_id=29"
2019-05-18 17:27:41 -04:00
```
Example response:
```json
{
"id": 33,
"iid": 6,
"group_id": 7,
2021-12-14 13:11:35 -05:00
"parent_id": 29,
"parent_iid": 4,
2019-05-18 17:27:41 -04:00
"title": "Epic",
"description": "Epic description",
"state": "opened",
2020-04-09 17:09:19 -04:00
"confidential": "false",
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/groups/test/-/epics/6",
2019-08-15 12:19:25 -04:00
"reference": "& 6",
2019-12-27 10:08:16 -05:00
"references": {
"short": "& 6",
"relative": "& 6",
"full": "test& 6"
},
2019-05-18 17:27:41 -04:00
"author": {
"name" : "Alexandra Bashirian",
"avatar_url" : null,
"state" : "active",
"web_url" : "https://gitlab.example.com/eileen.lowe",
"id" : 18,
"username" : "eileen.lowe"
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
2019-10-23 08:06:18 -04:00
"start_date_from_milestones": null, //deprecated in favor of start_date_from_inherited_source
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", //deprecated in favor of due_date
2019-05-18 17:27:41 -04:00
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
2019-10-23 08:06:18 -04:00
"due_date_from_milestones": "2018-07-31", //deprecated in favor of start_date_from_inherited_source
"due_date_from_inherited_source": "2018-07-31",
2019-05-18 17:27:41 -04:00
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
2019-10-01 14:06:28 -04:00
"closed_at": "2018-08-18T12:22:05.239Z",
2019-05-18 17:27:41 -04:00
"labels": [],
"upvotes": 4,
2020-08-12 08:10:25 -04:00
"downvotes": 0,
2022-02-24 16:15:17 -05:00
"color": "#1068bf",
2020-08-12 08:10:25 -04:00
"_links":{
"self": "http://gitlab.example.com/api/v4/groups/7/epics/6",
"epic_issues": "http://gitlab.example.com/api/v4/groups/7/epics/6/issues",
2021-12-14 13:11:35 -05:00
"group":"http://gitlab.example.com/api/v4/groups/7",
"parent": "http://gitlab.example.com/api/v4/groups/7/epics/4"
2020-08-12 08:10:25 -04:00
}
2019-05-18 17:27:41 -04:00
}
```
## Update epic
2021-12-14 13:11:35 -05:00
> `parent_iid` and `_links[parent]` in response were [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/347527) in GitLab 14.6.
2019-05-18 17:27:41 -04:00
Updates an epic.
2020-12-04 16:09:29 -05:00
NOTE:
2020-03-31 23:07:57 -04:00
Starting with GitLab [11.3 ](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/6448 ), `start_date` and `end_date` should no longer be assigned
2019-05-18 17:27:41 -04:00
directly, as they now represent composite values. You can configure it via the `*_is_fixed` and
`*_fixed` fields instead.
2020-02-27 04:09:01 -05:00
```plaintext
2019-05-18 17:27:41 -04:00
PUT /groups/:id/epics/:epic_iid
```
| Attribute | Type | Required | Description |
| ------------------- | ---------------- | ---------- | ---------------------------------------------------------------------------------------|
2021-06-28 11:08:03 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the group ](index.md#namespaced-path-encoding ) owned by the authenticated user |
2020-03-13 05:09:23 -04:00
| `epic_iid` | integer/string | yes | The internal ID of the epic |
2021-12-27 13:15:47 -05:00
| `add_labels` | string | no | Comma-separated label names to add to an issue. |
2020-09-12 08:09:44 -04:00
| `confidential` | boolean | no | Whether the epic should be confidential |
2021-12-27 13:15:47 -05:00
| `description` | string | no | The description of an epic. Limited to 1,048,576 characters. |
| `due_date_fixed` | string | no | The fixed due date of an epic (in GitLab 11.3 and later) |
| `due_date_is_fixed` | boolean | no | Whether due date should be sourced from `due_date_fixed` or from milestones (in GitLab 11.3 and later) |
2020-11-05 07:09:05 -05:00
| `labels` | string | no | Comma-separated label names for an issue. Set to an empty string to unassign all labels. |
2021-12-27 13:15:47 -05:00
| `parent_id` | integer/string | no | The ID of a parent epic. Available in [GitLab 14.6 ](https://gitlab.com/gitlab-org/gitlab/-/issues/348123 ) and later |
2020-11-05 07:09:05 -05:00
| `remove_labels` | string | no | Comma-separated label names to remove from an issue. |
2020-12-17 19:10:04 -05:00
| `start_date_fixed` | string | no | The fixed start date of an epic (in GitLab 11.3 and later) |
2021-12-27 13:15:47 -05:00
| `start_date_is_fixed` | boolean | no | Whether start date should be sourced from `start_date_fixed` or from milestones (in GitLab 11.3 and later) |
2020-12-17 19:10:04 -05:00
| `state_event` | string | no | State event for an epic. Set `close` to close the epic and `reopen` to reopen it (in GitLab 11.4 and later) |
2021-12-27 13:15:47 -05:00
| `title` | string | no | The title of an epic |
| `updated_at` | string | no | When the epic was updated. Date time string, ISO 8601 formatted, for example `2016-03-11T03:45:40Z` . Requires administrator or project/group owner privileges ([available](https://gitlab.com/gitlab-org/gitlab/-/issues/255309) in GitLab 13.5 and later) |
2022-02-24 16:15:17 -05:00
| `color` | string | no | The color of the epic. [Introduced ](https://gitlab.com/gitlab-org/gitlab/-/issues/7641 ) in GitLab 14.8, behind a feature flag named `epic_highlight_color` (disabled by default) |
2019-05-18 17:27:41 -04:00
2020-01-30 10:09:15 -05:00
```shell
2021-12-27 13:15:47 -05:00
curl --request PUT --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/groups/1/epics/5?title=New%20Title& parent_id=29"
2019-05-18 17:27:41 -04:00
```
Example response:
```json
{
"id": 33,
"iid": 6,
"group_id": 7,
2021-12-27 13:15:47 -05:00
"parent_id": 29,
"parent_iid": 4,
2019-05-18 17:27:41 -04:00
"title": "New Title",
"description": "Epic description",
"state": "opened",
2020-04-09 17:09:19 -04:00
"confidential": "false",
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/groups/test/-/epics/6",
2019-08-15 12:19:25 -04:00
"reference": "& 6",
2019-12-27 10:08:16 -05:00
"references": {
"short": "& 6",
"relative": "& 6",
"full": "test& 6"
},
2019-05-18 17:27:41 -04:00
"author": {
"name" : "Alexandra Bashirian",
"avatar_url" : null,
"state" : "active",
"web_url" : "https://gitlab.example.com/eileen.lowe",
"id" : 18,
"username" : "eileen.lowe"
},
"start_date": null,
"start_date_is_fixed": false,
"start_date_fixed": null,
2019-10-23 08:06:18 -04:00
"start_date_from_milestones": null, //deprecated in favor of start_date_from_inherited_source
"start_date_from_inherited_source": null,
"end_date": "2018-07-31", //deprecated in favor of due_date
2019-05-18 17:27:41 -04:00
"due_date": "2018-07-31",
"due_date_is_fixed": false,
"due_date_fixed": null,
2019-10-23 08:06:18 -04:00
"due_date_from_milestones": "2018-07-31", //deprecated in favor of start_date_from_inherited_source
"due_date_from_inherited_source": "2018-07-31",
2019-05-18 17:27:41 -04:00
"created_at": "2018-07-17T13:36:22.770Z",
"updated_at": "2018-07-18T12:22:05.239Z",
2019-10-01 14:06:28 -04:00
"closed_at": "2018-08-18T12:22:05.239Z",
2019-05-18 17:27:41 -04:00
"labels": [],
"upvotes": 4,
2022-02-24 16:15:17 -05:00
"downvotes": 0,
"color": "#1068bf"
2019-05-18 17:27:41 -04:00
}
```
## Delete epic
Deletes an epic
2020-02-27 04:09:01 -05:00
```plaintext
2019-05-18 17:27:41 -04:00
DELETE /groups/:id/epics/:epic_iid
```
| Attribute | Type | Required | Description |
| ------------------- | ---------------- | ---------- | ---------------------------------------------------------------------------------------|
2021-06-28 11:08:03 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the group ](index.md#namespaced-path-encoding ) owned by the authenticated user |
2020-03-13 05:09:23 -04:00
| `epic_iid` | integer/string | yes | The internal ID of the epic. |
2019-05-18 17:27:41 -04:00
2020-01-30 10:09:15 -05:00
```shell
2020-05-27 20:08:37 -04:00
curl --request DELETE --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/groups/1/epics/5"
2019-05-18 17:27:41 -04:00
```
2020-10-28 14:08:52 -04:00
## Create a to-do item
2019-05-18 17:27:41 -04:00
2020-10-28 14:08:52 -04:00
Manually creates a to-do item for the current user on an epic. If
there already exists a to-do item for the user on that epic, status code `304` is
2019-05-18 17:27:41 -04:00
returned.
2020-02-27 04:09:01 -05:00
```plaintext
2019-05-18 17:27:41 -04:00
POST /groups/:id/epics/:epic_iid/todo
```
| Attribute | Type | Required | Description |
|-------------|---------|----------|--------------------------------------|
2021-06-28 11:08:03 -04:00
| `id` | integer/string | yes | The ID or [URL-encoded path of the group ](index.md#namespaced-path-encoding ) owned by the authenticated user |
2019-07-08 23:28:41 -04:00
| `epic_iid` | integer | yes | The internal ID of a group's epic |
2019-05-18 17:27:41 -04:00
2020-01-30 10:09:15 -05:00
```shell
2020-05-27 20:08:37 -04:00
curl --request POST --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/groups/1/epics/5/todo"
2019-05-18 17:27:41 -04:00
```
Example response:
```json
{
"id": 112,
"group": {
"id": 1,
"name": "Gitlab",
"path": "gitlab",
"kind": "group",
"full_path": "base/gitlab",
"parent_id": null
},
"author": {
"name": "Administrator",
"username": "root",
"id": 1,
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80& d=identicon",
"web_url": "https://gitlab.example.com/root"
},
"action_name": "marked",
"target_type": "epic",
"target": {
"id": 30,
"iid": 5,
"group_id": 1,
"title": "Ea cupiditate dolores ut vero consequatur quasi veniam voluptatem et non.",
"description": "Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum.",
"author":{
"id": 7,
"name": "Pamella Huel",
"username": "arnita",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/a2f5c6fcef64c9c69cb8779cb292be1b?s=80& d=identicon",
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/arnita"
2019-05-18 17:27:41 -04:00
},
2020-08-12 08:10:25 -04:00
"web_url": "http://gitlab.example.com/groups/test/-/epics/5",
2019-12-27 10:08:16 -05:00
"reference": "& 5",
"references": {
"short": "& 5",
"relative": "& 5",
"full": "test& 5"
},
2019-05-18 17:27:41 -04:00
"start_date": null,
"end_date": null,
"created_at": "2018-01-21T06:21:13.165Z",
2019-10-01 14:06:28 -04:00
"updated_at": "2018-01-22T12:41:41.166Z",
"closed_at": "2018-08-18T12:22:05.239Z"
2019-05-18 17:27:41 -04:00
},
"target_url": "https://gitlab.example.com/groups/epics/5",
"body": "Vel voluptas atque dicta mollitia adipisci qui at.",
"state": "pending",
"created_at": "2016-07-01T11:09:13.992Z"
}
```