# Discussions API
> 原文:[https://docs.gitlab.com/ee/api/discussions.html](https://docs.gitlab.com/ee/api/discussions.html)
* [Discussions pagination](#discussions-pagination)
* [Issues](#issues)
* [List project issue discussion items](#list-project-issue-discussion-items)
* [Get single issue discussion item](#get-single-issue-discussion-item)
* [Create new issue thread](#create-new-issue-thread)
* [Add note to existing issue thread](#add-note-to-existing-issue-thread)
* [Modify existing issue thread note](#modify-existing-issue-thread-note)
* [Delete an issue thread note](#delete-an-issue-thread-note)
* [Snippets](#snippets)
* [List project snippet discussion items](#list-project-snippet-discussion-items)
* [Get single snippet discussion item](#get-single-snippet-discussion-item)
* [Create new snippet thread](#create-new-snippet-thread)
* [Add note to existing snippet thread](#add-note-to-existing-snippet-thread)
* [Modify existing snippet thread note](#modify-existing-snippet-thread-note)
* [Delete a snippet thread note](#delete-a-snippet-thread-note)
* [Epics](#epics-ultimate)
* [List group epic discussion items](#list-group-epic-discussion-items)
* [Get single epic discussion item](#get-single-epic-discussion-item)
* [Create new epic thread](#create-new-epic-thread)
* [Add note to existing epic thread](#add-note-to-existing-epic-thread)
* [Modify existing epic thread note](#modify-existing-epic-thread-note)
* [Delete an epic thread note](#delete-an-epic-thread-note)
* [Merge requests](#merge-requests)
* [List project merge request discussion items](#list-project-merge-request-discussion-items)
* [Get single merge request discussion item](#get-single-merge-request-discussion-item)
* [Create new merge request thread](#create-new-merge-request-thread)
* [Resolve a merge request thread](#resolve-a-merge-request-thread)
* [Add note to existing merge request thread](#add-note-to-existing-merge-request-thread)
* [Modify an existing merge request thread note](#modify-an-existing-merge-request-thread-note)
* [Delete a merge request thread note](#delete-a-merge-request-thread-note)
* [Commits](#commits)
* [List project commit discussion items](#list-project-commit-discussion-items)
* [Get single commit discussion item](#get-single-commit-discussion-item)
* [Create new commit thread](#create-new-commit-thread)
* [Add note to existing commit thread](#add-note-to-existing-commit-thread)
* [Modify an existing commit thread note](#modify-an-existing-commit-thread-note)
* [Delete a commit thread note](#delete-a-commit-thread-note)
# Discussions API[](#discussions-api "Permalink")
讨论是关于以下方面的一组相关注释:
* Snippets
* Issues
* Epics
* 合并要求
* Commits
这包括系统注释,这些注释是有关对象更改的注释(例如,当里程碑更改时,将有相应的系统注释). 标签注释不是此 API 的一部分,而是在[资源标签事件中](resource_label_events.html)记录为单独的[事件](resource_label_events.html) .
## Discussions pagination[](#discussions-pagination "Permalink")
默认情况下,因为 API 结果是分页的,所以`GET`请求一次返回 20 个结果.
阅读有关[分页的](README.html#pagination)更多信息.
## Issues[](#issues "Permalink")
### List project issue discussion items[](#list-project-issue-discussion-items "Permalink")
获取单个问题的所有讨论项目的列表.
```
GET /projects/:id/issues/:issue_iid/discussions
```
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `issue_iid` | integer | yes | 问题的 IID |
```
[ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Issue", "noteable_iid": null }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Issue", "noteable_iid": null, "resolvable": false } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Issue", "noteable_iid": null, "resolvable": false } ] } ]
```
```
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions"
```
### Get single issue discussion item[](#get-single-issue-discussion-item "Permalink")
返回特定项目问题的单个讨论项
```
GET /projects/:id/issues/:issue_iid/discussions/:discussion_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `issue_iid` | integer | yes | 问题的 IID |
| `discussion_id` | integer | yes | 讨论项目的 ID |
```
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7"
```
### Create new issue thread[](#create-new-issue-thread "Permalink")
为单个项目问题创建一个新线程. 这类似于创建便笺,但其他注释(回复)可以在以后添加.
```
POST /projects/:id/issues/:issue_iid/discussions
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `issue_iid` | integer | yes | 问题的 IID |
| `body` | string | yes | 线程的内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions?body=comment"
```
### Add note to existing issue thread[](#add-note-to-existing-issue-thread "Permalink")
向该线程添加新注释. 这也可以[从单个注释创建线程](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment) .
**警告**注释可以添加到注释(系统注释等)之外的其他项目中,从而使其成为主题.
```
POST /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `issue_iid` | integer | yes | 问题的 IID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | yes | 备注/回复的内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment"
```
### Modify existing issue thread note[](#modify-existing-issue-thread-note "Permalink")
修改问题的现有线程注释.
```
PUT /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `issue_iid` | integer | yes | 问题的 IID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | yes | 备注/回复的内容 |
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment"
```
### Delete an issue thread note[](#delete-an-issue-thread-note "Permalink")
删除问题的现有主题注释.
```
DELETE /projects/:id/issues/:issue_iid/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `issue_iid` | integer | yes | 问题的 IID |
| `discussion_id` | integer | yes | 讨论的 ID |
| `note_id` | integer | yes | 讨论记录的 ID |
```
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/discussions/636"
```
## Snippets[](#snippets "Permalink")
### List project snippet discussion items[](#list-project-snippet-discussion-items "Permalink")
获取单个代码段的所有讨论项的列表.
```
GET /projects/:id/snippets/:snippet_id/discussions
```
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `snippet_id` | integer | yes | 片段的 ID |
```
[ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Snippet", "noteable_id": null }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Snippet", "noteable_id": null, "resolvable": false } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Snippet", "noteable_id": null, "resolvable": false } ] } ]
```
```
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions"
```
### Get single snippet discussion item[](#get-single-snippet-discussion-item "Permalink")
返回特定项目片段的单个讨论项
```
GET /projects/:id/snippets/:snippet_id/discussions/:discussion_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `snippet_id` | integer | yes | 片段的 ID |
| `discussion_id` | integer | yes | 讨论项目的 ID |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7"
```
### Create new snippet thread[](#create-new-snippet-thread "Permalink")
Creates a new thread to a single project snippet. This is similar to creating a note but other comments (replies) can be added to it later.
```
POST /projects/:id/snippets/:snippet_id/discussions
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `snippet_id` | integer | yes | 片段的 ID |
| `body` | string | yes | 讨论内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions?body=comment"
```
### Add note to existing snippet thread[](#add-note-to-existing-snippet-thread "Permalink")
向该线程添加新注释.
```
POST /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `snippet_id` | integer | yes | 片段的 ID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | yes | 备注/回复的内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment"
```
### Modify existing snippet thread note[](#modify-existing-snippet-thread-note "Permalink")
修改代码段的现有线程注释.
```
PUT /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `snippet_id` | integer | yes | 片段的 ID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | yes | 备注/回复的内容 |
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment"
```
### Delete a snippet thread note[](#delete-a-snippet-thread-note "Permalink")
删除代码段的现有线程注释.
```
DELETE /projects/:id/snippets/:snippet_id/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `snippet_id` | integer | yes | 片段的 ID |
| `discussion_id` | integer | yes | 讨论的 ID |
| `note_id` | integer | yes | 讨论记录的 ID |
```
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/636"
```
## Epics[](#epics-ultimate "Permalink")
### List group epic discussion items[](#list-group-epic-discussion-items "Permalink")
获取单个史诗的所有讨论项的列表.
```
GET /groups/:id/epics/:epic_id/discussions
```
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 组的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `epic_id` | integer | yes | 史诗的 ID |
```
[ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Epic", "noteable_id": null, "resolvable": false }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Epic", "noteable_id": null, "resolvable": false } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Epic", "noteable_id": null, "resolvable": false } ] } ]
```
```
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions"
```
### Get single epic discussion item[](#get-single-epic-discussion-item "Permalink")
返回特定小组史诗的单个讨论项
```
GET /groups/:id/epics/:epic_id/discussions/:discussion_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 组的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `epic_id` | integer | yes | 史诗的 ID |
| `discussion_id` | integer | yes | 讨论项目的 ID |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7"
```
### Create new epic thread[](#create-new-epic-thread "Permalink")
Creates a new thread to a single group epic. This is similar to creating a note but other comments (replies) can be added to it later.
```
POST /groups/:id/epics/:epic_id/discussions
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 组的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `epic_id` | integer | yes | 史诗的 ID |
| `body` | string | yes | 线程的内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions?body=comment"
```
### Add note to existing epic thread[](#add-note-to-existing-epic-thread "Permalink")
向该线程添加新注释. 这也可以[从单个注释创建线程](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment) .
```
POST /groups/:id/epics/:epic_id/discussions/:discussion_id/notes
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 组的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `epic_id` | integer | yes | 史诗的 ID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | yes | 备注/回复的内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment"
```
### Modify existing epic thread note[](#modify-existing-epic-thread-note "Permalink")
修改史诗的现有线程注释.
```
PUT /groups/:id/epics/:epic_id/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 组的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `epic_id` | integer | yes | 史诗的 ID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | yes | 备注/回复的内容 |
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment"
```
### Delete an epic thread note[](#delete-an-epic-thread-note "Permalink")
删除史诗的现有主题注释.
```
DELETE /groups/:id/epics/:epic_id/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 组的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `epic_id` | integer | yes | 史诗的 ID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
```
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/epics/11/discussions/636"
```
## Merge requests[](#merge-requests "Permalink")
### List project merge request discussion items[](#list-project-merge-request-discussion-items "Permalink")
获取单个合并请求的所有讨论项的列表.
```
GET /projects/:id/merge_requests/:merge_request_iid/discussions
```
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `merge_request_iid` | integer | yes | 合并请求的 IID |
```
[ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Merge request", "noteable_iid": null, "resolved": false, "resolvable": true, "resolved_by": null }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Merge request", "noteable_iid": null, "resolved": false, "resolvable": true, "resolved_by": null } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Merge request", "noteable_iid": null, "resolved": false, "resolvable": true, "resolved_by": null } ] } ]
```
差异评论还包含以下位置:
```
[ { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": false, "notes": [ { "id": 1128, "type": DiffNote, "body": "diff comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Merge request", "noteable_iid": null, "position": { "base_sha": "b5d6e7b1613fca24d250fa8e5bc7bcc3dd6002ef", "start_sha": "7c9c2ead8a320fb7ba0b4e234bd9529a2614e306", "head_sha": "4803c71e6b1833ca72b8b26ef2ecd5adc8a38031", "old_path": "package.json", "new_path": "package.json", "position_type": "text", "old_line": 27, "new_line": 27, "line_range": { "start": { "line_code": "588440f66559714280628a4f9799f0c4eb880a4a_10_10", "type": "new", }, "end": { "line_code": "588440f66559714280628a4f9799f0c4eb880a4a_11_11", "type": "old" }, } }, "resolved": false, "resolvable": true, "resolved_by": null } ] } ]
```
```
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions"
```
### Get single merge request discussion item[](#get-single-merge-request-discussion-item "Permalink")
返回特定项目合并请求的单个讨论项
```
GET /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `merge_request_iid` | integer | yes | 合并请求的 IID |
| `discussion_id` | integer | yes | 讨论项目的 ID |
```
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7
```
### Create new merge request thread[](#create-new-merge-request-thread "Permalink")
为单个项目合并请求创建一个新线程. 这类似于创建便笺,但其他注释(回复)可以在以后添加.
```
POST /projects/:id/merge_requests/:merge_request_iid/discussions
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `merge_request_iid` | integer | yes | 合并请求的 IID |
| `body` | string | yes | 线程的内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
| `position` | hash | no | 创建差异注释时的位置 |
| `position[base_sha]` | string | yes | 源分支中的基本提交 SHA |
| `position[start_sha]` | string | yes | SHA 引用目标分支中的提交 |
| `position[head_sha]` | string | yes | SHA 引用此合并请求的 HEAD |
| `position[position_type]` | string | yes | 位置参考的类型",允许的值:"文本"或"图像" |
| `position[new_path]` | string | no | 更改后的文件路径 |
| `position[new_line]` | integer | no | 更改后的行号(用于"文本"差异注释) |
| `position[old_path]` | string | no | 更改前的文件路径 |
| `position[old_line]` | integer | no | 更改前的行号(用于"文本"差异注释) |
| `position[line_range]` | hash | no | 多行差异注释的行范围 |
| `position[line_range][start]` | hash | no | 多行音符起始行 |
| `position[line_range][start][line_code]` | string | yes | 起始行的行代码 |
| `position[line_range][start][type]` | string | yes | 起始线的线型 |
| `position[line_range][end]` | hash | no | 多行注释结束行 |
| `position[line_range][end][line_code]` | string | yes | 结束行的行代码 |
| `position[line_range][end][type]` | string | yes | 终点线的线型 |
| `position[width]` | integer | no | 图片宽度(用于"图片"差异注释) |
| `position[height]` | integer | no | 图片的高度(用于"图片"差异注释) |
| `position[x]` | integer | no | X 坐标(用于"图像"差异注释) |
| `position[y]` | integer | no | Y 坐标(用于"图像"差异注释) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions?body=comment"
```
### Resolve a merge request thread[](#resolve-a-merge-request-thread "Permalink")
解决/取消解决合并请求的整个线程.
```
PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `merge_request_iid` | integer | yes | 合并请求的 IID |
| `discussion_id` | integer | yes | 线程的 ID |
| `resolved` | boolean | yes | 解决/取消讨论 |
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7?resolved=true"
```
### Add note to existing merge request thread[](#add-note-to-existing-merge-request-thread "Permalink")
向该线程添加新注释. 这也可以[从单个注释创建线程](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment) .
```
POST /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `merge_request_iid` | integer | yes | 合并请求的 IID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | yes | 备注/回复的内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment"
```
### Modify an existing merge request thread note[](#modify-an-existing-merge-request-thread-note "Permalink")
修改或解决合并请求的现有线程注释.
```
PUT /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `merge_request_iid` | integer | yes | 合并请求的 IID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | no | 备注/回复的内容(必须是`body`或已`resolved`的内容之一) |
| `resolved` | boolean | no | 解析/取消解析音符(必须设置为刚好为`body`或已`resolved` |
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment"
```
解决注释:
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?resolved=true"
```
### Delete a merge request thread note[](#delete-a-merge-request-thread-note "Permalink")
删除合并请求的现有线程注释.
```
DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `merge_request_iid` | integer | yes | 合并请求的 IID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
```
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/discussions/636"
```
## Commits[](#commits "Permalink")
### List project commit discussion items[](#list-project-commit-discussion-items "Permalink")
获取单个提交的所有讨论项的列表.
```
GET /projects/:id/commits/:commit_id/discussions
```
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `commit_id` | integer | yes | 提交的 ID |
```
[ { "id": "6a9c1750b37d513a43987b574953fceb50b03ce7", "individual_note": false, "notes": [ { "id": 1126, "type": "DiscussionNote", "body": "discussion text", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-03T21:54:39.668Z", "updated_at": "2018-03-03T21:54:39.668Z", "system": false, "noteable_id": 3, "noteable_type": "Commit", "noteable_iid": null, "resolvable": false }, { "id": 1129, "type": "DiscussionNote", "body": "reply to the discussion", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T13:38:02.127Z", "updated_at": "2018-03-04T13:38:02.127Z", "system": false, "noteable_id": 3, "noteable_type": "Commit", "noteable_iid": null, "resolvable": false } ] }, { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": true, "notes": [ { "id": 1128, "type": null, "body": "a single comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Commit", "noteable_iid": null, "resolvable": false } ] } ]
```
差异评论还包含以下位置:
```
[ { "id": "87805b7c09016a7058e91bdbe7b29d1f284a39e6", "individual_note": false, "notes": [ { "id": 1128, "type": DiffNote, "body": "diff comment", "attachment": null, "author": { "id": 1, "name": "root", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/00afb8fb6ab07c3ee3e9c1f38777e2f4?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "created_at": "2018-03-04T09:17:22.520Z", "updated_at": "2018-03-04T09:17:22.520Z", "system": false, "noteable_id": 3, "noteable_type": "Commit", "noteable_iid": null, "position": { "base_sha": "b5d6e7b1613fca24d250fa8e5bc7bcc3dd6002ef", "start_sha": "7c9c2ead8a320fb7ba0b4e234bd9529a2614e306", "head_sha": "4803c71e6b1833ca72b8b26ef2ecd5adc8a38031", "old_path": "package.json", "new_path": "package.json", "position_type": "text", "old_line": 27, "new_line": 27 }, "resolvable": false } ] } ]
```
```
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions"
```
### Get single commit discussion item[](#get-single-commit-discussion-item "Permalink")
返回特定项目提交的单个讨论项
```
GET /projects/:id/commits/:commit_id/discussions/:discussion_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `commit_id` | integer | yes | 提交的 ID |
| `discussion_id` | integer | yes | 讨论项目的 ID |
```
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7"
```
### Create new commit thread[](#create-new-commit-thread "Permalink")
为单个项目提交创建一个新线程. 这类似于创建便笺,但其他注释(回复)可以在以后添加.
```
POST /projects/:id/commits/:commit_id/discussions
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `commit_id` | integer | yes | 提交的 ID |
| `body` | string | yes | 线程的内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
| `position` | hash | no | 创建差异注释时的位置 |
| `position[base_sha]` | string | yes | 源分支中的基本提交 SHA |
| `position[start_sha]` | string | yes | SHA 引用目标分支中的提交 |
| `position[head_sha]` | string | yes | SHA 引用此提交的 HEAD |
| `position[position_type]` | string | yes | 位置参考的类型",允许的值:"文本"或"图像" |
| `position[new_path]` | string | no | 更改后的文件路径 |
| `position[new_line]` | integer | no | 变更后的行号 |
| `position[old_path]` | string | no | 更改前的文件路径 |
| `position[old_line]` | integer | no | 更改前的行号 |
| `position[width]` | integer | no | 图片宽度(用于"图片"差异注释) |
| `position[height]` | integer | no | 图片的高度(用于"图片"差异注释) |
| `position[x]` | integer | no | X 坐标(用于"图像"差异注释) |
| `position[y]` | integer | no | Y 坐标(用于"图像"差异注释) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions?body=comment"
```
### Add note to existing commit thread[](#add-note-to-existing-commit-thread "Permalink")
向该线程添加新注释.
```
POST /projects/:id/commits/:commit_id/discussions/:discussion_id/notes
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `commit_id` | integer | yes | 提交的 ID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | yes | 备注/回复的内容 |
| `created_at` | string | no | 日期时间字符串,ISO 8601 格式,例如 2016-03-11T03:45:40Z(需要管理员或项目/组所有者权限) |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes?body=comment
```
### Modify an existing commit thread note[](#modify-an-existing-commit-thread-note "Permalink")
修改或解决提交的现有线程注释.
```
PUT /projects/:id/commits/:commit_id/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `commit_id` | integer | yes | 提交的 ID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
| `body` | string | no | 笔记内容 |
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?body=comment"
```
解决注释:
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/6a9c1750b37d513a43987b574953fceb50b03ce7/notes/1108?resolved=true"
```
### Delete a commit thread note[](#delete-a-commit-thread-note "Permalink")
删除提交的现有线程注释.
```
DELETE /projects/:id/commits/:commit_id/discussions/:discussion_id/notes/:note_id
```
Parameters:
| Attribute | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer/string | yes | 项目的 ID 或[URL 编码的路径](README.html#namespaced-path-encoding) |
| `commit_id` | integer | yes | 提交的 ID |
| `discussion_id` | integer | yes | 线程的 ID |
| `note_id` | integer | yes | 线程注释的 ID |
```
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/commits/11/discussions/636"
```
- GitLab Docs
- Installation
- Requirements
- GitLab cloud native Helm Chart
- Install GitLab with Docker
- Installation from source
- Install GitLab on Microsoft Azure
- Installing GitLab on Google Cloud Platform
- Installing GitLab on Amazon Web Services (AWS)
- Analytics
- Code Review Analytics
- Productivity Analytics
- Value Stream Analytics
- Kubernetes clusters
- Adding and removing Kubernetes clusters
- Adding EKS clusters
- Adding GKE clusters
- Group-level Kubernetes clusters
- Instance-level Kubernetes clusters
- Canary Deployments
- Cluster Environments
- Deploy Boards
- GitLab Managed Apps
- Crossplane configuration
- Cluster management project (alpha)
- Kubernetes Logs
- Runbooks
- Serverless
- Deploying AWS Lambda function using GitLab CI/CD
- Securing your deployed applications
- Groups
- Contribution Analytics
- Custom group-level project templates
- Epics
- Manage epics
- Group Import/Export
- Insights
- Issues Analytics
- Iterations
- Public access
- SAML SSO for GitLab.com groups
- SCIM provisioning using SAML SSO for GitLab.com groups
- Subgroups
- Roadmap
- Projects
- GitLab Secure
- Security Configuration
- Container Scanning
- Dependency Scanning
- Dependency List
- Static Application Security Testing (SAST)
- Secret Detection
- Dynamic Application Security Testing (DAST)
- GitLab Security Dashboard
- Offline environments
- Standalone Vulnerability pages
- Security scanner integration
- Badges
- Bulk editing issues and merge requests at the project level
- Code Owners
- Compliance
- License Compliance
- Compliance Dashboard
- Create a project
- Description templates
- Deploy Keys
- Deploy Tokens
- File finder
- Project integrations
- Integrations
- Atlassian Bamboo CI Service
- Bugzilla Service
- Custom Issue Tracker service
- Discord Notifications service
- Enabling emails on push
- GitHub project integration
- Hangouts Chat service
- Atlassian HipChat
- Irker IRC Gateway
- GitLab Jira integration
- Mattermost Notifications Service
- Mattermost slash commands
- Microsoft Teams service
- Mock CI Service
- Prometheus integration
- Redmine Service
- Slack Notifications Service
- Slack slash commands
- GitLab Slack application
- Webhooks
- YouTrack Service
- Insights
- Issues
- Crosslinking Issues
- Design Management
- Confidential issues
- Due dates
- Issue Boards
- Issue Data and Actions
- Labels
- Managing issues
- Milestones
- Multiple Assignees for Issues
- Related issues
- Service Desk
- Sorting and ordering issue lists
- Issue weight
- Associate a Zoom meeting with an issue
- Merge requests
- Allow collaboration on merge requests across forks
- Merge Request Approvals
- Browser Performance Testing
- How to create a merge request
- Cherry-pick changes
- Code Quality
- Load Performance Testing
- Merge Request dependencies
- Fast-forward merge requests
- Merge when pipeline succeeds
- Merge request conflict resolution
- Reverting changes
- Reviewing and managing merge requests
- Squash and merge
- Merge requests versions
- Draft merge requests
- Members of a project
- Migrating projects to a GitLab instance
- Import your project from Bitbucket Cloud to GitLab
- Import your project from Bitbucket Server to GitLab
- Migrating from ClearCase
- Migrating from CVS
- Import your project from FogBugz to GitLab
- Gemnasium
- Import your project from GitHub to GitLab
- Project importing from GitLab.com to your private GitLab instance
- Import your project from Gitea to GitLab
- Import your Jira project issues to GitLab
- Migrating from Perforce Helix
- Import Phabricator tasks into a GitLab project
- Import multiple repositories by uploading a manifest file
- Import project from repo by URL
- Migrating from SVN to GitLab
- Migrating from TFVC to Git
- Push Options
- Releases
- Repository
- Branches
- Git Attributes
- File Locking
- Git file blame
- Git file history
- Repository mirroring
- Protected branches
- Protected tags
- Push Rules
- Reduce repository size
- Signing commits with GPG
- Syntax Highlighting
- GitLab Web Editor
- Web IDE
- Requirements Management
- Project settings
- Project import/export
- Project access tokens (Alpha)
- Share Projects with other Groups
- Snippets
- Static Site Editor
- Wiki
- Project operations
- Monitor metrics for your CI/CD environment
- Set up alerts for Prometheus metrics
- Embedding metric charts within GitLab-flavored Markdown
- Embedding Grafana charts
- Using the Metrics Dashboard
- Dashboard YAML properties
- Metrics dashboard settings
- Panel types for dashboards
- Using Variables
- Templating variables for metrics dashboards
- Prometheus Metrics library
- Monitoring AWS Resources
- Monitoring HAProxy
- Monitoring Kubernetes
- Monitoring NGINX
- Monitoring NGINX Ingress Controller
- Monitoring NGINX Ingress Controller with VTS metrics
- Alert Management
- Error Tracking
- Tracing
- Incident Management
- GitLab Status Page
- Feature Flags
- GitLab CI/CD
- GitLab CI/CD pipeline configuration reference
- GitLab CI/CD include examples
- Introduction to CI/CD with GitLab
- Getting started with GitLab CI/CD
- How to enable or disable GitLab CI/CD
- Using SSH keys with GitLab CI/CD
- Migrating from CircleCI
- Migrating from Jenkins
- Auto DevOps
- Getting started with Auto DevOps
- Requirements for Auto DevOps
- Customizing Auto DevOps
- Stages of Auto DevOps
- Upgrading PostgreSQL for Auto DevOps
- Cache dependencies in GitLab CI/CD
- GitLab ChatOps
- Cloud deployment
- Docker integration
- Building Docker images with GitLab CI/CD
- Using Docker images
- Building images with kaniko and GitLab CI/CD
- GitLab CI/CD environment variables
- Predefined environment variables reference
- Where variables can be used
- Deprecated GitLab CI/CD variables
- Environments and deployments
- Protected Environments
- GitLab CI/CD Examples
- Test a Clojure application with GitLab CI/CD
- Using Dpl as deployment tool
- Testing a Phoenix application with GitLab CI/CD
- End-to-end testing with GitLab CI/CD and WebdriverIO
- DevOps and Game Dev with GitLab CI/CD
- Deploy a Spring Boot application to Cloud Foundry with GitLab CI/CD
- How to deploy Maven projects to Artifactory with GitLab CI/CD
- Testing PHP projects
- Running Composer and NPM scripts with deployment via SCP in GitLab CI/CD
- Test and deploy Laravel applications with GitLab CI/CD and Envoy
- Test and deploy a Python application with GitLab CI/CD
- Test and deploy a Ruby application with GitLab CI/CD
- Test and deploy a Scala application to Heroku
- GitLab CI/CD for external repositories
- Using GitLab CI/CD with a Bitbucket Cloud repository
- Using GitLab CI/CD with a GitHub repository
- GitLab Pages
- GitLab Pages
- GitLab Pages domain names, URLs, and baseurls
- Create a GitLab Pages website from scratch
- Custom domains and SSL/TLS Certificates
- GitLab Pages integration with Let's Encrypt
- GitLab Pages Access Control
- Exploring GitLab Pages
- Incremental Rollouts with GitLab CI/CD
- Interactive Web Terminals
- Optimizing GitLab for large repositories
- Metrics Reports
- CI/CD pipelines
- Pipeline Architecture
- Directed Acyclic Graph
- Multi-project pipelines
- Parent-child pipelines
- Pipelines for Merge Requests
- Pipelines for Merged Results
- Merge Trains
- Job artifacts
- Pipeline schedules
- Pipeline settings
- Triggering pipelines through the API
- Review Apps
- Configuring GitLab Runners
- GitLab CI services examples
- Using MySQL
- Using PostgreSQL
- Using Redis
- Troubleshooting CI/CD
- GitLab Package Registry
- GitLab Container Registry
- Dependency Proxy
- GitLab Composer Repository
- GitLab Conan Repository
- GitLab Maven Repository
- GitLab NPM Registry
- GitLab NuGet Repository
- GitLab PyPi Repository
- API Docs
- API resources
- .gitignore API
- GitLab CI YMLs API
- Group and project access requests API
- Appearance API
- Applications API
- Audit Events API
- Avatar API
- Award Emoji API
- Project badges API
- Group badges API
- Branches API
- Broadcast Messages API
- Project clusters API
- Group clusters API
- Instance clusters API
- Commits API
- Container Registry API
- Custom Attributes API
- Dashboard annotations API
- Dependencies API
- Deploy Keys API
- Deployments API
- Discussions API
- Dockerfiles API
- Environments API
- Epics API
- Events
- Feature Flags API
- Feature flag user lists API
- Freeze Periods API
- Geo Nodes API
- Group Activity Analytics API
- Groups API
- Import API
- Issue Boards API
- Group Issue Boards API
- Issues API
- Epic Issues API
- Issues Statistics API
- Jobs API
- Keys API
- Labels API
- Group Labels API
- License
- Licenses API
- Issue links API
- Epic Links API
- Managed Licenses API
- Markdown API
- Group and project members API
- Merge request approvals API
- Merge requests API
- Project milestones API
- Group milestones API
- Namespaces API
- Notes API
- Notification settings API
- Packages API
- Pages domains API
- Pipeline schedules API
- Pipeline triggers API
- Pipelines API
- Project Aliases API
- Project import/export API
- Project repository storage moves API
- Project statistics API
- Project templates API
- Projects API
- Protected branches API
- Protected tags API
- Releases API
- Release links API
- Repositories API
- Repository files API
- Repository submodules API
- Resource label events API
- Resource milestone events API
- Resource weight events API
- Runners API
- SCIM API
- Search API
- Services API
- Application settings API
- Sidekiq Metrics API
- Snippets API
- Project snippets
- Application statistics API
- Suggest Changes API
- System hooks API
- Tags API
- Todos API
- Users API
- Project-level Variables API
- Group-level Variables API
- Version API
- Vulnerabilities API
- Vulnerability Findings API
- Wikis API
- GraphQL API
- Getting started with GitLab GraphQL API
- GraphQL API Resources
- API V3 to API V4
- Validate the .gitlab-ci.yml (API)
- User Docs
- Abuse reports
- User account
- Active sessions
- Deleting a User account
- Permissions
- Personal access tokens
- Profile preferences
- Threads
- GitLab and SSH keys
- GitLab integrations
- Git
- GitLab.com settings
- Infrastructure as code with Terraform and GitLab
- GitLab keyboard shortcuts
- GitLab Markdown
- AsciiDoc
- GitLab Notification Emails
- GitLab Quick Actions
- Autocomplete characters
- Reserved project and group names
- Search through GitLab
- Advanced Global Search
- Advanced Syntax Search
- Time Tracking
- GitLab To-Do List
- Administrator Docs
- Reference architectures
- Reference architecture: up to 1,000 users
- Reference architecture: up to 2,000 users
- Reference architecture: up to 3,000 users
- Reference architecture: up to 5,000 users
- Reference architecture: up to 10,000 users
- Reference architecture: up to 25,000 users
- Reference architecture: up to 50,000 users
- Troubleshooting a reference architecture set up
- Working with the bundled Consul service
- Configuring PostgreSQL for scaling
- Configuring GitLab application (Rails)
- Load Balancer for multi-node GitLab
- Configuring a Monitoring node for Scaling and High Availability
- NFS
- Working with the bundled PgBouncer service
- Configuring Redis for scaling
- Configuring Sidekiq
- Admin Area settings
- Continuous Integration and Deployment Admin settings
- Custom instance-level project templates
- Diff limits administration
- Enable and disable GitLab features deployed behind feature flags
- Geo nodes Admin Area
- GitLab Pages administration
- Health Check
- Job logs
- Labels administration
- Log system
- PlantUML & GitLab
- Repository checks
- Repository storage paths
- Repository storage types
- Account and limit settings
- Service templates
- System hooks
- Changing your time zone
- Uploads administration
- Abuse reports
- Activating and deactivating users
- Audit Events
- Blocking and unblocking users
- Broadcast Messages
- Elasticsearch integration
- Gitaly
- Gitaly Cluster
- Gitaly reference
- Monitoring GitLab
- Monitoring GitLab with Prometheus
- Performance Bar
- Usage statistics
- Object Storage
- Performing Operations in GitLab
- Cleaning up stale Redis sessions
- Fast lookup of authorized SSH keys in the database
- Filesystem Performance Benchmarking
- Moving repositories managed by GitLab
- Run multiple Sidekiq processes
- Sidekiq MemoryKiller
- Switching to Puma
- Understanding Unicorn and unicorn-worker-killer
- User lookup via OpenSSH's AuthorizedPrincipalsCommand
- GitLab Package Registry administration
- GitLab Container Registry administration
- Replication (Geo)
- Geo database replication
- Geo with external PostgreSQL instances
- Geo configuration
- Using a Geo Server
- Updating the Geo nodes
- Geo with Object storage
- Docker Registry for a secondary node
- Geo for multiple nodes
- Geo security review (Q&A)
- Location-aware Git remote URL with AWS Route53
- Tuning Geo
- Removing secondary Geo nodes
- Geo data types support
- Geo Frequently Asked Questions
- Geo Troubleshooting
- Geo validation tests
- Disaster Recovery (Geo)
- Disaster recovery for planned failover
- Bring a demoted primary node back online
- Automatic background verification
- Rake tasks
- Back up and restore GitLab
- Clean up
- Namespaces
- Maintenance Rake tasks
- Geo Rake Tasks
- GitHub import
- Import bare repositories
- Integrity check Rake task
- LDAP Rake tasks
- Listing repository directories
- Praefect Rake tasks
- Project import/export administration
- Repository storage Rake tasks
- Generate sample Prometheus data
- Uploads migrate Rake tasks
- Uploads sanitize Rake tasks
- User management
- Webhooks administration
- X.509 signatures
- Server hooks
- Static objects external storage
- Updating GitLab
- GitLab release and maintenance policy
- Security
- Password Storage
- Custom password length limits
- Restrict allowed SSH key technologies and minimum length
- Rate limits
- Webhooks and insecure internal web services
- Information exclusivity
- How to reset your root password
- How to unlock a locked user from the command line
- User File Uploads
- How we manage the TLS protocol CRIME vulnerability
- User email confirmation at sign-up
- Security of running jobs
- Proxying assets
- CI/CD Environment Variables
- Contributor and Development Docs
- Contribute to GitLab
- Community members & roles
- Implement design & UI elements
- Issues workflow
- Merge requests workflow
- Code Review Guidelines
- Style guides
- GitLab Architecture Overview
- CI/CD development documentation
- Database guides
- Database Review Guidelines
- Database Review Guidelines
- Migration Style Guide
- What requires downtime?
- Understanding EXPLAIN plans
- Rake tasks for developers
- Mass inserting Rails models
- GitLab Documentation guidelines
- Documentation Style Guide
- Documentation structure and template
- Documentation process
- Documentation site architecture
- Global navigation
- GitLab Docs monthly release process
- Telemetry Guide
- Usage Ping Guide
- Snowplow Guide
- Experiment Guide
- Feature flags in development of GitLab
- Feature flags process
- Developing with feature flags
- Feature flag controls
- Document features deployed behind feature flags
- Frontend Development Guidelines
- Accessibility & Readability
- Ajax
- Architecture
- Axios
- Design Patterns
- Frontend Development Process
- DropLab
- Emojis
- Filter
- Frontend FAQ
- GraphQL
- Icons and SVG Illustrations
- InputSetter
- Performance
- Principles
- Security
- Tooling
- Vuex
- Vue
- Geo (development)
- Geo self-service framework (alpha)
- Gitaly developers guide
- GitLab development style guides
- API style guide
- Go standards and style guidelines
- GraphQL API style guide
- Guidelines for shell commands in the GitLab codebase
- HTML style guide
- JavaScript style guide
- Migration Style Guide
- Newlines style guide
- Python Development Guidelines
- SCSS style guide
- Shell scripting standards and style guidelines
- Sidekiq debugging
- Sidekiq Style Guide
- SQL Query Guidelines
- Vue.js style guide
- Instrumenting Ruby code
- Testing standards and style guidelines
- Flaky tests
- Frontend testing standards and style guidelines
- GitLab tests in the Continuous Integration (CI) context
- Review Apps
- Smoke Tests
- Testing best practices
- Testing levels
- Testing Rails migrations at GitLab
- Testing Rake tasks
- End-to-end Testing
- Beginner's guide to writing end-to-end tests
- End-to-end testing Best Practices
- Dynamic Element Validation
- Flows in GitLab QA
- Page objects in GitLab QA
- Resource class in GitLab QA
- Style guide for writing end-to-end tests
- Testing with feature flags
- Translate GitLab to your language
- Internationalization for GitLab
- Translating GitLab
- Proofread Translations
- Merging translations from CrowdIn
- Value Stream Analytics development guide
- GitLab subscription
- Activate GitLab EE with a license