services.md 17.6 KB
Newer Older
K
Kevin Houdebert 已提交
1 2
# Services

K
Kirilll Zaitsev 已提交
3 4 5 6 7 8 9 10
## Asana

Asana - Teamwork without email

### Create/Edit Asana service

Set Asana service for a project.

T
Takuya Noguchi 已提交
11
> This service adds commit messages as comments to Asana tasks. Once enabled, commit messages are checked for Asana task URLs (for example, `https://app.asana.com/0/123456/987654`) or task IDs starting with # (for example, `#987654`). Every task ID found will get the commit comment added to it.  You can also close a task with a message containing: `fix #123456`.  You can find your Api Keys here: https://asana.com/developers/documentation/getting-started/auth#api-key
K
Kirilll Zaitsev 已提交
12 13 14 15 16 17 18

```
PUT /projects/:id/services/asana
```

Parameters:

19 20
- `api_key` (**required**) - User API token. User must have access to task, all comments will be attributed to this user.
- `restrict_to_branch` (optional) - Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches.
K
Kirilll Zaitsev 已提交
21 22 23 24 25 26 27 28 29

### Delete Asana service

Delete Asana service for a project.

```
DELETE /projects/:id/services/asana
```

30 31 32 33 34 35 36 37
### Get Asana service settings

Get Asana service settings for a project.

```
GET /projects/:id/services/asana
```

K
Kirilll Zaitsev 已提交
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
## Assembla

Project Management Software (Source Commits Endpoint)

### Create/Edit Assembla service

Set Assembla service for a project.

```
PUT /projects/:id/services/assembla
```

Parameters:

- `token` (**required**)
- `subdomain` (optional)

### Delete Assembla service

Delete Assembla service for a project.

```
DELETE /projects/:id/services/assembla
```

63 64 65 66 67 68 69 70
### Get Assembla service settings

Get Assembla service settings for a project.

```
GET /projects/:id/services/assembla
```

K
Kirilll Zaitsev 已提交
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
## Atlassian Bamboo CI

A continuous integration and build server

### 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.

```
PUT /projects/:id/services/bamboo
```

Parameters:

- `bamboo_url` (**required**) - Bamboo root URL like https://bamboo.example.com
- `build_key` (**required**) - Bamboo build plan key like KEY
- `username` (**required**) - A user with API access, if applicable
- `password` (**required**)

### Delete Atlassian Bamboo CI service

Delete Atlassian Bamboo CI service for a project.

```
DELETE /projects/:id/services/bamboo
```

100 101 102 103 104 105 106 107
### Get Atlassian Bamboo CI service settings

Get Atlassian Bamboo CI service settings for a project.

```
GET /projects/:id/services/bamboo
```

K
Kirilll Zaitsev 已提交
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
## Buildkite

Continuous integration and deployments

### Create/Edit Buildkite service

Set Buildkite service for a project.

```
PUT /projects/:id/services/buildkite
```

Parameters:

- `token` (**required**) - Buildkite project GitLab token
- `project_url` (**required**) - https://buildkite.com/example/project
- `enable_ssl_verification` (optional) - Enable SSL verification

### Delete Buildkite service

Delete Buildkite service for a project.

```
DELETE /projects/:id/services/buildkite
```

134 135 136 137 138 139 140 141
### Get Buildkite service settings

Get Buildkite service settings for a project.

```
GET /projects/:id/services/buildkite
```

R
Robert Schilling 已提交
142 143 144 145 146 147 148 149 150 151 152 153 154 155
## Build-Emails

Get emails for GitLab CI builds.

### Create/Edit Build-Emails service

Set Build-Emails service for a project.

```
PUT /projects/:id/services/builds-email
```

Parameters:

R
Robert Schilling 已提交
156 157 158 159 160 161
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `recipients` | string | yes | Comma-separated list of recipient email addresses |
| `add_pusher` | boolean | no | Add pusher to recipients list |
| `notify_only_broken_builds` | boolean | no | Notify only broken builds |

R
Robert Schilling 已提交
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178

