diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-04 12:54:08 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-04 12:54:08 +0000 |
commit | 0bcc323928fa3a794aea5ce190319ebea89ca1ad (patch) | |
tree | 1c5c8fd06db82989469535d5d389788c292b4d8e /doc/api | |
parent | 18e4e997644aa0772153938106e4fc798a12e10f (diff) | |
parent | 0ac4a933ffae00adc4b7ab58af9bef15ed8c412b (diff) | |
download | gitlab-ce-0bcc323928fa3a794aea5ce190319ebea89ca1ad.tar.gz |
Merge branch 'api/issues-filter-labels' into 'master'
API: Filter issues by labels
While working on [laboard](https://gitlab.com/jubianchi/laboard) I had some issues with the API : I was not able to filter issues by labels so I had to write some logic to do it on my side.
I think it will be useful to have this feature supported by the Gitlab API.
I added the filtering logic on `/issues` and `/projects/:id/issues`.
The commits are not squashed but I'll do it once everything seems ok to you.
See merge request !169
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/issues.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/api/issues.md b/doc/api/issues.md index c12d4528546..a935b146d37 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -9,11 +9,15 @@ Get all issues created by authenticated user. This function takes pagination par GET /issues GET /issues?state=opened GET /issues?state=closed +GET /issues?labels=foo +GET /issues?labels=foo,bar +GET /issues?labels=foo,bar&state=opened ``` Parameters: - `state` (optional) - Return `all` issues or just those that are `opened` or `closed` +- `labels` (optional) - Comma-separated list of label names ```json [ @@ -88,12 +92,16 @@ to return the list of project issues. GET /projects/:id/issues GET /projects/:id/issues?state=opened GET /projects/:id/issues?state=closed +GET /projects/:id/issues?labels=foo +GET /projects/:id/issues?labels=foo,bar +GET /projects/:id/issues?labels=foo,bar&state=opened ``` Parameters: - `id` (required) - The ID of a project - `state` (optional) - Return `all` issues or just those that are `opened` or `closed` +- `labels` (optional) - Comma-separated list of label names ## Single issue |