From fd2e4324b094cb5929e8ca1bd524c7a3c1b1078d Mon Sep 17 00:00:00 2001 From: Kerri Miller <kerrizor@kerrizor.com> Date: Wed, 15 Feb 2023 15:52:02 +0000 Subject: [PATCH] Adds documentation for publish endpoint on Draft Notes API --- doc/api/draft_notes.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/api/draft_notes.md b/doc/api/draft_notes.md index 7c4cd8a1e2eb3..a168c41092c6c 100644 --- a/doc/api/draft_notes.md +++ b/doc/api/draft_notes.md @@ -111,3 +111,21 @@ DELETE /projects/:id/merge_requests/:merge_request_iid/draft_notes/:draft_note_i ```shell curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/14/merge_requests/11/draft_notes/5" ``` + +## Publish a draft note + +Publishes an existing draft note for a given merge request. + +```plaintext +PUT /projects/:id/merge_requests/:merge_request_iid/draft_notes/:draft_note_id/publish +``` + +| Attribute | Type | Required | Description | +| ------------------- | ---------------- | ----------- | --------------------- | +| `draft_note_id` | integer | yes | The ID of a draft note. +| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). +| `merge_request_iid` | integer | yes | The IID of a project merge request. + +```shell +curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/14/merge_requests/11/draft_notes/5/publish" +``` -- GitLab