### Delete Build-Emails service

Delete Build-Emails service for a project.

```
DELETE /projects/:id/services/builds-email
```

### Get Build-Emails service settings

Get Build-Emails service settings for a project.

```
GET /projects/:id/services/builds-email
```

K
Kirilll Zaitsev 已提交
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
## Campfire

Simple web-based real-time group chat

### Create/Edit Campfire service

Set Campfire service for a project.

```
PUT /projects/:id/services/campfire
```

Parameters:

- `token` (**required**)
- `subdomain` (optional)
- `room` (optional)

### Delete Campfire service

Delete Campfire service for a project.

```
DELETE /projects/:id/services/campfire
```

205 206 207 208 209 210 211 212
### Get Campfire service settings

Get Campfire service settings for a project.

```
GET /projects/:id/services/campfire
```

K
Kirilll Zaitsev 已提交
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
## Custom Issue Tracker

Custom issue tracker

### Create/Edit Custom Issue Tracker service

Set Custom Issue Tracker service for a project.

```
PUT /projects/:id/services/custom-issue-tracker
```

Parameters:

- `new_issue_url` (**required**) - New Issue url
- `issues_url` (**required**) - Issue url
- `project_url` (**required**) - Project url
- `description` (optional) - Custom issue tracker
- `title` (optional) - Custom Issue Tracker

### Delete Custom Issue Tracker service

Delete Custom Issue Tracker service for a project.

```
DELETE /projects/:id/services/custom-issue-tracker
```

241 242 243 244 245 246 247 248
### Get Custom Issue Tracker service settings

Get Custom Issue Tracker service settings for a project.

```
GET /projects/:id/services/custom-issue-tracker
```

K
Kirilll Zaitsev 已提交
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274
## 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.

```
PUT /projects/:id/services/drone-ci
```

Parameters:

- `token` (**required**) - Drone CI project specific token
- `drone_url` (**required**) - http://drone.example.com
- `enable_ssl_verification` (optional) - Enable SSL verification

### Delete Drone CI service

Delete Drone CI service for a project.

```
DELETE /projects/:id/services/drone-ci
```

275 276 277 278 279 280 281 282
### Get Drone CI service settings

Get Drone CI service settings for a project.

```
GET /projects/:id/services/drone-ci
```

K
Kirilll Zaitsev 已提交
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
## 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.

```
PUT /projects/:id/services/emails-on-push
```

Parameters:

- `recipients` (**required**) - Emails separated by whitespace
- `disable_diffs` (optional) - Disable code diffs
- `send_from_committer_email` (optional) - Send from committer

### Delete Emails on push service

Delete Emails on push service for a project.

```
DELETE /projects/:id/services/emails-on-push
```

309 310 311 312 313 314 315 316
### Get Emails on push service settings

Get Emails on push service settings for a project.

```
GET /projects/:id/services/emails-on-push
```

K
Kirilll Zaitsev 已提交
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
## External Wiki

Replaces the link to the internal wiki with a link to an external wiki.

### Create/Edit External Wiki service

Set External Wiki service for a project.

```
PUT /projects/:id/services/external-wiki
```

Parameters:

- `external_wiki_url` (**required**) - The URL of the external Wiki

### Delete External Wiki service

Delete External Wiki service for a project.

```
DELETE /projects/:id/services/external-wiki
```

341 342 343 344 345 346 347 348
### Get External Wiki service settings

Get External Wiki service settings for a project.

```
GET /projects/:id/services/external-wiki
```

K
Kirilll Zaitsev 已提交
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372
## Flowdock

Flowdock is a collaboration web app for technical teams.

### Create/Edit Flowdock service

Set Flowdock service for a project.

```
PUT /projects/:id/services/flowdock
```

Parameters:

- `token` (**required**) - Flowdock Git source token

### Delete Flowdock service

Delete Flowdock service for a project.

```
DELETE /projects/:id/services/flowdock
```

373 374 375 376 377 378 379 380
### Get Flowdock service settings

