debian-mirror-gitlab/doc/api/group_iterations.md

63 lines
2.4 KiB
Markdown
Raw Normal View History

2021-01-03 14:25:43 +05:30
---
stage: Plan
group: Project Management
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2021-01-03 14:25:43 +05:30
---
2021-03-11 19:13:27 +05:30
# Group iterations API **(PREMIUM)**
2021-01-03 14:25:43 +05:30
2021-03-11 19:13:27 +05:30
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/118742) in GitLab 13.5.
> - Moved to GitLab Premium in 13.9.
2021-01-03 14:25:43 +05:30
This page describes the group iterations API.
2021-01-29 00:20:46 +05:30
There's a separate [project iterations API](iterations.md) page.
2021-01-03 14:25:43 +05:30
## List group iterations
Returns a list of group iterations.
```plaintext
GET /groups/:id/iterations
GET /groups/:id/iterations?state=opened
GET /groups/:id/iterations?state=closed
GET /groups/:id/iterations?search=version
2023-01-13 00:05:48 +05:30
GET /groups/:id/iterations?include_ancestors=false
2023-05-27 22:25:52 +05:30
GET /groups/:id/iterations?updated_before=2013-10-02T09%3A24%3A18Z
GET /groups/:id/iterations?updated_after=2013-10-02T09%3A24%3A18Z
2021-01-03 14:25:43 +05:30
```
| Attribute | Type | Required | Description |
| ------------------- | ------- | -------- | ----------- |
2023-07-09 08:55:56 +05:30
| `state` | string | no | 'Return `opened`, `upcoming`, `current`, `closed`, or `all` iterations.' |
2021-01-03 14:25:43 +05:30
| `search` | string | no | Return only iterations with a title matching the provided string. |
| `include_ancestors` | boolean | no | Include iterations from parent group and its ancestors. Defaults to `true`. |
2023-05-27 22:25:52 +05:30
| `updated_before` | datetime | no | Return only iterations updated before the given datetime. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/378662) in GitLab 15.10. |
| `updated_after` | datetime | no | Return only iterations updated after the given datetime. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/378662) in GitLab 15.10. |
2021-01-03 14:25:43 +05:30
Example request:
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/iterations"
```
Example response:
```json
[
{
"id": 53,
"iid": 13,
2022-03-02 08:16:31 +05:30
"sequence": 1,
2021-01-03 14:25:43 +05:30
"group_id": 5,
"title": "Iteration II",
"description": "Ipsum Lorem ipsum",
"state": 2,
"created_at": "2020-01-27T05:07:12.573Z",
"updated_at": "2020-01-27T05:07:12.573Z",
"due_date": "2020-02-01",
2021-03-11 19:13:27 +05:30
"start_date": "2020-02-14",
"web_url": "http://gitlab.example.com/groups/my-group/-/iterations/13"
2021-01-03 14:25:43 +05:30
}
]
```