Use this API to manage discussions. This includes comments, threads, and system notes about changes to an object (for example, when a milestone changes).
To manage label notes, use the resource label events API.
List all discussions for an issue
GET /api/v4/projects/{id}/issues/{noteable_id}/discussions
Lists all discussions for a specified issue.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the issue |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Create an issue discussion
POST /api/v4/projects/{id}/issues/{noteable_id}/discussions
Creates a discussion for a specified issue. Replies can be added to it later.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the issue |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | The content of a note |
created_ | String | The creation date of the note |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a discussion for an issue
GET /api/v4/projects/{id}/issues/{noteable_id}/discussions/{discussion_id}
Retrieves a specified discussion for an issue.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
discussion_Path, | String | The ID of a discussion |
noteable_Path, | Integer | The ID of the issue |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Resolve or unresolve an issue discussion
PUT /api/v4/projects/{id}/issues/{noteable_id}/discussions/{discussion_id}
Resolves or unresolves a specified issue discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the issue |
discussion_Path, | String | The ID of a discussion |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
resolvedRequired | Boolean | Mark discussion resolved/ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List comments in an issue discussion
GET /api/v4/projects/{id}/issues/{noteable_id}/discussions/{discussion_id}/notes
Lists the comments in a specified issue discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
discussion_Path, | String | The ID of a discussion |
noteable_Path, | Integer | The ID of the issue |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Add a comment to an issue discussion
POST /api/v4/projects/{id}/issues/{noteable_id}/discussions/{discussion_id}/notes
Adds a comment to a specified issue discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the issue |
discussion_Path, | String | The ID of a discussion |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | The content of a note |
created_ | String | The creation date of the note |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a comment from an issue discussion
GET /api/v4/projects/{id}/issues/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Retrieves a specified comment from a issue discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the issue |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Update a comment in an issue discussion
PUT /api/v4/projects/{id}/issues/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Updates or changes the status of a specified comment in a issue discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the issue |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
body | String | The content of a note |
resolved | Boolean | Mark note resolved/ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete a comment from an issue discussion
DELETE /api/v4/projects/{id}/issues/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Deletes a specified comment from a issue discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the issue |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all discussions for a merge request
GET /api/v4/projects/{id}/merge_requests/{noteable_id}/discussions
Lists all discussions for a specified merge request.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the merge request |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Create a merge request discussion
POST /api/v4/projects/{id}/merge_requests/{noteable_id}/discussions
Creates a discussion for a specified merge request. Replies can be added to it later.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the merge request |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | The content of a note |
created_ | String | The creation date of the note |
position | Object | Position when creating a note |
position.Required | String | Base commit SHA in the source branch |
position.Required | String | SHA referencing HEAD of this merge request |
position. | Integer | Height of the image |
position. | Object | Multi- |
position. | Object | End line for a multi- |
position. | String | End line code for multi- |
position. | Integer | End new_ |
position. | Integer | End old_ |
position. | String | End line type for multi- |
position. | Object | Start line for a multi- |
position. | String | Start line code for multi- |
position. | Integer | Start new_ |
position. | Integer | Start old_ |
position. | String | Start line type for multi- |
position. | Integer | Line number after change |
position. | String | File path after change |
position. | Integer | Line number before change |
position. | String | File path before change |
position.Required | String | Type of the position reference Allowed values: text,image,fileMinimum length: 1 |
position.Required | String | SHA referencing commit in target branch |
position. | Integer | Width of the image |
position. | Integer | X coordinate in the image |
position. | Integer | Y coordinate in the image |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a discussion for a merge request
GET /api/v4/projects/{id}/merge_requests/{noteable_id}/discussions/{discussion_id}
Retrieves a specified discussion for a merge request.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
discussion_Path, | String | The ID of a discussion |
noteable_Path, | Integer | The ID of the merge request |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Resolve or unresolve a merge request discussion
PUT /api/v4/projects/{id}/merge_requests/{noteable_id}/discussions/{discussion_id}
Resolves or unresolves a specified merge request discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the merge request |
discussion_Path, | String | The ID of a discussion |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
resolvedRequired | Boolean | Mark discussion resolved/ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List comments in a merge request discussion
GET /api/v4/projects/{id}/merge_requests/{noteable_id}/discussions/{discussion_id}/notes
Lists the comments in a specified merge request discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
discussion_Path, | String | The ID of a discussion |
noteable_Path, | Integer | The ID of the merge request |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Add a comment to a merge request discussion
POST /api/v4/projects/{id}/merge_requests/{noteable_id}/discussions/{discussion_id}/notes
Adds a comment to a specified merge request discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the merge request |
discussion_Path, | String | The ID of a discussion |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | The content of a note |
created_ | String | The creation date of the note |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a comment from a merge request discussion
GET /api/v4/projects/{id}/merge_requests/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Retrieves a specified comment from a merge request discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the merge request |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Update a comment in a merge request discussion
PUT /api/v4/projects/{id}/merge_requests/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Updates or changes the status of a specified comment in a merge request discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the merge request |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
body | String | The content of a note |
resolved | Boolean | Mark note resolved/ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete a comment from a merge request discussion
DELETE /api/v4/projects/{id}/merge_requests/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Deletes a specified comment from a merge request discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the merge request |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all discussions for a commit
GET /api/v4/projects/{id}/repository/commits/{noteable_id}/discussions
Lists all discussions for a specified commit.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | String | The ID of the commit |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Create a commit discussion
POST /api/v4/projects/{id}/repository/commits/{noteable_id}/discussions
Creates a discussion for a specified commit. Replies can be added to it later.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | String | The ID of the commit |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | The content of a note |
created_ | String | The creation date of the note |
position | Object | Position when creating a note |
position.Required | String | Base commit SHA in the source branch |
position.Required | String | SHA referencing HEAD of this merge request |
position. | Integer | Height of the image |
position. | Integer | Line number after change |
position. | String | File path after change |
position. | Integer | Line number before change |
position. | String | File path before change |
position.Required | String | Type of the position reference Allowed values: text,image,fileMinimum length: 1 |
position.Required | String | SHA referencing commit in target branch |
position. | Integer | Width of the image |
position. | Integer | X coordinate in the image |
position. | Integer | Y coordinate in the image |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a discussion for a commit
GET /api/v4/projects/{id}/repository/commits/{noteable_id}/discussions/{discussion_id}
Retrieves a specified discussion for a commit.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
discussion_Path, | String | The ID of a discussion |
noteable_Path, | String | The ID of the commit |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List comments in a commit discussion
GET /api/v4/projects/{id}/repository/commits/{noteable_id}/discussions/{discussion_id}/notes
Lists the comments in a specified commit discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
discussion_Path, | String | The ID of a discussion |
noteable_Path, | String | The ID of the commit |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Add a comment to a commit discussion
POST /api/v4/projects/{id}/repository/commits/{noteable_id}/discussions/{discussion_id}/notes
Adds a comment to a specified commit discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | String | The ID of the commit |
discussion_Path, | String | The ID of a discussion |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | The content of a note |
created_ | String | The creation date of the note |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a comment from a commit discussion
GET /api/v4/projects/{id}/repository/commits/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Retrieves a specified comment from a commit discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | String | The ID of the commit |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Update a comment in a commit discussion
PUT /api/v4/projects/{id}/repository/commits/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Updates or changes the status of a specified comment in a commit discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | String | The ID of the commit |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
body | String | The content of a note |
resolved | Boolean | Mark note resolved/ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete a comment from a commit discussion
DELETE /api/v4/projects/{id}/repository/commits/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Deletes a specified comment from a commit discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | String | The ID of the commit |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all discussions for a snippet
GET /api/v4/projects/{id}/snippets/{noteable_id}/discussions
Lists all discussions for a specified snippet.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the snippet |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Create a snippet discussion
POST /api/v4/projects/{id}/snippets/{noteable_id}/discussions
Creates a discussion for a specified snippet. Replies can be added to it later.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the snippet |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | The content of a note |
created_ | String | The creation date of the note |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a discussion for a snippet
GET /api/v4/projects/{id}/snippets/{noteable_id}/discussions/{discussion_id}
Retrieves a specified discussion for a snippet.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
discussion_Path, | String | The ID of a discussion |
noteable_Path, | Integer | The ID of the snippet |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List comments in a snippet discussion
GET /api/v4/projects/{id}/snippets/{noteable_id}/discussions/{discussion_id}/notes
Lists the comments in a specified snippet discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
discussion_Path, | String | The ID of a discussion |
noteable_Path, | Integer | The ID of the snippet |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Add a comment to a snippet discussion
POST /api/v4/projects/{id}/snippets/{noteable_id}/discussions/{discussion_id}/notes
Adds a comment to a specified snippet discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the snippet |
discussion_Path, | String | The ID of a discussion |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
bodyRequired | String | The content of a note |
created_ | String | The creation date of the note |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a comment from a snippet discussion
GET /api/v4/projects/{id}/snippets/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Retrieves a specified comment from a snippet discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the snippet |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Update a comment in a snippet discussion
PUT /api/v4/projects/{id}/snippets/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Updates or changes the status of a specified comment in a snippet discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the snippet |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
body | String | The content of a note |
resolved | Boolean | Mark note resolved/ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete a comment from a snippet discussion
DELETE /api/v4/projects/{id}/snippets/{noteable_id}/discussions/{discussion_id}/notes/{note_id}
Deletes a specified comment from a snippet discussion.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of a project |
noteable_Path, | Integer | The ID of the snippet |
discussion_Path, | String | The ID of a discussion |
note_Path, | Integer | The ID of a note |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |
APIEntitiesDiscussion
| Property | Type | Description |
|---|---|---|
id | String | Example:6a9c1750b37d513a4398 |
individual_ | Boolean | Example:false |
notes | APIEntities | — |
resolvable | Boolean | — |
resolved | Boolean | — |
APIEntitiesNote
| Property | Type | Description |
|---|---|---|
author | APIEntities | — |
body | String | Example:Note body. |
commands_ | Object | — |
commit_ | String | Example:7b09ce7e6f80347baf03 |
confidential | Boolean | Example:false |
created_ | String (date- | Example:2022- |
id | Integer (int64) | Example:1 |
imported | Boolean | Example:false |
imported_ | String | Example:github |
internal | Boolean | Example:false |
noteable_ | Integer (int64) | Example:1 |
noteable_ | Integer | Example:1 |
noteable_ | String | Example:Issue |
position | Object | — |
project_ | Integer (int64) | Example:1 |
resolvable | Boolean | Example:false |
resolved | Boolean | Example:false |
resolved_ | String (date- | Example:2022- |
resolved_ | APIEntities | — |
suggestions | APIEntities | — |
system | Boolean | Example:false |
type | String | Example:Discussion |
updated_ | String (date- | Example:2022- |
APIEntitiesSuggestion
| Property | Type | Description |
|---|---|---|
appliable | Boolean | Example:true |
applied | Boolean | Example:false |
from_ | String | Example:Original content |
from_ | Integer | Example:1 |
id | Integer (int64) | Example:1 |
to_ | String | Example:New content |
to_ | Integer | Example:1 |
APIEntitiesUserBasic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | Example:https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | Example:1 |
locked | Boolean | — |
name | String | Example:Administrator |
public_ | String | Example:john@example. |
state | String | Example:active |
username | String | Example:admin |
web_ | String | Example:https: |