Get Flowdock service settings for a project.

```
GET /projects/:id/services/flowdock
```

K
Kirilll Zaitsev 已提交
381 382 383 384 385 386 387 388 389 390 391 392 393 394
## Gemnasium

Gemnasium monitors your project dependencies and alerts you about updates and security vulnerabilities.

### Create/Edit Gemnasium service

Set Gemnasium service for a project.

```
PUT /projects/:id/services/gemnasium
```

Parameters:

395
- `api_key` (**required**) - Your personal API KEY on gemnasium.com
K
Kirilll Zaitsev 已提交
396 397 398 399 400 401 402 403 404 405
- `token` (**required**) - The project's slug on gemnasium.com

### Delete Gemnasium service

Delete Gemnasium service for a project.

```
DELETE /projects/:id/services/gemnasium
```

406 407 408 409 410 411 412 413
### Get Gemnasium service settings

Get Gemnasium service settings for a project.

```
GET /projects/:id/services/gemnasium
```

414
## HipChat
K
Kevin Houdebert 已提交
415

K
Kirilll Zaitsev 已提交
416 417 418
Private group chat and IM

### Create/Edit HipChat service
K
Kevin Houdebert 已提交
419

K
Kirilll Zaitsev 已提交
420
Set HipChat service for a project.
K
Kevin Houdebert 已提交
421 422 423 424

```
PUT /projects/:id/services/hipchat
```
K
Kirilll Zaitsev 已提交
425

K
Kevin Houdebert 已提交
426 427
Parameters:

K
Kirilll Zaitsev 已提交
428 429 430 431 432 433
- `token` (**required**) - Room token
- `color` (optional)
- `notify` (optional)
- `room` (optional) - Room name or ID
- `api_version` (optional) - Leave blank for default (v2)
- `server` (optional) - Leave blank for default. https://hipchat.example.com
K
Kevin Houdebert 已提交
434

435
### Delete HipChat service
K
Kevin Houdebert 已提交
436

437
Delete HipChat service for a project.
K
Kevin Houdebert 已提交
438 439 440 441

```
DELETE /projects/:id/services/hipchat
```
K
Kirilll Zaitsev 已提交
442

443 444 445 446 447 448 449 450
### Get HipChat service settings

Get HipChat service settings for a project.

```
GET /projects/:id/services/hipchat
```

K
Kirilll Zaitsev 已提交
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
## Irker (IRC gateway)

Send IRC messages, on update, to a list of recipients through an Irker gateway.

### Create/Edit Irker (IRC gateway) service

Set Irker (IRC gateway) service for a project.

>  NOTE: Irker does NOT have built-in authentication, which makes it vulnerable to spamming IRC channels if it is hosted outside of a  firewall. Please make sure you run the daemon within a secured network  to prevent abuse. For more details, read: http://www.catb.org/~esr/irker/security.html.

```
PUT /projects/:id/services/irker
```

Parameters:

- `recipients` (**required**) - Recipients/channels separated by whitespaces
- `default_irc_uri` (optional) - irc://irc.network.net:6697/
- `server_port` (optional) - 6659
- `server_host` (optional) - localhost
- `colorize_messages` (optional)

### Delete Irker (IRC gateway) service

Delete Irker (IRC gateway) service for a project.

```
DELETE /projects/:id/services/irker
```

481 482 483 484 485 486 487 488
### Get Irker (IRC gateway) service settings

Get Irker (IRC gateway) service settings for a project.

```
GET /projects/:id/services/irker
```

K
Kirilll Zaitsev 已提交
489 490
## JIRA

491 492 493 494 495 496 497 498 499
JIRA issue tracker.

### Get JIRA service settings

Get JIRA service settings for a project.

```
GET /projects/:id/services/jira
```
K
Kirilll Zaitsev 已提交
500 501 502 503 504

### Create/Edit JIRA service

Set JIRA service for a project.

505 506 507 508
>**Notes:**
- Starting with GitLab 8.14, `api_url`, `issues_url`, `new_issue_url` and
  `project_url` are replaced by `project_key`, `url`.  If you are using an
  older version, [follow this documentation][old-jira-api].
K
Kirilll Zaitsev 已提交
509 510 511 512 513

```
PUT /projects/:id/services/jira
```

514 515
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
516 517
| `url`           | string | yes | The URL to the JIRA project which is being linked to this GitLab project, e.g., `https://jira.example.com`. |
| `project_key`   | string | yes | The short identifier for your JIRA project, all uppercase, e.g., `PROJ`. |
518 519
| `username`      | string | no  | The username of the user created to be used with GitLab/JIRA. |
| `password`      | string | no  | The password of the user created to be used with GitLab/JIRA. |
R
Robert Schilling 已提交
520
| `jira_issue_transition_id` | integer | no | The ID of a transition that moves issues to a closed state. You can find this number under the JIRA workflow administration (**Administration > Issues > Workflows**) by selecting **View** under **Operations** of the desired workflow of your project. The ID of each state can be found inside the parenthesis of each transition name under the **Transitions (id)** column ([see screenshot][trans]). By default, this ID is set to `2`. |
K
Kirilll Zaitsev 已提交
521 522 523

### Delete JIRA service

524
Remove all previously JIRA settings from a project.
K
Kirilll Zaitsev 已提交
525 526 527 528 529

```
DELETE /projects/:id/services/jira
```

R
Robert Schilling 已提交
530 531 532 533 534 535 536 537 538 539 540 541 542 543
## Mattermost Slash Commands

Ability to receive slash commands from a Mattermost chat instance.

### Create/Edit Mattermost Slash Command service

Set Mattermost Slash Command for a project.

```
PUT /projects/:id/services/mattermost-slash-commands
```

Parameters:

R
Robert Schilling 已提交
544 545 546 547
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | yes | The Mattermost token |

R
Robert Schilling 已提交
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578

### Delete Mattermost Slash Command service

Delete Mattermost Slash Command service for a project.

```
DELETE /projects/:id/services/mattermost-slash-commands
```

### Get Mattermost Slash Command service settings

Get Mattermost Slash Command service settings for a project.

```
GET /projects/:id/services/mattermost-slash-commands
```

## Pipeline-Emails

Get emails for GitLab CI pipelines.

### Create/Edit Pipeline-Emails service

Set Pipeline-Emails service for a project.

```
PUT /projects/:id/services/pipelines-email
```

Parameters:

R
Robert Schilling 已提交
579 580 581 582 583 584
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `recipients` | string | yes | Comma-separated list of recipient email addresses |
| `add_pusher` | boolean | no | Add pusher to recipients list |
| `notify_only_broken_builds` | boolean | no | Notify only broken pipelines |

R
Robert Schilling 已提交
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601

### Delete Pipeline-Emails service

Delete Pipeline-Emails service for a project.

```
DELETE /projects/:id/services/pipelines-email
```

### Get Pipeline-Emails service settings

Get Pipeline-Emails service settings for a project.

```
GET /projects/:id/services/pipelines-email
```

K
Kirilll Zaitsev 已提交
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616
## PivotalTracker

Project Management Software (Source Commits Endpoint)

### Create/Edit PivotalTracker service

Set PivotalTracker service for a project.

```
PUT /projects/:id/services/pivotaltracker
```

Parameters:

- `token` (**required**)
617
- `restrict_to_branch` (optional) - Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches.
K
Kirilll Zaitsev 已提交
618 619 620 621 622 623 624 625 626

### Delete PivotalTracker service

Delete PivotalTracker service for a project.

```
DELETE /projects/:id/services/pivotaltracker
```

627 628 629 630 631 632 633 634
### Get PivotalTracker service settings

Get PivotalTracker service settings for a project.

```
GET /projects/:id/services/pivotaltracker
```

K
Kirilll Zaitsev 已提交
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662
## 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.

```
PUT /projects/:id/services/pushover
```

Parameters:

