Commit 17e8c056 authored by Amy Qualls's avatar Amy Qualls

Docs: Update more API code blocks

The code blocks for each API call on these pages did not specify a
code style. While they're HTTP requests, they don't match the
format the lexer expects, so I think 'plaintext' is a better choice.
parent 2a67c3ff
......@@ -4,7 +4,7 @@
Get a list of merge request context commits.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/context_commits
```
......@@ -36,7 +36,7 @@ Parameters:
Create a list of merge request context commits.
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/context_commits
```
......@@ -45,7 +45,7 @@ Parameters:
- `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `merge_request_iid` (required) - The internal ID of the merge request
```
```plaintext
POST /projects/:id/merge_requests/
```
......@@ -75,7 +75,7 @@ POST /projects/:id/merge_requests/
Delete a list of merge request context commits.
```
```plaintext
DELETE /projects/:id/merge_requests/:merge_request_iid/context_commits
```
......
......@@ -23,7 +23,7 @@ given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`).
The pagination parameters `page` and `per_page` can be used to
restrict the list of merge requests.
```
```plaintext
GET /merge_requests
GET /merge_requests?state=opened
GET /merge_requests?state=all
......@@ -190,7 +190,7 @@ Get all merge requests for this project.
The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`).
The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests.
```
```plaintext
GET /projects/:id/merge_requests
GET /projects/:id/merge_requests?state=opened
GET /projects/:id/merge_requests?state=all
......@@ -361,7 +361,7 @@ Get all merge requests for this group and its subgroups.
The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, `locked`, or `merged`) or all of them (`all`).
The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests.
```
```plaintext
GET /groups/:id/merge_requests
GET /groups/:id/merge_requests?state=opened
GET /groups/:id/merge_requests?state=all
......@@ -524,7 +524,7 @@ integer. This is because when an MR has too many changes to display and store,
it will be capped at 1,000. In that case, the API will return the string
`"1000+"` for the changes count.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid
```
......@@ -683,7 +683,7 @@ the `approvals_before_merge` parameter:
Get a list of merge request participants.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/participants
```
......@@ -717,7 +717,7 @@ Parameters:
Get a list of merge request commits.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/commits
```
......@@ -753,7 +753,7 @@ Parameters:
Shows information about the merge request including its files and changes.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/changes
```
......@@ -864,7 +864,7 @@ Parameters:
Get a list of merge request pipelines.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/pipelines
```
......@@ -896,7 +896,7 @@ The new pipeline can be:
- A [pipeline for merged results](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md)
if the [project setting is enabled](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md#enabling-pipelines-for-merged-results).
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/pipelines
```
......@@ -948,7 +948,7 @@ Parameters:
Creates a new merge request.
```
```plaintext
POST /projects/:id/merge_requests
```
......@@ -1105,7 +1105,7 @@ the `approvals_before_merge` parameter:
Updates an existing merge request. You can change the target branch, title, or even close the MR.
```
```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid
```
......@@ -1264,7 +1264,7 @@ the `approvals_before_merge` parameter:
Only for admins and project owners. Deletes the merge request in question.
```
```plaintext
DELETE /projects/:id/merge_requests/:merge_request_iid
```
......@@ -1289,7 +1289,7 @@ If the `sha` parameter is passed and does not match the HEAD of the source - you
If you don't have permissions to accept this merge request - you'll get a `401`
```
```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/merge
```
......@@ -1450,7 +1450,7 @@ If the merge request has conflicts, is empty or already merged, you'll get a `40
It returns the HEAD commit of `refs/merge-requests/:iid/merge` in the response body in case of `200`.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/merge_ref
```
......@@ -1473,7 +1473,7 @@ If the merge request is already merged or closed - you get `405` and error messa
In case the merge request is not set to be merged when the pipeline succeeds, you'll also get a `406` error.
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
```
......@@ -1621,7 +1621,7 @@ Automatically rebase the `source_branch` of the merge request against its
If you don't have permissions to push to the merge request's source branch -
you'll get a `403 Forbidden` response.
```
```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/rebase
```
......@@ -1684,7 +1684,7 @@ Comments are done via the [notes](notes.md) resource.
Get all the issues that would be closed by merging the provided merge request.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/closes_issues
```
......@@ -1760,7 +1760,7 @@ Example response when an external issue tracker (e.g. Jira) is used:
Subscribes the authenticated user to a merge request to receive notification. If the user is already subscribed to the merge request, the
status code `304` is returned.
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/subscribe
```
......@@ -1911,7 +1911,7 @@ Unsubscribes the authenticated user from a merge request to not receive
notifications from that merge request. If the user is
not subscribed to the merge request, the status code `304` is returned.
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/unsubscribe
```
......@@ -2062,7 +2062,7 @@ Manually creates a todo for the current user on a merge request.
If there already exists a todo for the user on that merge request,
status code `304` is returned.
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/todo
```
......@@ -2179,7 +2179,7 @@ Example response:
Get a list of merge request diff versions.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/versions
```
......@@ -2220,7 +2220,7 @@ Example response:
Get a single merge request diff version.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/versions/:version_id
```
......@@ -2288,7 +2288,7 @@ Example response:
Sets an estimated time of work for this merge request.
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/time_estimate
```
......@@ -2317,7 +2317,7 @@ Example response:
Resets the estimated time for this merge request to 0 seconds.
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/reset_time_estimate
```
......@@ -2345,7 +2345,7 @@ Example response:
Adds spent time for this merge request
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/add_spent_time
```
......@@ -2374,7 +2374,7 @@ Example response:
Resets the total spent time for this merge request to 0 seconds.
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/reset_spent_time
```
......@@ -2400,7 +2400,7 @@ Example response:
## Get time tracking stats
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/time_stats
```
......
......@@ -4,7 +4,7 @@
Returns a list of project milestones.
```
```plaintext
GET /projects/:id/milestones
GET /projects/:id/milestones?iids[]=42
GET /projects/:id/milestones?iids[]=42&iids[]=43
......@@ -51,7 +51,7 @@ Example Response:
Gets a single project milestone.
```
```plaintext
GET /projects/:id/milestones/:milestone_id
```
......@@ -64,7 +64,7 @@ Parameters:
Creates a new project milestone.
```
```plaintext
POST /projects/:id/milestones
```
......@@ -80,7 +80,7 @@ Parameters:
Updates an existing project milestone.
```
```plaintext
PUT /projects/:id/milestones/:milestone_id
```
......@@ -98,7 +98,7 @@ Parameters:
Only for users with Developer access to the project.
```
```plaintext
DELETE /projects/:id/milestones/:milestone_id
```
......@@ -111,7 +111,7 @@ Parameters:
Gets all issues assigned to a single project milestone.
```
```plaintext
GET /projects/:id/milestones/:milestone_id/issues
```
......@@ -124,7 +124,7 @@ Parameters:
Gets all merge requests assigned to a single project milestone.
```
```plaintext
GET /projects/:id/milestones/:milestone_id/merge_requests
```
......@@ -139,7 +139,7 @@ Parameters:
Only for users with Developer access to the group.
```
```plaintext
POST /projects/:id/milestones/:milestone_id/promote
```
......@@ -154,7 +154,7 @@ Parameters:
Gets all burndown chart events for a single milestone.
```
```plaintext
GET /projects/:id/milestones/:milestone_id/burndown_events
```
......
......@@ -12,7 +12,7 @@ For users and groups supported API calls see the [users](users.md) and
Get a list of the namespaces of the authenticated user. If the user is an
administrator, a list of all namespaces in the GitLab instance is shown.
```
```plaintext
GET /namespaces
```
......@@ -74,7 +74,7 @@ NOTE: **Note:** Only group maintainers/owners are presented with `members_count_
Get all namespaces that match a string in their name or path.
```
```plaintext
GET /namespaces?search=foobar
```
......@@ -108,7 +108,7 @@ Example response:
Get a namespace by ID.
```
```plaintext
GET /namespaces/:id
```
......
......@@ -22,7 +22,7 @@ Read more on [pagination](README.md#pagination).
Gets a list of all notes for a single issue.
```
```plaintext
GET /projects/:id/issues/:issue_iid/notes
GET /projects/:id/issues/:issue_iid/notes?sort=asc&order_by=updated_at
```
......@@ -87,7 +87,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single note for a specific project issue
```
```plaintext
GET /projects/:id/issues/:issue_iid/notes/:note_id
```
......@@ -105,7 +105,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new note to a single project issue.
```
```plaintext
POST /projects/:id/issues/:issue_iid/notes
```
......@@ -124,7 +124,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify existing note of an issue.
```
```plaintext
PUT /projects/:id/issues/:issue_iid/notes/:note_id
```
......@@ -143,7 +143,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing note of an issue.
```
```plaintext
DELETE /projects/:id/issues/:issue_iid/notes/:note_id
```
......@@ -165,7 +165,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all notes for a single snippet. Snippet notes are comments users can post to a snippet.
```
```plaintext
GET /projects/:id/snippets/:snippet_id/notes
GET /projects/:id/snippets/:snippet_id/notes?sort=asc&order_by=updated_at
```
......@@ -185,7 +185,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single note for a given snippet.
```
```plaintext
GET /projects/:id/snippets/:snippet_id/notes/:note_id
```
......@@ -223,7 +223,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new note for a single snippet. Snippet notes are comments users can post to a snippet.
If you create a note where the body only contains an Award Emoji, you'll receive this object back.
```
```plaintext
POST /projects/:id/snippets/:snippet_id/notes
```
......@@ -242,7 +242,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify existing note of a snippet.
```
```plaintext
PUT /projects/:id/snippets/:snippet_id/notes/:note_id
```
......@@ -261,7 +261,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing note of a snippet.
```
```plaintext
DELETE /projects/:id/snippets/:snippet_id/notes/:note_id
```
......@@ -283,7 +283,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all notes for a single merge request.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/notes
GET /projects/:id/merge_requests/:merge_request_iid/notes?sort=asc&order_by=updated_at
```
......@@ -303,7 +303,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single note for a given merge request.
```
```plaintext
GET /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
```
......@@ -346,7 +346,7 @@ Creates a new note for a single merge request.
If you create a note where the body only contains an Award Emoji, you'll receive
this object back.
```
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/notes
```
......@@ -361,7 +361,7 @@ Parameters:
Modify existing note of a merge request.
```
```plaintext
PUT /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
```
......@@ -380,7 +380,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing note of a merge request.
```
```plaintext
DELETE /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
```
......@@ -402,7 +402,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
Gets a list of all notes for a single epic. Epic notes are comments users can post to an epic.
```
```plaintext
GET /groups/:id/epics/:epic_id/notes
GET /groups/:id/epics/:epic_id/notes?sort=asc&order_by=updated_at
```
......@@ -422,7 +422,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Returns a single note for a given epic.
```
```plaintext
GET /groups/:id/epics/:epic_id/notes/:note_id
```
......@@ -462,7 +462,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new note for a single epic. Epic notes are comments users can post to an epic.
If you create a note where the body only contains an Award Emoji, you'll receive this object back.
```
```plaintext
POST /groups/:id/epics/:epic_id/notes
```
......@@ -482,7 +482,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Modify existing note of an epic.
```
```plaintext
PUT /groups/:id/epics/:epic_id/notes/:note_id
```
......@@ -503,7 +503,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.
Deletes an existing note of an epic.
```
```plaintext
DELETE /groups/:id/epics/:epic_id/notes/:note_id
```
......
......@@ -6,7 +6,7 @@
The notification levels are defined in the `NotificationSetting.level` model enumeration. Currently, these levels are recognized:
```
```plaintext
disabled
participating
watch
......@@ -37,7 +37,7 @@ If the `custom` level is used, specific email events can be controlled. Availabl
Get current notification settings and email address.
```
```plaintext
GET /notification_settings
```
......@@ -58,7 +58,7 @@ Example response:
Update current notification settings and email address.
```
```plaintext
PUT /notification_settings
```
......@@ -99,7 +99,7 @@ Example response:
Get current group or project notification settings.
```
```plaintext
GET /groups/:id/notification_settings
GET /projects/:id/notification_settings
```
......@@ -125,7 +125,7 @@ Example response:
Update current group/project notification settings.
```
```plaintext
PUT /groups/:id/notification_settings
PUT /projects/:id/notification_settings
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment