summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-04-07 08:45:35 +0000
committerRémy Coutable <remy@rymai.me>2016-04-07 08:45:35 +0000
commit92897d7683bdf17da9708e065465d55ecd808dff (patch)
tree97a5ed37f718928665ce792d16c65dff9724243a /doc/api
parent8eae7b10888826bf3497fc219ee59435288c4cc6 (diff)
parente6215a9a8ed20354782120a7ce6368c7e8aab9a5 (diff)
downloadgitlab-ce-92897d7683bdf17da9708e065465d55ecd808dff.tar.gz
Merge branch 'api-filter-milestone' into 'master'
API: Ability to filter milestones by state Ability to filter milestones by `active` and `closed` state. * Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14931 See merge request !3566
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/milestones.md20
1 files changed, 16 insertions, 4 deletions
diff --git a/doc/api/milestones.md b/doc/api/milestones.md
index a6828728264..e4202025f80 100644
--- a/doc/api/milestones.md
+++ b/doc/api/milestones.md
@@ -7,8 +7,24 @@ Returns a list of project milestones.
```
GET /projects/:id/milestones
GET /projects/:id/milestones?iid=42
+GET /projects/:id/milestones?state=active
+GET /projects/:id/milestones?state=closed
```
+Parameters:
+
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer | yes | The ID of a project |
+| `iid` | integer | optional | Return only the milestone having the given `iid` |
+| `state` | string | optional | Return only `active` or `closed` milestones` |
+
+```bash
+curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/milestones
+```
+
+Example Response:
+
```json
[
{
@@ -25,10 +41,6 @@ GET /projects/:id/milestones?iid=42
]
```
-Parameters:
-
-- `id` (required) - The ID of a project
-- `iid` (optional) - Return the milestone having the given `iid`
## Get single milestone