- `api_key` (**required**) - Your application key
- `user_key` (**required**) - Your user key
- `priority` (**required**)
- `device` (optional) - Leave blank for all active devices
- `sound` (optional)

### Delete Pushover service

Delete Pushover service for a project.

```
DELETE /projects/:id/services/pushover
```

663 664 665 666 667 668 669 670
### Get Pushover service settings

Get Pushover service settings for a project.

```
GET /projects/:id/services/pushover
```

K
Kirilll Zaitsev 已提交
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697
## Redmine

Redmine issue tracker

### Create/Edit Redmine service

Set Redmine service for a project.

```
PUT /projects/:id/services/redmine
```

Parameters:

- `new_issue_url` (**required**) - New Issue url
- `project_url` (**required**) - Project url
- `issues_url` (**required**) - Issue url
- `description` (optional) - Redmine issue tracker

### Delete Redmine service

Delete Redmine service for a project.

```
DELETE /projects/:id/services/redmine
```

698 699 700 701 702 703 704 705
### Get Redmine service settings

Get Redmine service settings for a project.

```
GET /projects/:id/services/redmine
```

F
Felipe Artur 已提交
706
## Slack notifications
K
Kirilll Zaitsev 已提交
707

F
Felipe Artur 已提交
708
Receive event notifications in Slack
K
Kirilll Zaitsev 已提交
709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731

### Create/Edit Slack service

Set Slack service for a project.

```
PUT /projects/:id/services/slack
```

Parameters:

- `webhook` (**required**) - https://hooks.slack.com/services/...
- `username` (optional) - username
- `channel` (optional) - #channel

### Delete Slack service

Delete Slack service for a project.

```
DELETE /projects/:id/services/slack
```

732 733 734 735 736 737 738 739
### Get Slack service settings

Get Slack service settings for a project.

```
GET /projects/:id/services/slack
```

F
Felipe Artur 已提交
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773
## Mattermost notifications

Receive event notifications in Mattermost

### Create/Edit Mattermost notifications service

Set Mattermost service for a project.

```
PUT /projects/:id/services/mattermost
```

Parameters:

- `webhook` (**required**) - https://mattermost.example/hooks/1298aff...
- `username` (optional) - username
- `channel` (optional) - #channel

### Delete Mattermost notifications service

Delete Mattermost Notifications service for a project.

```
DELETE /projects/:id/services/mattermost
```

### Get Mattermost notifications service settings

Get Mattermost notifications service settings for a project.

```
GET /projects/:id/services/mattermost
```

K
Kirilll Zaitsev 已提交
774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802
## JetBrains TeamCity CI

A continuous integration and build server

### Create/Edit JetBrains TeamCity CI service

Set JetBrains TeamCity CI service for a project.

> The build configuration in Teamcity must use the build format number %build.vcs.number% you will also want to configure monitoring of all branches so merge requests build, that setting is in the vsc root advanced settings.

```
PUT /projects/:id/services/teamcity
```

Parameters:

- `teamcity_url` (**required**) - TeamCity root URL like https://teamcity.example.com
- `build_type` (**required**) - Build configuration ID
- `username` (**required**) - A user with permissions to trigger a manual build
- `password` (**required**)

### Delete JetBrains TeamCity CI service

Delete JetBrains TeamCity CI service for a project.

```
DELETE /projects/:id/services/teamcity
```

803 804 805 806 807 808 809
### Get JetBrains TeamCity CI service settings

Get JetBrains TeamCity CI service settings for a project.

```
GET /projects/:id/services/teamcity
```
810

811
[jira-doc]: ../user/project/integrations/jira.md
812
[old-jira-api]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-13-stable/doc/api/services.md#jira
E
Eric Eastwood 已提交
813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847


## 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.

```
PUT /projects/:id/services/mock-ci
```

Parameters:

- `mock_service_url` (**required**) - http://localhost:4004

### Delete MockCI service

Delete MockCI service for a project.

```
DELETE /projects/:id/services/mock-ci
```

### Get MockCI service settings

Get MockCI service settings for a project.

```
GET /projects/:id/services/mock-ci
```