Add group epic boards API endpoint
Related to #385903 (closed)
What does this MR do and why?
Adds the following endpoints to retrieve epic boards for a given group:
GET /groups/:id/epic_boards
GET /groups/:id/epic_boards/:board_id
We will expose the board lists in following iterations, similarly to the issue boards API endpoints.
How to set up and validate locally
- Create a private group with multiple labels and epics
- Visit the group's epic boards in
http://gdk.test:3000/groups/{GROUP_ID}/-/epic_boards
and create more boards with lists - Test the following endpoints with a guest and a non-member:
export GUEST_PAT=<guest user api token>
export NON_MEMBER_PAT=<non-member api token>
# Fetch multiple boards
curl --header "PRIVATE-TOKEN: NON_MEMBER_PAT" "http://gdk.test:3000/api/v4/groups/{GROUP_ID}/epic_boards"
# returns {"message":"404 Group Not Found"}
curl --header "PRIVATE-TOKEN: GUEST_PAT" "http://gdk.test:3000/api/v4/groups/{GROUP_ID}/epic_boards"
# returns the correct response containing all epic boards for the group
curl --header "PRIVATE-TOKEN: GUEST_PAT" "http://gdk.test:3000/api/v4/groups/{GROUP_ID}/epic_boards?page=1&per_page=1"
# returns the correct paginated response
curl --header "PRIVATE-TOKEN: GUEST_PAT" "http://gdk.test:3000/api/v4/groups/{GROUP_PATH}/epic_boards"
# returns the correct response containing all epic boards when using the group path
# Fetch a single board by its ID
curl --header "PRIVATE-TOKEN: GUEST_PAT" "http://gdk.test:3000/api/v4/groups/{GROUP_ID}/epic_boards/{BOARD_ID}"
# returns the correct response containing the single board
curl --header "PRIVATE-TOKEN: NON_MEMBER_PAT" "http://gdk.test:3000/api/v4/groups/{GROUP_ID}/epic_boards/{BOARD_ID}"
# returns {"message":"404 Group Not Found"}
Example response for a single epic board
{
"id": 8,
"name": "Test 2",
"hide_backlog_list": true,
"hide_closed_list": true,
"group": {
"id": 204,
"web_url": "http://127.0.0.1:3000/groups/group-with-boards",
"name": "Group With Boards"
},
"labels": [
{
"id": 118,
"name": "green",
"description": "",
"description_html": "",
"text_color": "#FFFFFF",
"color": "#00b140"
}
],
"lists": [
{
"id": 22,
"label": null,
"position": null
},
{
"id": 24,
"label": {
"id": 119,
"name": "pink",
"description": "",
"description_html": "",
"text_color": "#FFFFFF",
"color": "#c21e56"
},
"position": 0
},
{
"id": 23,
"label": null,
"position": null
}
]
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eugenia Grieff