Fix missing data / structure in Merge Request API page
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
The merge request API page (https://docs.gitlab.com/ee/api/merge_requests.html) is old, and is missing some expected content for its various endpoints. The docs for each endpoint should contain all of the pieces of content described in the REST API topic template. These are the components each subheading is supposed to have, and I'll bold the ones that are commonly missing or problematic:
- 1-2 sentence description of the endpoint
- A code block with the method.
- A table of the attributes this endpoint accepts / requires
- The success status code this endpoint returns
- (optional) The failure status codes this endpoint returns, if atypical, see #433318 (comment 1828215969)
- A table of the response attributes
- An example
curl
request - An example response in
JSON
format
I've created a thread in this issue for each of the subheadings.
(This work is part of my current quarter OKR, https://gitlab.com/gitlab-org/technical-writing/-/issues/936.)
Proposal
-
Amy to review the API page, identify what's missing from each endpoint -
Amy to post a checklist here to show what's needed Amy to work with @kisha.mavryck and @phikai to ensure this work is handed to the engineers-
François / Amy work together to fix the gaps in the page.
Who can address the issue
The groupcode review team, in conjunction with their TW. (Me!)
Other links/references
Related to https://gitlab.com/gitlab-org/technical-writing/-/issues/936+
Status - API endpoints to document
Legend:
-
Done -
TODO -
- Out of scope
List of MR-related endpoints by order of average requests per seconds (looking at past 7 days). The higher the RPS, the more traffic the endpoints gets, and therefore the more valuable it is to document it. Assumption is that more traffic => more user interest. See #433318 (comment 1785454140).
Grafana dashboard (past 7 days)
HIGH usage (5) - 40% done
-
> 100 RPS (1) - 100% done
✅ -
~execute
-
GET /api/projects/:id/merge_requests
- #433318 (comment 1693466977)
-
-
10-100 RPS (4) - 50% done
-
GET /api/projects/:id/merge_requests/:noteable_id/notes
-
GET /api/projects/:id/merge_requests/:merge_request_iid
- #433318 (comment 1693467314) -
GET /api/projects/:id/merge_requests/:merge_request_iid/commits
- #433318 (comment 1693467748) -
GET /api/groups/id/merge_requests
- #433318 (comment 1693467141) -
GET /api/projects/:id/merge_requests/:noteable_id/discussions
-
GET /api/projects/:id/merge_requests/:merge_request_iid/award_emoji
-
GET /api/projects/:id/merge_requests/:merge_request_iid/closes_issues
- #433318 (comment 1693478467)
-
MEDIUM usage (7) - 14% done
-
1-10 RPS (4) - 25% done
-
GET /api/merge_requests
-
PUT /api/projects/:id/merge_requests/:merge_request_iid/merge
- #433318 (comment 1693468662) -
PUT /api/projects/:id/merge_requests/:merge_request_iid
- #433318 (comment 1693468365) -
GET /api/projects/:id/merge_requests/:noteable_id/notes/:note_id
-
GET /api/projects/:id/merge_requests/:merge_request_iid/versions/:version_id
- #433318 (comment 1693479402) -
GET /api/projects/:id/merge_requests/:merge_request_iid/changes
-
GET /api/projects/:id/merge_requests/:merge_request_iid/notes/:note_id/award_emoji
-
PUT /api/projects/:id/merge_requests/:noteable_id/notes/:note_id
-
GET /api/projects/:id/merge_requests/:merge_request_iid/versions
- #433318 (comment 1693479285) -
POST /api/projects/:id/merge_requests/:noteable_id/notes
-
-
0.1-1 RPS (3) - 0% done
-
GET /api/projects/:id/merge_requests/:merge_request_iid/reviewers
- #433318 (comment 1693467597) -
GET /api/projects/:id/merge_requests/:merge_request_iid/diffs
-
POST /api/projects/:id/merge_requests
- #433318 (comment 1693468250) -
GET /api/projects/:id/merge_requests/:eventable_id/resource_label_events
-
GET /api/projects/:id/merge_requests/:eventable_id/resource_state_events
-
DELETE /api/projects/:id/merge_requests/:noteable_id/notes/:note_id
-
GET /api/projects/:id/merge_requests/:merge_request_iid/participants
- #433318 (comment 1693467404) -
GET /api/projects/:id/merge_requests/:merge_request_iid/draft_notes
-
LOW usage (8) - 0% done
-
0.01-0.1 RPS (2) - 0% done
-
PUT /api/projects/:id/merge_requests/:noteable_id/discussions/:discussion_id/notes/:note_id
-
POST /api/projects/:id/merge_requests/:noteable_id/discussions
-
PUT /api/projects/:id/merge_requests/:noteable_id/discussions/:discussion_id
-
POST /api/projects/:id/merge_requests/:merge_request_iid/award_emoji
-
GET /api/projects/:id/merge_requests/:merge_request_iid/related_issues
-
PUT /api/projects/:id/merge_requests/:merge_request_iid/rebase
- #433318 (comment 1693478283) -
GET /api/projects/:id/merge_requests/:noteable_id/discussions/:discussion_id/notes/:note_id
-
DELETE /api/projects/:id/merge_requests/:merge_request_iid
- #433318 (comment 1693468525) -
GET /api/projects/:id/merge_requests/:eventable_id/resource_milestone_events
-
-
<0.01 RPS (6) - 0% done
-
POST /api/projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
- #433318 (comment 1693469357) -
GET /api/projects/:id/merge_requests/:merge_request_iid/merge_ref
- #433318 (comment 1693468855) -
POST /api/projects/:id/merge_requests/:subscribable_id/subscribe
- #433318 (comment 1693478671) -
POST /api/projects/:id/merge_requests/:subscribable_id/unsubscribe
- #433318 (comment 1693478946) -
POST /api/projects/:id/merge_requests/:merge_request_iid/time_estimate
- #433318 (comment 1693479519) -
GET /projects/:id/merge_requests/:merge_request_iid/time_stats
- #433318 (comment 1693480039)
-
21 more endpoints, not listed here.