2020-10-28 11:08:49 -04:00
---
2021-08-02 11:08:56 -04:00
stage: Ecosystem
group: Integrations
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-10-28 11:08:49 -04:00
---
2021-02-17 13:09:19 -05:00
# Services API **(FREE)**
2014-10-14 13:07:34 -04:00
2020-12-04 16:09:29 -05:00
NOTE:
2021-05-31 14:09:56 -04:00
This API requires an access token with the [Maintainer or Owner role ](../user/permissions.md ).
2017-12-20 12:35:58 -05:00
2020-01-07 10:07:34 -05:00
## List all active services
2020-02-06 10:09:11 -05:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/21330) in GitLab 12.7.
2020-01-07 10:07:34 -05:00
Get a list of all active project services.
2020-02-27 22:09:04 -05:00
```plaintext
2020-01-07 10:07:34 -05:00
GET /projects/:id/services
```
Example response:
```json
[
{
"id": 75,
"title": "Jenkins CI",
2020-01-15 13:08:34 -05:00
"slug": "jenkins",
2020-01-07 10:07:34 -05:00
"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,
2020-01-14 10:07:55 -05:00
"job_events": true,
"comment_on_event_enabled": true
2021-04-29 08:09:58 -04:00
},
2020-01-07 10:07:34 -05:00
{
"id": 76,
"title": "Alerts endpoint",
2020-01-15 13:08:34 -05:00
"slug": "alerts",
2020-01-07 10:07:34 -05:00
"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,
2020-01-14 10:07:55 -05:00
"job_events": true,
"comment_on_event_enabled": true
2020-01-07 10:07:34 -05:00
}
]
```
2015-08-26 19:58:49 -04:00
## Asana
2021-03-30 02:09:35 -04:00
Add commit messages as comments to Asana tasks.
See also the [Asana service documentation ](../user/project/integrations/asana.md ).
2015-08-26 19:58:49 -04:00
### Create/Edit Asana service
Set Asana service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/asana
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2021-03-30 02:09:35 -04:00
| `api_key` | string | true | User API token. User must have access to task. All comments are attributed to this user. |
| `restrict_to_branch` | string | false | Comma-separated list of branches to be are automatically inspected. Leave blank to include all branches. |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
### Delete Asana service
Delete Asana service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/asana
```
2015-09-03 09:38:54 -04:00
### Get Asana service settings
Get Asana service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/asana
```
2015-08-26 19:58:49 -04:00
## Assembla
Project Management Software (Source Commits Endpoint)
### Create/Edit Assembla service
Set Assembla service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/assembla
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | true | The authentication token
| `subdomain` | string | false | The subdomain setting |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
### Delete Assembla service
Delete Assembla service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/assembla
```
2015-09-03 09:38:54 -04:00
### Get Assembla service settings
Get Assembla service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/assembla
```
2015-08-26 19:58:49 -04:00
## Atlassian Bamboo CI
2017-03-06 05:50:32 -05:00
A continuous integration and build server
2015-08-26 19:58:49 -04:00
### Create/Edit Atlassian Bamboo CI service
Set Atlassian Bamboo CI service for a project.
> You must set up automatic revision labeling and a repository trigger in Bamboo.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/bamboo
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2018-11-11 23:52:19 -05:00
| `bamboo_url` | string | true | Bamboo root URL. For example, `https://bamboo.example.com` . |
2017-12-20 12:35:58 -05:00
| `build_key` | string | true | Bamboo build plan key like KEY |
| `username` | string | true | A user with API access, if applicable |
| `password` | string | true | Password of the user |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
### Delete Atlassian Bamboo CI service
Delete Atlassian Bamboo CI service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/bamboo
```
2015-09-03 09:38:54 -04:00
### Get Atlassian Bamboo CI service settings
Get Atlassian Bamboo CI service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/bamboo
```
2017-12-20 12:35:58 -05:00
## Bugzilla
Bugzilla Issue Tracker
2018-11-11 23:52:19 -05:00
### Create/Edit Bugzilla service
2017-12-20 12:35:58 -05:00
Set Bugzilla service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-12-20 12:35:58 -05:00
PUT /projects/:id/services/bugzilla
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2020-04-30 11:09:46 -04:00
| `new_issue_url` | string | true | New Issue URL |
| `issues_url` | string | true | Issue URL |
| `project_url` | string | true | Project URL |
2017-12-20 12:35:58 -05:00
| `description` | string | false | Description |
| `title` | string | false | Title |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2017-12-20 12:35:58 -05:00
### Delete Bugzilla Service
Delete Bugzilla service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-12-20 12:35:58 -05:00
DELETE /projects/:id/services/bugzilla
```
### Get Bugzilla Service Settings
Get Bugzilla service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-12-20 12:35:58 -05:00
GET /projects/:id/services/bugzilla
```
2015-08-26 19:58:49 -04:00
## Buildkite
Continuous integration and deployments
### Create/Edit Buildkite service
Set Buildkite service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-03-06 05:50:32 -05:00
PUT /projects/:id/services/buildkite
2015-08-26 19:58:49 -04:00
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | true | Buildkite project GitLab token |
2020-07-22 23:09:42 -04:00
| `project_url` | string | true | Pipeline URL. For example, `https://buildkite.com/example/pipeline` |
2020-11-19 16:09:07 -05:00
| `enable_ssl_verification` | boolean | false | DEPRECATED: This parameter has no effect since SSL verification is always enabled |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
### Delete Buildkite service
Delete Buildkite service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-03-06 05:50:32 -05:00
DELETE /projects/:id/services/buildkite
2015-08-26 19:58:49 -04:00
```
2015-09-03 09:38:54 -04:00
### Get Buildkite service settings
Get Buildkite service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-03-06 05:50:32 -05:00
GET /projects/:id/services/buildkite
2015-09-03 09:38:54 -04:00
```
2015-08-26 19:58:49 -04:00
## Campfire
2021-07-11 23:09:27 -04:00
Send notifications about push events to Campfire chat rooms.
2021-07-28 17:08:53 -04:00
[New users can no longer sign up for Campfire ](https://basecamp.com/retired/campfire ).
2015-08-26 19:58:49 -04:00
### Create/Edit Campfire service
Set Campfire service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/campfire
```
Parameters:
2021-07-11 23:09:27 -04:00
| Parameter | Type | Required | Description |
|---------------|---------|----------|---------------------------------------------------------------------------------------------|
| `token` | string | true | Campfire API token. To find it, log into Campfire and select **My info** . |
| `subdomain` | string | false | Campfire subdomain. Text between `https://` and `.campfirenow.com` when you're logged in. |
| `room` | string | false | Campfire room. The last part of the URL when you're in a room. |
| `push_events` | boolean | false | Enable notifications for push events. |
2015-08-26 19:58:49 -04:00
### Delete Campfire service
Delete Campfire service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/campfire
```
2015-09-03 09:38:54 -04:00
### Get Campfire service settings
Get Campfire service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/campfire
```
2019-12-02 07:06:45 -05:00
## Unify Circuit
Unify Circuit RTC and collaboration tool.
### Create/Edit Unify Circuit service
Set Unify Circuit service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-12-02 07:06:45 -05:00
PUT /projects/:id/services/unify-circuit
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `webhook` | string | true | The Unify Circuit webhook. For example, `https://circuit.com/rest/v2/webhooks/incoming/...` . |
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines |
2020-11-10 22:08:57 -05:00
| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are "all", "default", "protected", and "default_and_protected". The default value is "default" |
2019-12-02 07:06:45 -05:00
| `push_events` | boolean | false | Enable notifications for push events |
| `issues_events` | boolean | false | Enable notifications for issue events |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
| `note_events` | boolean | false | Enable notifications for note events |
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events |
| `pipeline_events` | boolean | false | Enable notifications for pipeline events |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events |
### Delete Unify Circuit service
Delete Unify Circuit service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-12-02 07:06:45 -05:00
DELETE /projects/:id/services/unify-circuit
```
### Get Unify Circuit service settings
Get Unify Circuit service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-12-02 07:06:45 -05:00
GET /projects/:id/services/unify-circuit
```
2020-05-18 11:08:15 -04:00
## Webex Teams
Webex Teams collaboration tool.
### Create/Edit Webex Teams service
Set Webex Teams service for a project.
```plaintext
PUT /projects/:id/services/webex-teams
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `webhook` | string | true | The Webex Teams webhook. For example, `https://api.ciscospark.com/v1/webhooks/incoming/...` . |
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines |
2020-11-10 22:08:57 -05:00
| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are "all", "default", "protected", and "default_and_protected". The default value is "default" |
2020-05-18 11:08:15 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
| `issues_events` | boolean | false | Enable notifications for issue events |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
| `note_events` | boolean | false | Enable notifications for note events |
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events |
| `pipeline_events` | boolean | false | Enable notifications for pipeline events |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events |
### Delete Webex Teams service
Delete Webex Teams service for a project.
```plaintext
DELETE /projects/:id/services/webex-teams
```
### Get Webex Teams service settings
Get Webex Teams service settings for a project.
```plaintext
GET /projects/:id/services/webex-teams
```
2015-08-26 19:58:49 -04:00
## Custom Issue Tracker
Custom issue tracker
### Create/Edit Custom Issue Tracker service
Set Custom Issue Tracker service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/custom-issue-tracker
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2020-04-30 11:09:46 -04:00
| `new_issue_url` | string | true | New Issue URL |
| `issues_url` | string | true | Issue URL |
| `project_url` | string | true | Project URL |
| `description` | string | false | Description |
| `title` | string | false | Title |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
### Delete Custom Issue Tracker service
Delete Custom Issue Tracker service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/custom-issue-tracker
```
2015-09-03 09:38:54 -04:00
### Get Custom Issue Tracker service settings
Get Custom Issue Tracker service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/custom-issue-tracker
```
2015-08-26 19:58:49 -04:00
## Drone CI
Drone is a Continuous Integration platform built on Docker, written in Go
### Create/Edit Drone CI service
Set Drone CI service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/drone-ci
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | true | Drone CI project specific token |
2018-11-11 23:52:19 -05:00
| `drone_url` | string | true | `http://drone.example.com` |
2017-12-20 12:35:58 -05:00
| `enable_ssl_verification` | boolean | false | Enable SSL verification |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
2015-08-26 19:58:49 -04:00
### Delete Drone CI service
Delete Drone CI service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/drone-ci
```
2015-09-03 09:38:54 -04:00
### Get Drone CI service settings
Get Drone CI service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/drone-ci
```
2015-08-26 19:58:49 -04:00
## Emails on push
Email the commits and diff of each push to a list of recipients.
### Create/Edit Emails on push service
Set Emails on push service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/emails-on-push
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `recipients` | string | true | Emails separated by whitespace |
| `disable_diffs` | boolean | false | Disable code diffs |
| `send_from_committer_email` | boolean | false | Send from committer |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
2020-11-19 16:09:07 -05:00
| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are "all", "default", "protected", and "default_and_protected". Notifications are always fired for tag pushes. The default value is "all" |
2015-08-26 19:58:49 -04:00
### Delete Emails on push service
Delete Emails on push service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/emails-on-push
```
2015-09-03 09:38:54 -04:00
### Get Emails on push service settings
Get Emails on push service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/emails-on-push
```
2020-07-14 08:09:14 -04:00
## Confluence service
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/220934) in GitLab 13.2.
Replaces the link to the internal wiki with a link to a Confluence Cloud Workspace.
### Create/Edit Confluence service
Set Confluence service for a project.
```plaintext
PUT /projects/:id/services/confluence
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `confluence_url` | string | true | The URL of the Confluence Cloud Workspace hosted on atlassian.net. |
### Delete Confluence service
Delete Confluence service for a project.
```plaintext
DELETE /projects/:id/services/confluence
```
### Get Confluence service settings
Get Confluence service settings for a project.
```plaintext
GET /projects/:id/services/confluence
```
2021-03-25 08:09:19 -04:00
## External wiki
2015-08-26 19:58:49 -04:00
Replaces the link to the internal wiki with a link to an external wiki.
2021-03-25 08:09:19 -04:00
### Create/Edit External wiki service
2015-08-26 19:58:49 -04:00
2021-03-25 08:09:19 -04:00
Set External wiki service for a project.
2015-08-26 19:58:49 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/external-wiki
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2021-03-25 08:09:19 -04:00
| `external_wiki_url` | string | true | The URL of the external wiki |
2015-08-26 19:58:49 -04:00
2021-03-25 08:09:19 -04:00
### Delete External wiki service
2015-08-26 19:58:49 -04:00
2021-03-25 08:09:19 -04:00
Delete External wiki service for a project.
2015-08-26 19:58:49 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/external-wiki
```
2021-03-25 08:09:19 -04:00
### Get External wiki service settings
2015-09-03 09:38:54 -04:00
2021-03-25 08:09:19 -04:00
Get External wiki service settings for a project.
2015-09-03 09:38:54 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/external-wiki
```
2015-08-26 19:58:49 -04:00
## Flowdock
2021-04-22 14:10:13 -04:00
Flowdock is a ChatOps application for collaboration in software engineering
companies. You can send notifications from GitLab events to Flowdock flows.
For integration instructions, see the [Flowdock documentation ](https://www.flowdock.com/help/gitlab ).
2015-08-26 19:58:49 -04:00
### Create/Edit Flowdock service
Set Flowdock service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/flowdock
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | true | Flowdock Git source token |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
### Delete Flowdock service
Delete Flowdock service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/flowdock
```
2015-09-03 09:38:54 -04:00
### Get Flowdock service settings
Get Flowdock service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/flowdock
```
2019-10-04 02:06:05 -04:00
## GitHub **(PREMIUM)**
Code collaboration software.
### Create/Edit GitHub service
Set GitHub service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-10-04 02:06:05 -04:00
PUT /projects/:id/services/github
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | true | GitHub API token with `repo:status` OAuth scope |
| `repository_url` | string | true | GitHub repository URL |
| `static_context` | boolean | false | Append instance name instead of branch to [status check name ](../user/project/integrations/github.md#static--dynamic-status-check-names ) |
### Delete GitHub service
Delete GitHub service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-10-04 02:06:05 -04:00
DELETE /projects/:id/services/github
```
### Get GitHub service settings
Get GitHub service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-10-04 02:06:05 -04:00
GET /projects/:id/services/github
```
2018-06-28 09:53:37 -04:00
## Hangouts Chat
2020-07-23 14:10:06 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/20290) in GitLab 11.2.
2018-06-28 09:53:37 -04:00
2021-01-17 19:11:12 -05:00
Google Workspace team collaboration tool.
2018-07-22 07:17:35 -04:00
2018-06-28 09:53:37 -04:00
### Create/Edit Hangouts Chat service
Set Hangouts Chat service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-02-12 18:20:02 -05:00
PUT /projects/:id/services/hangouts-chat
2018-06-28 09:53:37 -04:00
```
2020-12-04 16:09:29 -05:00
NOTE:
2020-07-23 14:10:06 -04:00
Specific event parameters (for example, `push_events` flag) were [introduced in v10.4 ](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11435 )
2018-06-28 09:53:37 -04:00
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2018-11-11 23:52:19 -05:00
| `webhook` | string | true | The Hangouts Chat webhook. For example, `https://chat.googleapis.com/v1/spaces...` . |
2018-06-28 09:53:37 -04:00
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines |
2019-09-13 14:06:03 -04:00
| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified` |
2020-11-10 22:08:57 -05:00
| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are "all", "default", "protected", and "default_and_protected". The default value is "default" |
2018-06-28 09:53:37 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
| `issues_events` | boolean | false | Enable notifications for issue events |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
| `note_events` | boolean | false | Enable notifications for note events |
2019-12-02 07:06:45 -05:00
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events |
2018-06-28 09:53:37 -04:00
| `pipeline_events` | boolean | false | Enable notifications for pipeline events |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events |
### Delete Hangouts Chat service
Delete Hangouts Chat service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-02-12 18:20:02 -05:00
DELETE /projects/:id/services/hangouts-chat
2018-06-28 09:53:37 -04:00
```
### Get Hangouts Chat service settings
Get Hangouts Chat service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-02-12 18:20:02 -05:00
GET /projects/:id/services/hangouts-chat
2018-06-28 09:53:37 -04:00
```
2021-07-29 17:10:10 -04:00
## irker (IRC gateway)
2015-08-26 19:58:49 -04:00
2021-07-29 17:10:10 -04:00
Send IRC messages, on update, to a list of recipients through an irker gateway.
2015-08-26 19:58:49 -04:00
2021-07-29 17:10:10 -04:00
For more information, see the [irker integration documentation ](../user/project/integrations/irker.md ).
2015-08-26 19:58:49 -04:00
2021-07-29 17:10:10 -04:00
### Create/Edit irker (IRC gateway) service
2015-08-26 19:58:49 -04:00
2021-07-29 17:10:10 -04:00
Set irker (IRC gateway) service for a project.
2015-08-26 19:58:49 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/irker
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `recipients` | string | true | Recipients/channels separated by whitespaces |
2020-06-02 14:08:32 -04:00
| `default_irc_uri` | string | false | `irc://irc.network.net:6697/` |
2017-12-20 12:35:58 -05:00
| `server_host` | string | false | localhost |
| `server_port` | integer | false | 6659 |
| `colorize_messages` | boolean | false | Colorize messages |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
2021-07-29 17:10:10 -04:00
### Delete irker (IRC gateway) service
2015-08-26 19:58:49 -04:00
2021-07-29 17:10:10 -04:00
Delete irker (IRC gateway) service for a project.
2015-08-26 19:58:49 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/irker
```
2021-07-29 17:10:10 -04:00
### Get irker (IRC gateway) service settings
2015-09-03 09:38:54 -04:00
2021-07-29 17:10:10 -04:00
Get irker (IRC gateway) service settings for a project.
2015-09-03 09:38:54 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/irker
```
2019-06-28 09:25:56 -04:00
## Jira
2015-08-26 19:58:49 -04:00
2019-06-28 09:25:56 -04:00
Jira issue tracker.
2016-10-26 11:12:39 -04:00
2019-06-28 09:25:56 -04:00
### Get Jira service settings
2016-10-26 11:12:39 -04:00
2019-06-28 09:25:56 -04:00
Get Jira service settings for a project.
2016-10-26 11:12:39 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2016-10-26 11:12:39 -04:00
GET /projects/:id/services/jira
```
2015-08-26 19:58:49 -04:00
2019-06-28 09:25:56 -04:00
### Create/Edit Jira service
2015-08-26 19:58:49 -04:00
2019-06-28 09:25:56 -04:00
Set Jira service for a project.
2015-08-26 19:58:49 -04:00
2019-03-20 09:45:15 -04:00
> Starting with GitLab 8.14, `api_url`, `issues_url`, `new_issue_url` and
2019-03-21 13:34:50 -04:00
> `project_url` are replaced by `url`. If you are using an
2021-06-08 14:10:23 -04:00
> older version, [follow this documentation](https://gitlab.com/gitlab-org/gitlab/-/blob/8-13-stable-ee/doc/api/services.md#jira).
2015-08-26 19:58:49 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/jira
```
2017-12-20 12:35:58 -05:00
Parameters:
| Parameter | Type | Required | Description |
2016-10-26 11:12:39 -04:00
| --------- | ---- | -------- | ----------- |
2019-06-28 09:25:56 -04:00
| `url` | string | yes | The URL to the Jira project which is being linked to this GitLab project. For example, `https://jira.example.com` . |
2020-11-19 16:09:07 -05:00
| `api_url` | string | no | The base URL to the Jira instance API. Web URL value is used if not set. For example, `https://jira-api.example.com` . |
2019-06-28 09:25:56 -04:00
| `username` | string | yes | The username of the user created to be used with GitLab/Jira. |
| `password` | string | yes | The password of the user created to be used with GitLab/Jira. |
2019-02-21 00:35:20 -05:00
| `active` | boolean | no | Activates or deactivates the service. Defaults to false (deactivated). |
2021-04-14 11:09:04 -04:00
| `jira_issue_transition_automatic` | boolean | no | Enable [automatic issue transitions ](../integration/jira/issues.md#automatic-issue-transitions ). Takes precedence over `jira_issue_transition_id` if enabled. Defaults to `false` |
| `jira_issue_transition_id` | string | no | The ID of one or more transitions for [custom issue transitions ](../integration/jira/issues.md#custom-issue-transitions ). Ignored if `jira_issue_transition_automatic` is enabled. Defaults to a blank string, which disables custom transitions. |
2019-06-16 11:57:38 -04:00
| `commit_events` | boolean | false | Enable notifications for commit events |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
2020-01-14 10:07:55 -05:00
| `comment_on_event_enabled` | boolean | false | Enable comments inside Jira issues on each GitLab event (commit / merge request) |
2015-08-26 19:58:49 -04:00
2019-06-28 09:25:56 -04:00
### Delete Jira service
2015-08-26 19:58:49 -04:00
2019-06-28 09:25:56 -04:00
Remove all previously Jira settings from a project.
2015-08-26 19:58:49 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/jira
```
2017-04-18 04:19:00 -04:00
## Slack slash commands
2016-12-05 09:40:53 -05:00
2017-04-18 04:19:00 -04:00
Ability to receive slash commands from a Slack chat instance.
2016-12-05 09:40:53 -05:00
2017-04-18 04:19:00 -04:00
### Get Slack slash command service settings
2016-12-05 09:40:53 -05:00
2017-04-18 04:19:00 -04:00
Get Slack slash command service settings for a project.
2016-12-05 09:40:53 -05:00
2020-02-27 22:09:04 -05:00
```plaintext
2017-04-18 04:19:00 -04:00
GET /projects/:id/services/slack-slash-commands
```
Example response:
```json
{
"id": 4,
"title": "Slack slash commands",
2020-01-15 13:08:34 -05:00
"slug": "slack-slash-commands",
2017-04-18 04:19:00 -04:00
"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,
2018-02-26 12:35:04 -05:00
"confidential_issues_events": true,
2017-04-18 04:19:00 -04:00
"merge_requests_events": true,
"tag_push_events": true,
"note_events": true,
2017-05-15 11:11:45 -04:00
"job_events": true,
2017-04-18 04:19:00 -04:00
"pipeline_events": true,
2020-01-14 10:07:55 -05:00
"comment_on_event_enabled": false,
2017-04-18 04:19:00 -04:00
"properties": {
2018-12-27 04:03:08 -05:00
"token": "< your_access_token > "
2017-04-18 04:19:00 -04:00
}
}
```
### Create/Edit Slack slash command service
Set Slack slash command for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-04-18 04:19:00 -04:00
PUT /projects/:id/services/slack-slash-commands
2016-12-05 09:40:53 -05:00
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
2016-12-12 08:27:52 -05:00
| --------- | ---- | -------- | ----------- |
2017-04-18 04:19:00 -04:00
| `token` | string | yes | The Slack token |
2016-12-12 08:27:52 -05:00
2017-04-18 04:19:00 -04:00
### Delete Slack slash command service
2016-12-05 09:40:53 -05:00
2017-04-18 04:19:00 -04:00
Delete Slack slash command service for a project.
2016-12-05 09:40:53 -05:00
2020-02-27 22:09:04 -05:00
```plaintext
2017-04-18 04:19:00 -04:00
DELETE /projects/:id/services/slack-slash-commands
2016-12-05 09:40:53 -05:00
```
2017-04-18 04:19:00 -04:00
## Mattermost slash commands
Ability to receive slash commands from a Mattermost chat instance.
### Get Mattermost slash command service settings
2016-12-05 09:40:53 -05:00
2017-04-18 04:19:00 -04:00
Get Mattermost slash command service settings for a project.
2016-12-05 09:40:53 -05:00
2020-02-27 22:09:04 -05:00
```plaintext
2016-12-05 09:40:53 -05:00
GET /projects/:id/services/mattermost-slash-commands
```
2017-04-18 04:19:00 -04:00
### Create/Edit Mattermost slash command service
Set Mattermost slash command for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-04-18 04:19:00 -04:00
PUT /projects/:id/services/mattermost-slash-commands
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
2017-04-18 04:19:00 -04:00
| --------- | ---- | -------- | ----------- |
| `token` | string | yes | The Mattermost token |
2017-11-08 05:22:24 -05:00
| `username` | string | no | The username to use to post the message |
2017-04-18 04:19:00 -04:00
### Delete Mattermost slash command service
Delete Mattermost slash command service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-04-18 04:19:00 -04:00
DELETE /projects/:id/services/mattermost-slash-commands
```
2017-09-21 16:05:44 -04:00
## Packagist
2020-02-27 04:09:01 -05:00
Update your project on Packagist (the main Composer repository) when commits or tags are pushed to GitLab.
2017-09-21 16:05:44 -04:00
### Create/Edit Packagist service
Set Packagist service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-09-21 16:05:44 -04:00
PUT /projects/:id/services/packagist
```
Parameters:
2019-06-16 11:57:38 -04:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `username` | string | yes | The username of a Packagist account |
| `token` | string | yes | API token to the Packagist server |
2019-07-02 04:50:00 -04:00
| `server` | boolean | no | URL of the Packagist server. Leave blank for default: < https: // packagist . org > |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
2017-09-21 16:05:44 -04:00
### Delete Packagist service
Delete Packagist service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-09-21 16:05:44 -04:00
DELETE /projects/:id/services/packagist
```
### Get Packagist service settings
Get Packagist service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-09-21 16:05:44 -04:00
GET /projects/:id/services/packagist
```
2016-12-05 09:40:53 -05:00
## Pipeline-Emails
2020-03-26 23:07:56 -04:00
Get emails for GitLab CI/CD pipelines.
2016-12-05 09:40:53 -05:00
### Create/Edit Pipeline-Emails service
Set Pipeline-Emails service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2016-12-05 09:40:53 -05:00
PUT /projects/:id/services/pipelines-email
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
2016-12-12 08:27:52 -05:00
| --------- | ---- | -------- | ----------- |
| `recipients` | string | yes | Comma-separated list of recipient email addresses |
| `add_pusher` | boolean | no | Add pusher to recipients list |
2017-03-17 19:06:11 -04:00
| `notify_only_broken_pipelines` | boolean | no | Notify only broken pipelines |
2020-11-10 22:08:57 -05:00
| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are "all", "default", "protected", and "default_and_protected. The default value is "default" |
2020-02-06 10:09:11 -05:00
| `notify_only_default_branch` | boolean | no | Send notifications only for the default branch ([introduced in GitLab 12.0](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/28271)) |
2019-06-16 11:57:38 -04:00
| `pipeline_events` | boolean | false | Enable notifications for pipeline events |
2016-12-05 09:40:53 -05:00
### Delete Pipeline-Emails service
Delete Pipeline-Emails service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2016-12-05 09:40:53 -05:00
DELETE /projects/:id/services/pipelines-email
```
### Get Pipeline-Emails service settings
Get Pipeline-Emails service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2016-12-05 09:40:53 -05:00
GET /projects/:id/services/pipelines-email
```
2021-06-21 05:10:07 -04:00
## Pivotal Tracker
2015-08-26 19:58:49 -04:00
2021-06-21 05:10:07 -04:00
Add commit messages as comments to Pivotal Tracker stories.
See also the [Pivotal Tracker service documentation ](../user/project/integrations/pivotal_tracker.md ).
2015-08-26 19:58:49 -04:00
2021-06-21 05:10:07 -04:00
### Create/Edit Pivotal Tracker service
2015-08-26 19:58:49 -04:00
2021-06-21 05:10:07 -04:00
Set Pivotal Tracker service for a project.
2015-08-26 19:58:49 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/pivotaltracker
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2021-06-21 05:10:07 -04:00
| `token` | string | true | The Pivotal Tracker token |
2020-11-19 16:09:07 -05:00
| `restrict_to_branch` | boolean | false | Comma-separated list of branches to automatically inspect. Leave blank to include all branches. |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
2021-06-21 05:10:07 -04:00
### Delete Pivotal Tracker service
2015-08-26 19:58:49 -04:00
2021-06-21 05:10:07 -04:00
Delete Pivotal Tracker service for a project.
2015-08-26 19:58:49 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/pivotaltracker
```
2021-06-21 05:10:07 -04:00
### Get Pivotal Tracker service settings
2015-09-03 09:38:54 -04:00
2021-06-21 05:10:07 -04:00
Get Pivotal Tracker service settings for a project.
2015-09-03 09:38:54 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/pivotaltracker
```
2017-12-20 12:35:58 -05:00
## Prometheus
Prometheus is a powerful time-series monitoring service.
### Create/Edit Prometheus service
Set Prometheus service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-12-20 12:35:58 -05:00
PUT /projects/:id/services/prometheus
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2018-11-11 23:52:19 -05:00
| `api_url` | string | true | Prometheus API Base URL. For example, `http://prometheus.example.com/` . |
2020-06-04 17:08:11 -04:00
| `google_iap_audience_client_id` | string | false | Client ID of the IAP secured resource (looks like IAP_CLIENT_ID.apps.googleusercontent.com) |
2020-06-25 14:08:50 -04:00
| `google_iap_service_account_json` | string | false | `credentials.json` file for your service account, like { "type": "service_account", "project_id": ... } |
2017-12-20 12:35:58 -05:00
### Delete Prometheus service
Delete Prometheus service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-12-20 12:35:58 -05:00
DELETE /projects/:id/services/prometheus
```
### Get Prometheus service settings
Get Prometheus service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-12-20 12:35:58 -05:00
GET /projects/:id/services/prometheus
```
2015-08-26 19:58:49 -04:00
## Pushover
Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop.
### Create/Edit Pushover service
Set Pushover service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/pushover
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `api_key` | string | true | Your application key |
| `user_key` | string | true | Your user key |
| `priority` | string | true | The priority |
| `device` | string | false | Leave blank for all active devices |
| `sound` | string | false | The sound of the notification |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
### Delete Pushover service
Delete Pushover service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/pushover
```
2015-09-03 09:38:54 -04:00
### Get Pushover service settings
Get Pushover service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/pushover
```
2015-08-26 19:58:49 -04:00
## Redmine
Redmine issue tracker
### Create/Edit Redmine service
Set Redmine service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/redmine
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2020-04-30 11:09:46 -04:00
| `new_issue_url` | string | true | New Issue URL |
| `project_url` | string | true | Project URL |
| `issues_url` | string | true | Issue URL |
2017-12-20 12:35:58 -05:00
| `description` | string | false | Description |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
### Delete Redmine service
Delete Redmine service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/redmine
```
2015-09-03 09:38:54 -04:00
### Get Redmine service settings
Get Redmine service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/redmine
```
2016-11-25 14:36:37 -05:00
## Slack notifications
2015-08-26 19:58:49 -04:00
2016-11-25 14:36:37 -05:00
Receive event notifications in Slack
2015-08-26 19:58:49 -04:00
### Create/Edit Slack service
Set Slack service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/slack
```
2020-12-04 16:09:29 -05:00
NOTE:
2020-07-23 14:10:06 -04:00
Specific event parameters (for example, `push_events` flag and `push_channel` ) were [introduced in v10.4 ](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11435 )
2017-12-20 12:35:58 -05:00
2017-12-20 12:35:58 -05:00
Parameters:
2015-08-26 19:58:49 -04:00
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2018-11-11 23:52:19 -05:00
| `webhook` | string | true | `https://hooks.slack.com/services/...` |
2017-12-20 12:35:58 -05:00
| `username` | string | false | username |
| `channel` | string | false | Default channel to use if others are not configured |
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines |
2019-09-13 14:06:03 -04:00
| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified` |
2020-11-10 22:08:57 -05:00
| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are "all", "default", "protected", and "default_and_protected". The default value is "default" |
2019-08-02 14:53:11 -04:00
| `commit_events` | boolean | false | Enable notifications for commit events |
| `confidential_issue_channel` | string | false | The name of the channel to receive confidential issues events notifications |
2017-12-20 12:35:58 -05:00
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events |
2019-08-02 14:53:11 -04:00
| `confidential_note_channel` | string | false | The name of the channel to receive confidential note events notifications |
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events |
| `deployment_channel` | string | false | The name of the channel to receive deployment events notifications |
| `deployment_events` | boolean | false | Enable notifications for deployment events |
| `issue_channel` | string | false | The name of the channel to receive issues events notifications |
| `issues_events` | boolean | false | Enable notifications for issue events |
| `job_events` | boolean | false | Enable notifications for job events |
| `merge_request_channel` | string | false | The name of the channel to receive merge request events notifications |
2017-12-20 12:35:58 -05:00
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
2019-08-02 14:53:11 -04:00
| `note_channel` | string | false | The name of the channel to receive note events notifications |
2017-12-20 12:35:58 -05:00
| `note_events` | boolean | false | Enable notifications for note events |
2019-08-02 14:53:11 -04:00
| `pipeline_channel` | string | false | The name of the channel to receive pipeline events notifications |
2017-12-20 12:35:58 -05:00
| `pipeline_events` | boolean | false | Enable notifications for pipeline events |
| `push_channel` | string | false | The name of the channel to receive push events notifications |
2019-08-02 14:53:11 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2017-12-20 12:35:58 -05:00
| `tag_push_channel` | string | false | The name of the channel to receive tag push events notifications |
2019-08-02 14:53:11 -04:00
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
2017-12-20 12:35:58 -05:00
| `wiki_page_channel` | string | false | The name of the channel to receive wiki page events notifications |
2019-08-02 14:53:11 -04:00
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events |
2015-08-26 19:58:49 -04:00
### Delete Slack service
Delete Slack service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/slack
```
2015-09-03 09:38:54 -04:00
### Get Slack service settings
Get Slack service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/slack
```
2017-12-20 12:35:58 -05:00
## Microsoft Teams
Group Chat Software
### Create/Edit Microsoft Teams service
Set Microsoft Teams service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2018-05-11 11:09:49 -04:00
PUT /projects/:id/services/microsoft-teams
2017-12-20 12:35:58 -05:00
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2018-11-11 23:52:19 -05:00
| `webhook` | string | true | The Microsoft Teams webhook. For example, `https://outlook.office.com/webhook/...` |
2019-06-18 19:05:41 -04:00
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines |
2019-09-13 14:06:03 -04:00
| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified` |
2020-11-10 22:08:57 -05:00
| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are "all", "default", "protected", and "default_and_protected". The default value is "default" |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
| `issues_events` | boolean | false | Enable notifications for issue events |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
| `note_events` | boolean | false | Enable notifications for note events |
2020-03-01 22:07:58 -05:00
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events |
2019-06-16 11:57:38 -04:00
| `pipeline_events` | boolean | false | Enable notifications for pipeline events |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events |
2017-12-20 12:35:58 -05:00
### Delete Microsoft Teams service
Delete Microsoft Teams service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2018-05-11 11:09:49 -04:00
DELETE /projects/:id/services/microsoft-teams
2017-12-20 12:35:58 -05:00
```
### Get Microsoft Teams service settings
Get Microsoft Teams service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2018-05-11 11:09:49 -04:00
GET /projects/:id/services/microsoft-teams
2017-12-20 12:35:58 -05:00
```
2016-11-25 14:36:37 -05:00
## Mattermost notifications
Receive event notifications in Mattermost
### Create/Edit Mattermost notifications service
Set Mattermost service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2016-11-25 14:36:37 -05:00
PUT /projects/:id/services/mattermost
```
2020-12-04 16:09:29 -05:00
NOTE:
2020-07-23 14:10:06 -04:00
Specific event parameters (for example, `push_events` flag and `push_channel` ) were [introduced in v10.4 ](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11435 )
2016-11-25 14:36:37 -05:00
2017-12-20 12:35:58 -05:00
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2018-11-11 23:52:19 -05:00
| `webhook` | string | true | The Mattermost webhook. For example, `http://mattermost_host/hooks/...` |
2017-12-20 12:35:58 -05:00
| `username` | string | false | username |
| `channel` | string | false | Default channel to use if others are not configured |
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines |
2019-09-13 14:06:03 -04:00
| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified` |
2020-11-10 22:08:57 -05:00
| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are "all", "default", "protected", and "default_and_protected". The default value is "default" |
2017-12-20 12:35:58 -05:00
| `push_events` | boolean | false | Enable notifications for push events |
| `issues_events` | boolean | false | Enable notifications for issue events |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events |
| `tag_push_events` | boolean | false | Enable notifications for tag push events |
| `note_events` | boolean | false | Enable notifications for note events |
2019-12-02 07:06:45 -05:00
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events |
2017-12-20 12:35:58 -05:00
| `pipeline_events` | boolean | false | Enable notifications for pipeline events |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events |
| `push_channel` | string | false | The name of the channel to receive push events notifications |
| `issue_channel` | string | false | The name of the channel to receive issues events notifications |
| `confidential_issue_channel` | string | false | The name of the channel to receive confidential issues events notifications |
| `merge_request_channel` | string | false | The name of the channel to receive merge request events notifications |
| `note_channel` | string | false | The name of the channel to receive note events notifications |
2021-05-04 05:09:59 -04:00
| `confidential_note_channel` | string | false | The name of the channel to receive confidential note events notifications |
2017-12-20 12:35:58 -05:00
| `tag_push_channel` | string | false | The name of the channel to receive tag push events notifications |
| `pipeline_channel` | string | false | The name of the channel to receive pipeline events notifications |
| `wiki_page_channel` | string | false | The name of the channel to receive wiki page events notifications |
2016-11-25 14:36:37 -05:00
### Delete Mattermost notifications service
Delete Mattermost Notifications service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2016-11-25 14:36:37 -05:00
DELETE /projects/:id/services/mattermost
```
### Get Mattermost notifications service settings
Get Mattermost notifications service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2016-11-25 14:36:37 -05:00
GET /projects/:id/services/mattermost
```
2015-08-26 19:58:49 -04:00
## JetBrains TeamCity CI
A continuous integration and build server
### Create/Edit JetBrains TeamCity CI service
Set JetBrains TeamCity CI service for a project.
2020-11-19 16:09:07 -05:00
> The build configuration in TeamCity must use the build format number `%build.vcs.number%`. Configure monitoring of all branches so merge requests build. That setting is in the VSC root advanced settings.
2015-08-26 19:58:49 -04:00
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
PUT /projects/:id/services/teamcity
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2018-11-11 23:52:19 -05:00
| `teamcity_url` | string | true | TeamCity root URL. For example, `https://teamcity.example.com` |
2017-12-20 12:35:58 -05:00
| `build_type` | string | true | Build configuration ID |
| `username` | string | true | A user with permissions to trigger a manual build |
| `password` | string | true | The password of the user |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2015-08-26 19:58:49 -04:00
### Delete JetBrains TeamCity CI service
Delete JetBrains TeamCity CI service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-08-26 19:58:49 -04:00
DELETE /projects/:id/services/teamcity
```
2015-09-03 09:38:54 -04:00
### Get JetBrains TeamCity CI service settings
Get JetBrains TeamCity CI service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2015-09-03 09:38:54 -04:00
GET /projects/:id/services/teamcity
```
2016-10-26 11:12:39 -04:00
2021-01-21 01:09:03 -05:00
## Jenkins CI
2019-05-29 19:25:19 -04:00
A continuous integration and build server
### Create/Edit Jenkins CI service
Set Jenkins CI service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-05-29 19:25:19 -04:00
PUT /projects/:id/services/jenkins
```
Parameters:
2021-04-26 08:09:44 -04:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `jenkins_url` | string | true | Jenkins URL like `http://jenkins.example.com` . |
| `project_name` | string | true | The URL-friendly project name. Example: `my_project_name` . |
| `username` | string | false | Username for authentication with the Jenkins server, if authentication is required by the server. |
| `password` | string | false | Password for authentication with the Jenkins server, if authentication is required by the server. |
| `push_events` | boolean | false | Enable notifications for push events. |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events. |
| `tag_push_events` | boolean | false | Enable notifications for tag push events. |
2019-05-29 19:25:19 -04:00
### Delete Jenkins CI service
Delete Jenkins CI service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-05-29 19:25:19 -04:00
DELETE /projects/:id/services/jenkins
```
### Get Jenkins CI service settings
Get Jenkins CI service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-05-29 19:25:19 -04:00
GET /projects/:id/services/jenkins
```
## Jenkins CI (Deprecated) Service
A continuous integration and build server
2020-12-04 16:09:29 -05:00
NOTE:
2020-05-15 05:07:59 -04:00
This service was [removed in v13.0 ](https://gitlab.com/gitlab-org/gitlab/-/issues/1600 )
2019-05-29 19:25:19 -04:00
### Create/Edit Jenkins CI (Deprecated) service
Set Jenkins CI (Deprecated) service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-05-29 19:25:19 -04:00
PUT /projects/:id/services/jenkins-deprecated
```
Parameters:
2019-07-02 04:50:00 -04:00
- `project_url` (**required**) - Jenkins project URL like `http://jenkins.example.com/job/my-project/`
2019-05-29 19:25:19 -04:00
- `multiproject_enabled` (optional) - Multi-project mode is configured in Jenkins GitLab Hook plugin
2020-11-19 16:09:07 -05:00
- `pass_unstable` (optional) - Unstable builds are treated as passing
2019-05-29 19:25:19 -04:00
### Delete Jenkins CI (Deprecated) service
Delete Jenkins CI (Deprecated) service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-05-29 19:25:19 -04:00
DELETE /projects/:id/services/jenkins-deprecated
```
### Get Jenkins CI (Deprecated) service settings
Get Jenkins CI (Deprecated) service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-05-29 19:25:19 -04:00
GET /projects/:id/services/jenkins-deprecated
```
2017-02-14 20:52:44 -05:00
## MockCI
Mock an external CI. See [`gitlab-org/gitlab-mock-ci-service` ](https://gitlab.com/gitlab-org/gitlab-mock-ci-service ) for an example of a companion mock service.
This service is only available when your environment is set to development.
### Create/Edit MockCI service
Set MockCI service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-02-14 20:52:44 -05:00
PUT /projects/:id/services/mock-ci
```
Parameters:
2017-12-20 12:35:58 -05:00
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2018-11-11 23:52:19 -05:00
| `mock_service_url` | string | true | `http://localhost:4004` |
2017-02-14 20:52:44 -05:00
### Delete MockCI service
Delete MockCI service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-02-14 20:52:44 -05:00
DELETE /projects/:id/services/mock-ci
```
### Get MockCI service settings
Get MockCI service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2017-02-14 20:52:44 -05:00
GET /projects/:id/services/mock-ci
```
2017-12-20 12:35:58 -05:00
2019-02-20 12:54:47 -05:00
## YouTrack
YouTrack issue tracker
### Create/Edit YouTrack service
Set YouTrack service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-02-20 12:54:47 -05:00
PUT /projects/:id/services/youtrack
```
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
2020-04-30 11:09:46 -04:00
| `issues_url` | string | true | Issue URL |
| `project_url` | string | true | Project URL |
2019-02-20 12:54:47 -05:00
| `description` | string | false | Description |
2019-06-16 11:57:38 -04:00
| `push_events` | boolean | false | Enable notifications for push events |
2019-02-20 12:54:47 -05:00
### Delete YouTrack Service
Delete YouTrack service for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-02-20 12:54:47 -05:00
DELETE /projects/:id/services/youtrack
```
### Get YouTrack Service Settings
Get YouTrack service settings for a project.
2020-02-27 22:09:04 -05:00
```plaintext
2019-02-20 12:54:47 -05:00
GET /projects/:id/services/youtrack
```