Create a merge request discussion
Creates a discussion for a specified merge request. Replies can be added to it later.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The ID of a project
The ID of the merge request
Request Body required
Section titled “ Request Body required ”object
The content of a note
The creation date of the note
Position when creating a note
object
Base commit SHA in the source branch
SHA referencing commit in target branch
SHA referencing HEAD of this merge request
Type of the position reference
File path after change
Line number after change
File path before change
Line number before change
Width of the image
Height of the image
X coordinate in the image
Y coordinate in the image
Multi-line start and end
object
Start line for a multi-line note
object
Start line code for multi-line note
Start line type for multi-line note
Start old_line line number
Start new_line line number
End line for a multi-line note
object
End line code for multi-line note
End line type for multi-line note
End old_line line number
End new_line line number
Responses
Section titled “ Responses ”Created
object
object
object
object
object
object
object
object
object
Example
{ "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": { "id": 1, "type": "DiscussionNote", "body": "Note body.", "author": { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" }, "created_at": "2022-01-31T15:10:44.988Z", "updated_at": "2022-01-31T15:10:44.988Z", "system": false, "noteable_id": 1, "noteable_type": "Issue", "project_id": 1, "commit_id": "7b09ce7e6f80347baf0316c8c94cdba9a0a7e91d", "resolvable": false, "resolved": false, "resolved_by": { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" }, "resolved_at": "2022-01-31T15:10:44.988Z", "suggestions": { "id": 1, "from_line": 1, "to_line": 1, "appliable": true, "applied": false, "from_content": "Original content\n", "to_content": "New content\n" }, "confidential": false, "internal": false, "imported": false, "imported_from": "github", "noteable_iid": 1 }}Bad Request
Not Found