# Services API
> 原文:[https://docs.gitlab.com/ee/api/services.html](https://docs.gitlab.com/ee/api/services.html)
* [List all active services](#list-all-active-services)
* [Asana](#asana)
* [Create/Edit Asana service](#createedit-asana-service)
* [Delete Asana service](#delete-asana-service)
* [Get Asana service settings](#get-asana-service-settings)
* [Assembla](#assembla)
* [Create/Edit Assembla service](#createedit-assembla-service)
* [Delete Assembla service](#delete-assembla-service)
* [Get Assembla service settings](#get-assembla-service-settings)
* [Atlassian Bamboo CI](#atlassian-bamboo-ci)
* [Create/Edit Atlassian Bamboo CI service](#createedit-atlassian-bamboo-ci-service)
* [Delete Atlassian Bamboo CI service](#delete-atlassian-bamboo-ci-service)
* [Get Atlassian Bamboo CI service settings](#get-atlassian-bamboo-ci-service-settings)
* [Bugzilla](#bugzilla)
* [Create/Edit Bugzilla service](#createedit-bugzilla-service)
* [Delete Bugzilla Service](#delete-bugzilla-service)
* [Get Bugzilla Service Settings](#get-bugzilla-service-settings)
* [Buildkite](#buildkite)
* [Create/Edit Buildkite service](#createedit-buildkite-service)
* [Delete Buildkite service](#delete-buildkite-service)
* [Get Buildkite service settings](#get-buildkite-service-settings)
* [Campfire](#campfire)
* [Create/Edit Campfire service](#createedit-campfire-service)
* [Delete Campfire service](#delete-campfire-service)
* [Get Campfire service settings](#get-campfire-service-settings)
* [Unify Circuit](#unify-circuit)
* [Create/Edit Unify Circuit service](#createedit-unify-circuit-service)
* [Delete Unify Circuit service](#delete-unify-circuit-service)
* [Get Unify Circuit service settings](#get-unify-circuit-service-settings)
* [Webex Teams](#webex-teams)
* [Create/Edit Webex Teams service](#createedit-webex-teams-service)
* [Delete Webex Teams service](#delete-webex-teams-service)
* [Get Webex Teams service settings](#get-webex-teams-service-settings)
* [Custom Issue Tracker](#custom-issue-tracker)
* [Create/Edit Custom Issue Tracker service](#createedit-custom-issue-tracker-service)
* [Delete Custom Issue Tracker service](#delete-custom-issue-tracker-service)
* [Get Custom Issue Tracker service settings](#get-custom-issue-tracker-service-settings)
* [Drone CI](#drone-ci)
* [Create/Edit Drone CI service](#createedit-drone-ci-service)
* [Delete Drone CI service](#delete-drone-ci-service)
* [Get Drone CI service settings](#get-drone-ci-service-settings)
* [Emails on push](#emails-on-push)
* [Create/Edit Emails on push service](#createedit-emails-on-push-service)
* [Delete Emails on push service](#delete-emails-on-push-service)
* [Get Emails on push service settings](#get-emails-on-push-service-settings)
* [Confluence service](#confluence-service)
* [Create/Edit Confluence service](#createedit-confluence-service)
* [Delete Confluence service](#delete-confluence-service)
* [Get Confluence service settings](#get-confluence-service-settings)
* [External Wiki](#external-wiki)
* [Create/Edit External Wiki service](#createedit-external-wiki-service)
* [Delete External Wiki service](#delete-external-wiki-service)
* [Get External Wiki service settings](#get-external-wiki-service-settings)
* [Flowdock](#flowdock)
* [Create/Edit Flowdock service](#createedit-flowdock-service)
* [Delete Flowdock service](#delete-flowdock-service)
* [Get Flowdock service settings](#get-flowdock-service-settings)
* [GitHub](#github-premium)
* [Create/Edit GitHub service](#createedit-github-service)
* [Delete GitHub service](#delete-github-service)
* [Get GitHub service settings](#get-github-service-settings)
* [Hangouts Chat](#hangouts-chat)
* [Create/Edit Hangouts Chat service](#createedit-hangouts-chat-service)
* [Delete Hangouts Chat service](#delete-hangouts-chat-service)
* [Get Hangouts Chat service settings](#get-hangouts-chat-service-settings)
* [HipChat](#hipchat)
* [Create/Edit HipChat service](#createedit-hipchat-service)
* [Delete HipChat service](#delete-hipchat-service)
* [Get HipChat service settings](#get-hipchat-service-settings)
* [Irker (IRC gateway)](#irker-irc-gateway)
* [Create/Edit Irker (IRC gateway) service](#createedit-irker-irc-gateway-service)
* [Delete Irker (IRC gateway) service](#delete-irker-irc-gateway-service)
* [Get Irker (IRC gateway) service settings](#get-irker-irc-gateway-service-settings)
* [Jira](#jira)
* [Get Jira service settings](#get-jira-service-settings)
* [Create/Edit Jira service](#createedit-jira-service)
* [Delete Jira service](#delete-jira-service)
* [Slack slash commands](#slack-slash-commands)
* [Get Slack slash command service settings](#get-slack-slash-command-service-settings)
* [Create/Edit Slack slash command service](#createedit-slack-slash-command-service)
* [Delete Slack slash command service](#delete-slack-slash-command-service)
* [Mattermost slash commands](#mattermost-slash-commands)
* [Get Mattermost slash command service settings](#get-mattermost-slash-command-service-settings)
* [Create/Edit Mattermost slash command service](#createedit-mattermost-slash-command-service)
* [Delete Mattermost slash command service](#delete-mattermost-slash-command-service)
* [Packagist](#packagist)
* [Create/Edit Packagist service](#createedit-packagist-service)
* [Delete Packagist service](#delete-packagist-service)
* [Get Packagist service settings](#get-packagist-service-settings)
* [Pipeline-Emails](#pipeline-emails)
* [Create/Edit Pipeline-Emails service](#createedit-pipeline-emails-service)
* [Delete Pipeline-Emails service](#delete-pipeline-emails-service)
* [Get Pipeline-Emails service settings](#get-pipeline-emails-service-settings)
* [PivotalTracker](#pivotaltracker)
* [Create/Edit PivotalTracker service](#createedit-pivotaltracker-service)
* [Delete PivotalTracker service](#delete-pivotaltracker-service)
* [Get PivotalTracker service settings](#get-pivotaltracker-service-settings)
* [Prometheus](#prometheus)
* [Create/Edit Prometheus service](#createedit-prometheus-service)
* [Delete Prometheus service](#delete-prometheus-service)
* [Get Prometheus service settings](#get-prometheus-service-settings)
* [Pushover](#pushover)
* [Create/Edit Pushover service](#createedit-pushover-service)
* [Delete Pushover service](#delete-pushover-service)
* [Get Pushover service settings](#get-pushover-service-settings)
* [Redmine](#redmine)
* [Create/Edit Redmine service](#createedit-redmine-service)
* [Delete Redmine service](#delete-redmine-service)
* [Get Redmine service settings](#get-redmine-service-settings)
* [Slack notifications](#slack-notifications)
* [Create/Edit Slack service](#createedit-slack-service)
* [Delete Slack service](#delete-slack-service)
* [Get Slack service settings](#get-slack-service-settings)
* [Microsoft Teams](#microsoft-teams)
* [Create/Edit Microsoft Teams service](#createedit-microsoft-teams-service)
* [Delete Microsoft Teams service](#delete-microsoft-teams-service)
* [Get Microsoft Teams service settings](#get-microsoft-teams-service-settings)
* [Mattermost notifications](#mattermost-notifications)
* [Create/Edit Mattermost notifications service](#createedit-mattermost-notifications-service)
* [Delete Mattermost notifications service](#delete-mattermost-notifications-service)
* [Get Mattermost notifications service settings](#get-mattermost-notifications-service-settings)
* [JetBrains TeamCity CI](#jetbrains-teamcity-ci)
* [Create/Edit JetBrains TeamCity CI service](#createedit-jetbrains-teamcity-ci-service)
* [Delete JetBrains TeamCity CI service](#delete-jetbrains-teamcity-ci-service)
* [Get JetBrains TeamCity CI service settings](#get-jetbrains-teamcity-ci-service-settings)
* [Jenkins CI](#jenkins-ci-starter)
* [Create/Edit Jenkins CI service](#createedit-jenkins-ci-service)
* [Delete Jenkins CI service](#delete-jenkins-ci-service)
* [Get Jenkins CI service settings](#get-jenkins-ci-service-settings)
* [Jenkins CI (Deprecated) Service](#jenkins-ci-deprecated-service)
* [Create/Edit Jenkins CI (Deprecated) service](#createedit-jenkins-ci-deprecated-service)
* [Delete Jenkins CI (Deprecated) service](#delete-jenkins-ci-deprecated-service)
* [Get Jenkins CI (Deprecated) service settings](#get-jenkins-ci-deprecated-service-settings)
* [MockCI](#mockci)
* [Create/Edit MockCI service](#createedit-mockci-service)
* [Delete MockCI service](#delete-mockci-service)
* [Get MockCI service settings](#get-mockci-service-settings)
* [YouTrack](#youtrack)
* [Create/Edit YouTrack service](#createedit-youtrack-service)
* [Delete YouTrack Service](#delete-youtrack-service)
* [Get YouTrack Service Settings](#get-youtrack-service-settings)
# Services API[](#services-api "Permalink")
> **注意:**此 API 需要具有维护者或所有者权限的访问令牌
## List all active services[](#list-all-active-services "Permalink")
在 GitLab 12.7 中[引入](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/21330) .
获取所有活动项目服务的列表.
```
GET /projects/:id/services
```
响应示例:
```
[ { "id": 75, "title": "Jenkins CI", "slug": "jenkins", "created_at": "2019-11-20T11:20:25.297Z", "updated_at": "2019-11-20T12:24:37.498Z", "active": true, "commit_events": true, "push_events": true, "issues_events": true, "confidential_issues_events": true, "merge_requests_events": true, "tag_push_events": false, "note_events": true, "confidential_note_events": true, "pipeline_events": true, "wiki_page_events": true, "job_events": true, "comment_on_event_enabled": true } { "id": 76, "title": "Alerts endpoint", "slug": "alerts", "created_at": "2019-11-20T11:20:25.297Z", "updated_at": "2019-11-20T12:24:37.498Z", "active": true, "commit_events": true, "push_events": true, "issues_events": true, "confidential_issues_events": true, "merge_requests_events": true, "tag_push_events": true, "note_events": true, "confidential_note_events": true, "pipeline_events": true, "wiki_page_events": true, "job_events": true, "comment_on_event_enabled": true } ]
```
## Asana[](#asana "Permalink")
Asana-无需电子邮件的团队合作
### Create/Edit Asana service[](#createedit-asana-service "Permalink")
为项目设置 Asana 服务.
> 该服务将提交消息添加为 Asana 任务的注释. 启用后,将检查提交消息中的 Asana 任务 URL(例如`https://app.asana.com/0/123456/987654` )或以#开头的任务 ID(例如`#987654` ). 找到的每个任务 ID 都会在其中添加提交注释. 您还可以通过以下消息关闭任务: `fix #123456` . 您可以在以下位置找到您的 API 密钥: [https](https://developers.asana.com/docs/#authentication-basics) : [//developers.asana.com/docs/#authentication-basics](https://developers.asana.com/docs/#authentication-basics) .
```
PUT /projects/:id/services/asana
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `api_key` | string | true | 用户 API 令牌. 用户必须有权访问任务,所有评论都将归于该用户. |
| `restrict_to_branch` | string | false | 以逗号分隔的分支列表,将自动对其进行检查. 保留空白以包括所有分支. |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Asana service[](#delete-asana-service "Permalink")
删除项目的 Asana 服务.
```
DELETE /projects/:id/services/asana
```
### Get Asana service settings[](#get-asana-service-settings "Permalink")
获取项目的 Asana 服务设置.
```
GET /projects/:id/services/asana
```
## Assembla[](#assembla "Permalink")
项目管理软件(源提交端点)
### Create/Edit Assembla service[](#createedit-assembla-service "Permalink")
为项目设置 Assembla 服务.
```
PUT /projects/:id/services/assembla
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | true | 认证令牌 |
| `subdomain` | string | false | 子域设置 |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Assembla service[](#delete-assembla-service "Permalink")
删除项目的 Assembla 服务.
```
DELETE /projects/:id/services/assembla
```
### Get Assembla service settings[](#get-assembla-service-settings "Permalink")
获取项目的 Assembla 服务设置.
```
GET /projects/:id/services/assembla
```
## Atlassian Bamboo CI[](#atlassian-bamboo-ci "Permalink")
持续集成和构建服务器
### Create/Edit Atlassian Bamboo CI service[](#createedit-atlassian-bamboo-ci-service "Permalink")
为项目设置 Atlassian Bamboo CI 服务.
> 您必须在 Bamboo 中设置自动修订标签和存储库触发器.
```
PUT /projects/:id/services/bamboo
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `bamboo_url` | string | true | 竹根 URL. 例如, `https://bamboo.example.com` . |
| `build_key` | string | true | 竹构建计划密钥,如 KEY |
| `username` | string | true | 具有 API 访问权限的用户(如果适用) |
| `password` | string | true | 用户密码 |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Atlassian Bamboo CI service[](#delete-atlassian-bamboo-ci-service "Permalink")
删除项目的 Atlassian Bamboo CI 服务.
```
DELETE /projects/:id/services/bamboo
```
### Get Atlassian Bamboo CI service settings[](#get-atlassian-bamboo-ci-service-settings "Permalink")
获取项目的 Atlassian Bamboo CI 服务设置.
```
GET /projects/:id/services/bamboo
```
## Bugzilla[](#bugzilla "Permalink")
Bugzilla 问题追踪器
### Create/Edit Bugzilla service[](#createedit-bugzilla-service "Permalink")
为项目设置 Bugzilla 服务.
```
PUT /projects/:id/services/bugzilla
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `new_issue_url` | string | true | 新发行网址 |
| `issues_url` | string | true | 发行网址 |
| `project_url` | string | true | 项目网址 |
| `description` | string | false | Description |
| `title` | string | false | Title |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Bugzilla Service[](#delete-bugzilla-service "Permalink")
删除项目的 Bugzilla 服务.
```
DELETE /projects/:id/services/bugzilla
```
### Get Bugzilla Service Settings[](#get-bugzilla-service-settings "Permalink")
获取项目的 Bugzilla 服务设置.
```
GET /projects/:id/services/bugzilla
```
## Buildkite[](#buildkite "Permalink")
持续集成和部署
### Create/Edit Buildkite service[](#createedit-buildkite-service "Permalink")
为项目设置 Buildkite 服务.
```
PUT /projects/:id/services/buildkite
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | true | Buildkite 项目 GitLab 令牌 |
| `project_url` | string | true | `https://buildkite.com/example/project` |
| `enable_ssl_verification` | boolean | false | 启用 SSL 验证 |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Buildkite service[](#delete-buildkite-service "Permalink")
删除项目的 Buildkite 服务.
```
DELETE /projects/:id/services/buildkite
```
### Get Buildkite service settings[](#get-buildkite-service-settings "Permalink")
获取项目的 Buildkite 服务设置.
```
GET /projects/:id/services/buildkite
```
## Campfire[](#campfire "Permalink")
基于网络的简单实时群聊
### Create/Edit Campfire service[](#createedit-campfire-service "Permalink")
为项目设置篝火服务.
```
PUT /projects/:id/services/campfire
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | true | 篝火令牌 |
| `subdomain` | string | false | 篝火子域 |
| `room` | string | false | 篝火室 |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Campfire service[](#delete-campfire-service "Permalink")
删除项目的 Campfire 服务.
```
DELETE /projects/:id/services/campfire
```
### Get Campfire service settings[](#get-campfire-service-settings "Permalink")
获取项目的 Campfire 服务设置.
```
GET /projects/:id/services/campfire
```
## Unify Circuit[](#unify-circuit "Permalink")
统一电路 RTC 和协作工具.
### Create/Edit Unify Circuit service[](#createedit-unify-circuit-service "Permalink")
为项目设置"统一电路"服务.
```
PUT /projects/:id/services/unify-circuit
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `webhook` | string | true | 统一电路网络挂钩. 例如, `https://circuit.com/rest/v2/webhooks/incoming/...` |
| `notify_only_broken_pipelines` | boolean | false | 发送有关管道中断的通知 |
| `branches_to_be_notified` | string | all | 发送通知的分支. 有效选项为"所有","默认","受保护"和" default_and_protected" |
| `push_events` | boolean | false | 启用推送事件通知 |
| `issues_events` | boolean | false | 启用问题事件通知 |
| `confidential_issues_events` | boolean | false | 启用机密问题事件的通知 |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
| `note_events` | boolean | false | 启用笔记事件通知 |
| `confidential_note_events` | boolean | false | 启用机密笔记事件的通知 |
| `pipeline_events` | boolean | false | 启用管道事件通知 |
| `wiki_page_events` | boolean | false | 启用 Wiki 页面事件的通知 |
### Delete Unify Circuit service[](#delete-unify-circuit-service "Permalink")
删除项目的统一电路服务.
```
DELETE /projects/:id/services/unify-circuit
```
### Get Unify Circuit service settings[](#get-unify-circuit-service-settings "Permalink")
获取项目的统一电路服务设置.
```
GET /projects/:id/services/unify-circuit
```
## Webex Teams[](#webex-teams "Permalink")
Webex Teams 协作工具.
### Create/Edit Webex Teams service[](#createedit-webex-teams-service "Permalink")
为项目设置 Webex Teams 服务.
```
PUT /projects/:id/services/webex-teams
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `webhook` | string | true | Webex Teams Webhook. 例如, `https://api.ciscospark.com/v1/webhooks/incoming/...` |
| `notify_only_broken_pipelines` | boolean | false | 发送有关管道中断的通知 |
| `branches_to_be_notified` | string | all | 发送通知的分支. 有效选项为"所有","默认","受保护"和" default_and_protected" |
| `push_events` | boolean | false | 启用推送事件通知 |
| `issues_events` | boolean | false | 启用问题事件通知 |
| `confidential_issues_events` | boolean | false | 启用机密问题事件的通知 |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
| `note_events` | boolean | false | 启用笔记事件通知 |
| `confidential_note_events` | boolean | false | 启用机密笔记事件的通知 |
| `pipeline_events` | boolean | false | 启用管道事件通知 |
| `wiki_page_events` | boolean | false | 启用 Wiki 页面事件的通知 |
### Delete Webex Teams service[](#delete-webex-teams-service "Permalink")
删除项目的 Webex Teams 服务.
```
DELETE /projects/:id/services/webex-teams
```
### Get Webex Teams service settings[](#get-webex-teams-service-settings "Permalink")
获取项目的 Webex Teams 服务设置.
```
GET /projects/:id/services/webex-teams
```
## Custom Issue Tracker[](#custom-issue-tracker "Permalink")
自定义问题跟踪器
### Create/Edit Custom Issue Tracker service[](#createedit-custom-issue-tracker-service "Permalink")
为项目设置自定义问题跟踪服务.
```
PUT /projects/:id/services/custom-issue-tracker
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `new_issue_url` | string | true | 新发行网址 |
| `issues_url` | string | true | 发行网址 |
| `project_url` | string | true | 项目网址 |
| `description` | string | false | Description |
| `title` | string | false | Title |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Custom Issue Tracker service[](#delete-custom-issue-tracker-service "Permalink")
删除项目的自定义问题跟踪服务.
```
DELETE /projects/:id/services/custom-issue-tracker
```
### Get Custom Issue Tracker service settings[](#get-custom-issue-tracker-service-settings "Permalink")
获取项目的自定义问题跟踪服务设置.
```
GET /projects/:id/services/custom-issue-tracker
```
## Drone CI[](#drone-ci "Permalink")
Drone 是一个基于 Go 编写的基于 Docker 的持续集成平台
### Create/Edit Drone CI service[](#createedit-drone-ci-service "Permalink")
为项目设置 Drone CI 服务.
```
PUT /projects/:id/services/drone-ci
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | true | 无人机 CI 项目专用令牌 |
| `drone_url` | string | true | `http://drone.example.com` |
| `enable_ssl_verification` | boolean | false | 启用 SSL 验证 |
| `push_events` | boolean | false | 启用推送事件通知 |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
### Delete Drone CI service[](#delete-drone-ci-service "Permalink")
删除项目的 Drone CI 服务.
```
DELETE /projects/:id/services/drone-ci
```
### Get Drone CI service settings[](#get-drone-ci-service-settings "Permalink")
获取项目的 Drone CI 服务设置.
```
GET /projects/:id/services/drone-ci
```
## Emails on push[](#emails-on-push "Permalink")
通过电子邮件将每次推送的提交和差异发送到收件人列表.
### Create/Edit Emails on push service[](#createedit-emails-on-push-service "Permalink")
在项目的推送服务上设置电子邮件.
```
PUT /projects/:id/services/emails-on-push
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `recipients` | string | true | 用空格分隔的电子邮件 |
| `disable_diffs` | boolean | false | 禁用代码差异 |
| `send_from_committer_email` | boolean | false | 从提交者发送 |
| `push_events` | boolean | false | 启用推送事件通知 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
| `branches_to_be_notified` | string | all | 发送通知的分支. 有效选项为"所有","默认","受保护"和" default_and_protected". 推送标签会始终触发通知. |
### Delete Emails on push service[](#delete-emails-on-push-service "Permalink")
删除项目的推送服务电子邮件.
```
DELETE /projects/:id/services/emails-on-push
```
### Get Emails on push service settings[](#get-emails-on-push-service-settings "Permalink")
获取有关项目的推送服务设置的电子邮件.
```
GET /projects/:id/services/emails-on-push
```
## Confluence service[](#confluence-service "Permalink")
版本历史
* 在 GitLab 13.2 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/220934) .
将到内部 Wiki 的链接替换为到 Confluence Cloud Workspace 的链接.
### Create/Edit Confluence service[](#createedit-confluence-service "Permalink")
为项目设置 Confluence 服务.
```
PUT /projects/:id/services/confluence
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `confluence_url` | string | true | Confluence Cloud Workspace 的 URL 托管在 atlassian.net 上. |
### Delete Confluence service[](#delete-confluence-service "Permalink")
删除项目的 Confluence 服务.
```
DELETE /projects/:id/services/confluence
```
### Get Confluence service settings[](#get-confluence-service-settings "Permalink")
获取项目的 Confluence 服务设置.
```
GET /projects/:id/services/confluence
```
## External Wiki[](#external-wiki "Permalink")
将指向内部 Wiki 的链接替换为指向外部 Wiki 的链接.
### Create/Edit External Wiki service[](#createedit-external-wiki-service "Permalink")
为项目设置外部 Wiki 服务.
```
PUT /projects/:id/services/external-wiki
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `external_wiki_url` | string | true | 外部 Wiki 的 URL |
### Delete External Wiki service[](#delete-external-wiki-service "Permalink")
删除项目的外部 Wiki 服务.
```
DELETE /projects/:id/services/external-wiki
```
### Get External Wiki service settings[](#get-external-wiki-service-settings "Permalink")
获取项目的外部 Wiki 服务设置.
```
GET /projects/:id/services/external-wiki
```
## Flowdock[](#flowdock "Permalink")
Flowdock 是面向技术团队的协作 Web 应用程序.
### Create/Edit Flowdock service[](#createedit-flowdock-service "Permalink")
为项目设置 Flowdock 服务.
```
PUT /projects/:id/services/flowdock
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | true | Flowdock Git 源令牌 |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Flowdock service[](#delete-flowdock-service "Permalink")
删除项目的 Flowdock 服务.
```
DELETE /projects/:id/services/flowdock
```
### Get Flowdock service settings[](#get-flowdock-service-settings "Permalink")
获取项目的 Flowdock 服务设置.
```
GET /projects/:id/services/flowdock
```
## GitHub[](#github-premium "Permalink")
代码协作软件.
### Create/Edit GitHub service[](#createedit-github-service "Permalink")
为项目设置 GitHub 服务.
```
PUT /projects/:id/services/github
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | true | 具有`repo:status` OAuth 范围的 GitHub API 令牌 |
| `repository_url` | string | true | GitHub 存储库 URL |
| `static_context` | boolean | false | 将实例名称而不是分支附加到[状态检查名称](../user/project/integrations/github.html#static--dynamic-status-check-names) |
### Delete GitHub service[](#delete-github-service "Permalink")
删除项目的 GitHub 服务.
```
DELETE /projects/:id/services/github
```
### Get GitHub service settings[](#get-github-service-settings "Permalink")
获取项目的 GitHub 服务设置.
```
GET /projects/:id/services/github
```
## Hangouts Chat[](#hangouts-chat "Permalink")
Google GSuite 团队协作工具.
> **注意:**此服务是[在 v11.2](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/20290)中[引入的](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/20290)
### Create/Edit Hangouts Chat service[](#createedit-hangouts-chat-service "Permalink")
为项目设置环聊聊天服务.
```
PUT /projects/:id/services/hangouts-chat
```
> **注意:** [v10.4](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11435)中[引入了](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11435)特定的事件参数(例如`push_events`标志)
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `webhook` | string | true | Hangouts 即时通讯网路挂钩. 例如, `https://chat.googleapis.com/v1/spaces...` |
| `notify_only_broken_pipelines` | boolean | false | 发送有关管道中断的通知 |
| `notify_only_default_branch` | boolean | false | 已弃用:此参数已替换为`branches_to_be_notified` |
| `branches_to_be_notified` | string | all | 发送通知的分支. 有效选项为"所有","默认","受保护"和" default_and_protected" |
| `push_events` | boolean | false | 启用推送事件通知 |
| `issues_events` | boolean | false | 启用问题事件通知 |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
| `note_events` | boolean | false | 启用笔记事件通知 |
| `confidential_note_events` | boolean | false | 启用机密笔记事件的通知 |
| `pipeline_events` | boolean | false | 启用管道事件通知 |
| `wiki_page_events` | boolean | false | 启用 Wiki 页面事件的通知 |
### Delete Hangouts Chat service[](#delete-hangouts-chat-service "Permalink")
删除项目的环聊聊天服务.
```
DELETE /projects/:id/services/hangouts-chat
```
### Get Hangouts Chat service settings[](#get-hangouts-chat-service-settings "Permalink")
获取项目的环聊聊天服务设置.
```
GET /projects/:id/services/hangouts-chat
```
## HipChat[](#hipchat "Permalink")
私人群聊和即时消息
### Create/Edit HipChat service[](#createedit-hipchat-service "Permalink")
为项目设置 HipChat 服务.
```
PUT /projects/:id/services/hipchat
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | true | 房间代币 |
| `color` | string | false | 房间颜色 |
| `notify` | boolean | false | 启用通知 |
| `room` | string | false | 房间名称或 ID |
| `api_version` | string | false | 默认保留空白(v2) |
| `server` | string | false | 默认保留空白. 例如, `https://hipchat.example.com` . |
| `push_events` | boolean | false | 启用推送事件通知 |
| `issues_events` | boolean | false | 启用问题事件通知 |
| `confidential_issues_events` | boolean | false | 启用机密问题事件的通知 |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
| `note_events` | boolean | false | Enable notifications for note events |
| `confidental_note_events` | boolean | false | 启用机密笔记事件的通知 |
| `pipeline_events` | boolean | false | 启用管道事件通知 |
### Delete HipChat service[](#delete-hipchat-service "Permalink")
删除项目的 HipChat 服务.
```
DELETE /projects/:id/services/hipchat
```
### Get HipChat service settings[](#get-hipchat-service-settings "Permalink")
获取项目的 HipChat 服务设置.
```
GET /projects/:id/services/hipchat
```
## Irker (IRC gateway)[](#irker-irc-gateway "Permalink")
通过 Irker 网关在更新后将 IRC 消息发送到收件人列表.
### Create/Edit Irker (IRC gateway) service[](#createedit-irker-irc-gateway-service "Permalink")
为项目设置 Irker(IRC 网关)服务.
> Irker 没有内置的身份验证,如果托管在防火墙外部,则容易受到 IRC 垃圾邮件的攻击. 请确保在安全的网络中运行守护程序,以防止滥用. 有关更多详细信息,请阅读: [http](http://www.catb.org/~esr/irker/security.html) : [//www.catb.org/~esr/irker/security.html](http://www.catb.org/~esr/irker/security.html) .
```
PUT /projects/:id/services/irker
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `recipients` | string | true | 用空格分隔的收件人/渠道 |
| `default_irc_uri` | string | false | `irc://irc.network.net:6697/` |
| `server_host` | string | false | localhost |
| `server_port` | integer | false | 6659 |
| `colorize_messages` | boolean | false | 为邮件着色 |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Irker (IRC gateway) service[](#delete-irker-irc-gateway-service "Permalink")
删除项目的 Irker(IRC 网关)服务.
```
DELETE /projects/:id/services/irker
```
### Get Irker (IRC gateway) service settings[](#get-irker-irc-gateway-service-settings "Permalink")
Get Irker (IRC gateway) service settings for a project.
```
GET /projects/:id/services/irker
```
## Jira[](#jira "Permalink")
吉拉问题追踪器.
### Get Jira service settings[](#get-jira-service-settings "Permalink")
获取项目的 Jira 服务设置.
```
GET /projects/:id/services/jira
```
### Create/Edit Jira service[](#createedit-jira-service "Permalink")
为项目设置 Jira 服务.
> 与 GitLab 8.14 开始, `api_url` , `issues_url` , `new_issue_url`和`project_url`被替换`url` . 如果您使用的是旧版本,请[遵循此文档](https://gitlab.com/gitlab-org/gitlab/blob/8-13-stable-ee/doc/api/services.md#jira) .
```
PUT /projects/:id/services/jira
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | 链接到该 GitLab 项目的 Jira 项目的 URL. 例如, `https://jira.example.com` . |
| `api_url` | string | no | Jira 实例 API 的基本 URL. 如果未设置,将使用 Web URL 值. 例如, `https://jira-api.example.com` . |
| `username` | string | yes | 创建用于 GitLab / Jira 的用户的用户名. |
| `password` | string | yes | 创建的用于 GitLab / Jira 的用户密码. |
| `active` | boolean | no | 激活或停用服务. 默认为 false(停用). |
| `jira_issue_transition_id` | string | no | 将问题移到关闭状态的过渡的 ID. 您可以在 Jira 工作流管理( **管理>问题>工作流** )下找到该编号,方法是在所需项目工作流的" **操作** **"**下选择" **查看** **"** . 每个状态的 ID 可以在" **转换(id)"**列下每个转换名称的括号内找到. 默认情况下,此 ID 设置为`2` . |
| `commit_events` | boolean | false | 启用提交事件通知 |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `comment_on_event_enabled` | boolean | false | 在每个 GitLab 事件(提交/合并请求)的 Jira 问题中启用评论 |
### Delete Jira service[](#delete-jira-service "Permalink")
从项目中删除所有以前的 Jira 设置.
```
DELETE /projects/:id/services/jira
```
## Slack slash commands[](#slack-slash-commands "Permalink")
能够从 Slack 聊天实例接收斜线命令.
### Get Slack slash command service settings[](#get-slack-slash-command-service-settings "Permalink")
获取项目的 Slack 斜杠命令服务设置.
```
GET /projects/:id/services/slack-slash-commands
```
响应示例:
```
{ "id": 4, "title": "Slack slash commands", "slug": "slack-slash-commands", "created_at": "2017-06-27T05:51:39-07:00", "updated_at": "2017-06-27T05:51:39-07:00", "active": true, "push_events": true, "issues_events": true, "confidential_issues_events": true, "merge_requests_events": true, "tag_push_events": true, "note_events": true, "job_events": true, "pipeline_events": true, "comment_on_event_enabled": false, "properties": { "token": "<your_access_token>" } }
```
### Create/Edit Slack slash command service[](#createedit-slack-slash-command-service "Permalink")
为项目设置 Slack 斜杠命令.
```
PUT /projects/:id/services/slack-slash-commands
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | yes | Slack 令牌 |
### Delete Slack slash command service[](#delete-slack-slash-command-service "Permalink")
删除项目的 Slack 斜杠命令服务.
```
DELETE /projects/:id/services/slack-slash-commands
```
## Mattermost slash commands[](#mattermost-slash-commands "Permalink")
能够从 Mattermost 聊天实例接收斜线命令.
### Get Mattermost slash command service settings[](#get-mattermost-slash-command-service-settings "Permalink")
获取项目的 Mattermost 斜杠命令服务设置.
```
GET /projects/:id/services/mattermost-slash-commands
```
### Create/Edit Mattermost slash command service[](#createedit-mattermost-slash-command-service "Permalink")
为项目设置 Mattermost 斜杠命令.
```
PUT /projects/:id/services/mattermost-slash-commands
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | yes | 最重要的令牌 |
| `username` | string | no | 用于发布消息的用户名 |
### Delete Mattermost slash command service[](#delete-mattermost-slash-command-service "Permalink")
删除项目的 Mattermost 斜杠命令服务.
```
DELETE /projects/:id/services/mattermost-slash-commands
```
## Packagist[](#packagist "Permalink")
当提交或标签被推送到 GitLab 时,在 Packagist(主要的 Composer 存储库)上更新您的项目.
### Create/Edit Packagist service[](#createedit-packagist-service "Permalink")
为项目设置 Packagist 服务.
```
PUT /projects/:id/services/packagist
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `username` | string | yes | Packagist 帐户的用户名 |
| `token` | string | yes | Packagist 服务器的 API 令牌 |
| `server` | boolean | no | Packagist 服务器的 URL. 默认保留空白: [https](https://packagist.org) : [//packagist.org](https://packagist.org) |
| `push_events` | boolean | false | 启用推送事件通知 |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
### Delete Packagist service[](#delete-packagist-service "Permalink")
删除项目的 Packagist 服务.
```
DELETE /projects/:id/services/packagist
```
### Get Packagist service settings[](#get-packagist-service-settings "Permalink")
获取项目的 Packagist 服务设置.
```
GET /projects/:id/services/packagist
```
## Pipeline-Emails[](#pipeline-emails "Permalink")
获取有关 GitLab CI / CD 管道的电子邮件.
### Create/Edit Pipeline-Emails service[](#createedit-pipeline-emails-service "Permalink")
设置项目的管道电子邮件服务.
```
PUT /projects/:id/services/pipelines-email
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `recipients` | string | yes | 以逗号分隔的收件人电子邮件地址列表 |
| `add_pusher` | boolean | no | 将推送器添加到收件人列表 |
| `notify_only_broken_pipelines` | boolean | no | 仅通知断开的管道 |
| `branches_to_be_notified` | string | all | 发送通知的分支. 有效选项为"所有","默认","受保护"和" default_and_protected" |
| `notify_only_default_branch` | boolean | no | 仅针对默认分支发送通知( [在 GitLab 12.0 中引入](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/28271) ) |
| `pipeline_events` | boolean | false | 启用管道事件通知 |
### Delete Pipeline-Emails service[](#delete-pipeline-emails-service "Permalink")
删除项目的管道电子邮件服务.
```
DELETE /projects/:id/services/pipelines-email
```
### Get Pipeline-Emails service settings[](#get-pipeline-emails-service-settings "Permalink")
获取项目的管道电子邮件服务设置.
```
GET /projects/:id/services/pipelines-email
```
## PivotalTracker[](#pivotaltracker "Permalink")
项目管理软件(源提交端点)
### Create/Edit PivotalTracker service[](#createedit-pivotaltracker-service "Permalink")
为项目设置 PivotalTracker 服务.
```
PUT /projects/:id/services/pivotaltracker
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | true | PivotalTracker 令牌 |
| `restrict_to_branch` | boolean | false | 以逗号分隔的分支列表,将自动对其进行检查. 保留空白以包括所有分支. |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete PivotalTracker service[](#delete-pivotaltracker-service "Permalink")
删除项目的 PivotalTracker 服务.
```
DELETE /projects/:id/services/pivotaltracker
```
### Get PivotalTracker service settings[](#get-pivotaltracker-service-settings "Permalink")
获取项目的 PivotalTracker 服务设置.
```
GET /projects/:id/services/pivotaltracker
```
## Prometheus[](#prometheus "Permalink")
Prometheus 是一项功能强大的时间序列监视服务.
### Create/Edit Prometheus service[](#createedit-prometheus-service "Permalink")
为项目设置 Prometheus 服务.
```
PUT /projects/:id/services/prometheus
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `api_url` | string | true | Prometheus API 基本 URL. 例如, `http://prometheus.example.com/` . |
| `google_iap_audience_client_id` | string | false | IAP 受保护资源的客户端 ID(看起来像 IAP_CLIENT_ID.apps.googleusercontent.com) |
| `google_iap_service_account_json` | string | false | 您的服务帐户的`credentials.json`文件,例如{" type":" service_account"," project_id":…} |
### Delete Prometheus service[](#delete-prometheus-service "Permalink")
删除项目的 Prometheus 服务.
```
DELETE /projects/:id/services/prometheus
```
### Get Prometheus service settings[](#get-prometheus-service-settings "Permalink")
获取项目的 Prometheus 服务设置.
```
GET /projects/:id/services/prometheus
```
## Pushover[](#pushover "Permalink")
通过 Pushover,可以轻松在 Android 设备,iPhone,iPad 和台式机上获取实时通知.
### Create/Edit Pushover service[](#createedit-pushover-service "Permalink")
为项目设置 Pushover 服务.
```
PUT /projects/:id/services/pushover
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `api_key` | string | true | Your application key |
| `user_key` | string | true | 您的用户密钥 |
| `priority` | string | true | 优先事项 |
| `device` | string | false | 对于所有活动设备保留空白 |
| `sound` | string | false | 通知的声音 |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Pushover service[](#delete-pushover-service "Permalink")
删除项目的 Pushover 服务.
```
DELETE /projects/:id/services/pushover
```
### Get Pushover service settings[](#get-pushover-service-settings "Permalink")
获取项目的 Pushover 服务设置.
```
GET /projects/:id/services/pushover
```
## Redmine[](#redmine "Permalink")
Redmine 问题追踪器
### Create/Edit Redmine service[](#createedit-redmine-service "Permalink")
为项目设置 Redmine 服务.
```
PUT /projects/:id/services/redmine
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `new_issue_url` | string | true | 新发行网址 |
| `project_url` | string | true | 项目网址 |
| `issues_url` | string | true | 发行网址 |
| `description` | string | false | Description |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete Redmine service[](#delete-redmine-service "Permalink")
删除项目的 Redmine 服务.
```
DELETE /projects/:id/services/redmine
```
### Get Redmine service settings[](#get-redmine-service-settings "Permalink")
获取项目的 Redmine 服务设置.
```
GET /projects/:id/services/redmine
```
## Slack notifications[](#slack-notifications "Permalink")
在 Slack 中接收事件通知
### Create/Edit Slack service[](#createedit-slack-service "Permalink")
为项目设置 Slack 服务.
```
PUT /projects/:id/services/slack
```
> **注意:** [v10.4](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11435)中[引入了](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11435)特定的事件参数(例如`push_events`标志和`push_channel` )
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `webhook` | string | true | `https://hooks.slack.com/services/...` |
| `username` | string | false | username |
| `channel` | string | false | 如果未配置其他频道,则使用默认频道 |
| `notify_only_broken_pipelines` | boolean | false | 发送有关管道中断的通知 |
| `notify_only_default_branch` | boolean | false | 已弃用:此参数已替换为`branches_to_be_notified` |
| `branches_to_be_notified` | string | all | 发送通知的分支. 有效选项为"所有","默认","受保护"和" default_and_protected" |
| `commit_events` | boolean | false | 启用提交事件通知 |
| `confidential_issue_channel` | string | false | 接收机密问题事件通知的渠道的名称 |
| `confidential_issues_events` | boolean | false | 启用机密问题事件的通知 |
| `confidential_note_channel` | string | false | 接收机密笔记事件通知的渠道的名称 |
| `confidential_note_events` | boolean | false | 启用机密笔记事件的通知 |
| `deployment_channel` | string | false | 接收部署事件通知的通道的名称 |
| `deployment_events` | boolean | false | 启用部署事件通知 |
| `issue_channel` | string | false | 接收问题事件通知的渠道的名称 |
| `issues_events` | boolean | false | 启用问题事件通知 |
| `job_events` | boolean | false | 启用工作事件通知 |
| `merge_request_channel` | string | false | 接收合并请求事件通知的通道的名称 |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `note_channel` | string | false | 接收音符事件通知的频道名称 |
| `note_events` | boolean | false | 启用笔记事件通知 |
| `pipeline_channel` | string | false | 接收管道事件通知的通道的名称 |
| `pipeline_events` | boolean | false | 启用管道事件通知 |
| `push_channel` | string | false | 接收推送事件通知的通道的名称 |
| `push_events` | boolean | false | 启用推送事件通知 |
| `tag_push_channel` | string | false | 接收标签推送事件通知的通道的名称 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
| `wiki_page_channel` | string | false | 接收维基页面事件通知的频道名称 |
| `wiki_page_events` | boolean | false | 启用 Wiki 页面事件的通知 |
### Delete Slack service[](#delete-slack-service "Permalink")
删除项目的 Slack 服务.
```
DELETE /projects/:id/services/slack
```
### Get Slack service settings[](#get-slack-service-settings "Permalink")
获取项目的 Slack 服务设置.
```
GET /projects/:id/services/slack
```
## Microsoft Teams[](#microsoft-teams "Permalink")
群聊软件
### Create/Edit Microsoft Teams service[](#createedit-microsoft-teams-service "Permalink")
为项目设置 Microsoft Teams 服务.
```
PUT /projects/:id/services/microsoft-teams
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `webhook` | string | true | Microsoft Teams 网络挂钩. 例如, `https://outlook.office.com/webhook/...` |
| `notify_only_broken_pipelines` | boolean | false | 发送有关管道中断的通知 |
| `notify_only_default_branch` | boolean | false | 已弃用:此参数已替换为`branches_to_be_notified` |
| `branches_to_be_notified` | string | all | 发送通知的分支. 有效选项为"所有","默认","受保护"和" default_and_protected" |
| `push_events` | boolean | false | Enable notifications for push events |
| `issues_events` | boolean | false | 启用问题事件通知 |
| `confidential_issues_events` | boolean | false | 启用机密问题事件的通知 |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
| `note_events` | boolean | false | 启用笔记事件通知 |
| `confidential_note_events` | boolean | false | 启用机密笔记事件的通知 |
| `pipeline_events` | boolean | false | 启用管道事件通知 |
| `wiki_page_events` | boolean | false | 启用 Wiki 页面事件的通知 |
### Delete Microsoft Teams service[](#delete-microsoft-teams-service "Permalink")
删除项目的 Microsoft Teams 服务.
```
DELETE /projects/:id/services/microsoft-teams
```
### Get Microsoft Teams service settings[](#get-microsoft-teams-service-settings "Permalink")
获取项目的 Microsoft Teams 服务设置.
```
GET /projects/:id/services/microsoft-teams
```
## Mattermost notifications[](#mattermost-notifications "Permalink")
在 Mattermost 接收事件通知
### Create/Edit Mattermost notifications service[](#createedit-mattermost-notifications-service "Permalink")
为项目设置 Mattermost 服务.
```
PUT /projects/:id/services/mattermost
```
> **注意:** [v10.4](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11435)中[引入了](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11435)特定的事件参数(例如`push_events`标志和`push_channel` )
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `webhook` | string | true | 最重要的网络挂钩. 例如, `http://mattermost_host/hooks/...` |
| `username` | string | false | username |
| `channel` | string | false | 如果未配置其他频道,则使用默认频道 |
| `notify_only_broken_pipelines` | boolean | false | 发送有关管道中断的通知 |
| `notify_only_default_branch` | boolean | false | 已弃用:此参数已替换为`branches_to_be_notified` |
| `branches_to_be_notified` | string | all | 发送通知的分支. 有效选项为"所有","默认","受保护"和" default_and_protected" |
| `push_events` | boolean | false | 启用推送事件通知 |
| `issues_events` | boolean | false | 启用问题事件通知 |
| `confidential_issues_events` | boolean | false | 启用机密问题事件的通知 |
| `merge_requests_events` | boolean | false | 启用合并请求事件的通知 |
| `tag_push_events` | boolean | false | 启用标签推送事件的通知 |
| `note_events` | boolean | false | 启用笔记事件通知 |
| `confidential_note_events` | boolean | false | 启用机密笔记事件的通知 |
| `pipeline_events` | boolean | false | 启用管道事件通知 |
| `wiki_page_events` | boolean | false | 启用 Wiki 页面事件的通知 |
| `push_channel` | string | false | 接收推送事件通知的通道的名称 |
| `issue_channel` | string | false | 接收问题事件通知的渠道的名称 |
| `confidential_issue_channel` | string | false | 接收机密问题事件通知的渠道的名称 |
| `merge_request_channel` | string | false | 接收合并请求事件通知的通道的名称 |
| `note_channel` | string | false | 接收音符事件通知的频道名称 |
| `confidential_note_channel` | boolean | 接收机密笔记事件通知的渠道的名称 | |
| `tag_push_channel` | string | false | 接收标签推送事件通知的通道的名称 |
| `pipeline_channel` | string | false | 接收管道事件通知的通道的名称 |
| `wiki_page_channel` | string | false | 接收维基页面事件通知的频道名称 |
### Delete Mattermost notifications service[](#delete-mattermost-notifications-service "Permalink")
删除项目的 Mattermost Notifications 服务.
```
DELETE /projects/:id/services/mattermost
```
### Get Mattermost notifications service settings[](#get-mattermost-notifications-service-settings "Permalink")
获取项目的"最重要的通知"服务设置.
```
GET /projects/:id/services/mattermost
```
## JetBrains TeamCity CI[](#jetbrains-teamcity-ci "Permalink")
持续集成和构建服务器
### Create/Edit JetBrains TeamCity CI service[](#createedit-jetbrains-teamcity-ci-service "Permalink")
为项目设置 JetBrains TeamCity CI 服务.
> TeamCity 中的构建配置必须使用构建格式编号`%build.vcs.number%`您还将要配置对所有分支的监视,以便合并请求得以构建,该设置位于 VSC 根高级设置中.
```
PUT /projects/:id/services/teamcity
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `teamcity_url` | string | true | TeamCity 根 URL. 例如, `https://teamcity.example.com` |
| `build_type` | string | true | 构建配置 ID |
| `username` | string | true | 有权触发手动构建的用户 |
| `password` | string | true | 用户密码 |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete JetBrains TeamCity CI service[](#delete-jetbrains-teamcity-ci-service "Permalink")
删除项目的 JetBrains TeamCity CI 服务.
```
DELETE /projects/:id/services/teamcity
```
### Get JetBrains TeamCity CI service settings[](#get-jetbrains-teamcity-ci-service-settings "Permalink")
获取项目的 JetBrains TeamCity CI 服务设置.
```
GET /projects/:id/services/teamcity
```
## Jenkins CI[](#jenkins-ci-starter "Permalink")
持续集成和构建服务器
### Create/Edit Jenkins CI service[](#createedit-jenkins-ci-service "Permalink")
为项目设置 Jenkins CI 服务.
```
PUT /projects/:id/services/jenkins
```
Parameters:
* `jenkins_url` ( **必填** ) `jenkins_url` URL,例如`http://jenkins.example.com`
* `project_name` ( **必需** )-URL 友好的项目名称. 示例:my_project_name
* `username` (可选)-有权访问 Jenkins 服务器的`username` (如果适用)
* `password` (可选)-用户的密码
### Delete Jenkins CI service[](#delete-jenkins-ci-service "Permalink")
删除项目的 Jenkins CI 服务.
```
DELETE /projects/:id/services/jenkins
```
### Get Jenkins CI service settings[](#get-jenkins-ci-service-settings "Permalink")
获取项目的 Jenkins CI 服务设置.
```
GET /projects/:id/services/jenkins
```
## Jenkins CI (Deprecated) Service[](#jenkins-ci-deprecated-service "Permalink")
持续集成和构建服务器
**注意:**此服务已[在 v13.0](https://gitlab.com/gitlab-org/gitlab/-/issues/1600)中[删除](https://gitlab.com/gitlab-org/gitlab/-/issues/1600)
### Create/Edit Jenkins CI (Deprecated) service[](#createedit-jenkins-ci-deprecated-service "Permalink")
为项目设置 Jenkins CI(不推荐使用)服务.
```
PUT /projects/:id/services/jenkins-deprecated
```
Parameters:
* `project_url` ( **必填** )-Jenkins 项目网址,例如`http://jenkins.example.com/job/my-project/`
* `multiproject_enabled` (可选)-在 Jenkins GitLab Hook 插件中配置了多项目模式
* `pass_unstable` (可选)-不稳定的版本将被视为通过
### Delete Jenkins CI (Deprecated) service[](#delete-jenkins-ci-deprecated-service "Permalink")
删除项目的 Jenkins CI(不推荐使用)服务.
```
DELETE /projects/:id/services/jenkins-deprecated
```
### Get Jenkins CI (Deprecated) service settings[](#get-jenkins-ci-deprecated-service-settings "Permalink")
获取项目的 Jenkins CI(不推荐使用)服务设置.
```
GET /projects/:id/services/jenkins-deprecated
```
## MockCI[](#mockci "Permalink")
模拟一个外部配置项. 有关伴随模拟服务的示例,请参见[`gitlab-org/gitlab-mock-ci-service`](https://gitlab.com/gitlab-org/gitlab-mock-ci-service) service.
仅当您的环境设置为开发时,此服务才可用.
### Create/Edit MockCI service[](#createedit-mockci-service "Permalink")
为项目设置 MockCI 服务.
```
PUT /projects/:id/services/mock-ci
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `mock_service_url` | string | true | `http://localhost:4004` |
### Delete MockCI service[](#delete-mockci-service "Permalink")
删除项目的 MockCI 服务.
```
DELETE /projects/:id/services/mock-ci
```
### Get MockCI service settings[](#get-mockci-service-settings "Permalink")
获取项目的 MockCI 服务设置.
```
GET /projects/:id/services/mock-ci
```
## YouTrack[](#youtrack "Permalink")
YouTrack 问题追踪器
### Create/Edit YouTrack service[](#createedit-youtrack-service "Permalink")
为项目设置 YouTrack 服务.
```
PUT /projects/:id/services/youtrack
```
Parameters:
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `issues_url` | string | true | 发行网址 |
| `project_url` | string | true | 项目网址 |
| `description` | string | false | Description |
| `push_events` | boolean | false | 启用推送事件通知 |
### Delete YouTrack Service[](#delete-youtrack-service "Permalink")
删除项目的 YouTrack 服务.
```
DELETE /projects/:id/services/youtrack
```
### Get YouTrack Service Settings[](#get-youtrack-service-settings "Permalink")
获取项目的 YouTrack 服务设置.
```
GET /projects/:id/services/youtrack
```
- 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