services.md 18.0 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
## Atlassian Bamboo CI

73
A continuous integration and build server
K
Kirilll Zaitsev 已提交
74 75 76 77 78 79 80 81 82 83 84 85 86 87

### 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
88
- `build_key` (**required**) - Bamboo build plan key like KEY
K
Kirilll Zaitsev 已提交
89 90 91 92 93 94 95 96 97 98 99
- `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
## Buildkite

Continuous integration and deployments

### Create/Edit Buildkite service

Set Buildkite service for a project.

```
117
PUT /projects/:id/services/buildkite
K
Kirilll Zaitsev 已提交
118 119 120 121 122
```

Parameters:

- `token` (**required**) - Buildkite project GitLab token
123
- `project_url` (**required**) - https://buildkite.com/example/project
K
Kirilll Zaitsev 已提交
124 125 126 127 128 129 130
- `enable_ssl_verification` (optional) - Enable SSL verification

### Delete Buildkite service

Delete Buildkite service for a project.

```
131
DELETE /projects/:id/services/buildkite
K
Kirilll Zaitsev 已提交
132 133
```

134 135 136 137 138
### Get Buildkite service settings

Get Buildkite service settings for a project.

```
139
GET /projects/:id/services/buildkite
140 141
```

K
Kirilll Zaitsev 已提交
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
## 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
```

168 169 170 171 172 173 174 175
### Get Campfire service settings

Get Campfire service settings for a project.

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

K
Kirilll Zaitsev 已提交
176 177 178 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
## 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
```

204 205 206 207 208 209 210 211
### 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 已提交
212 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
## 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
```

238 239 240 241 242 243 244 245
### Get Drone CI service settings

Get Drone CI service settings for a project.

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

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

272 273 274 275 276 277 278 279
### 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 已提交
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
## 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
```

304 305 306 307 308 309 310 311
### Get External Wiki service settings

Get External Wiki service settings for a project.

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

K
Kirilll Zaitsev 已提交
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
## 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
```

336 337 338 339 340 341 342 343
### Get Flowdock service settings

Get Flowdock service settings for a project.

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

K
Kirilll Zaitsev 已提交
344 345 346 347 348 349 350 351 352 353 354 355 356 357
## 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:

358
- `api_key` (**required**) - Your personal API KEY on gemnasium.com
K
Kirilll Zaitsev 已提交
359 360 361 362 363 364 365 366 367 368
- `token` (**required**) - The project's slug on gemnasium.com

### Delete Gemnasium service

Delete Gemnasium service for a project.

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

369 370 371 372 373 374 375 376
### Get Gemnasium service settings

Get Gemnasium service settings for a project.

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

377
## HipChat
K
Kevin Houdebert 已提交
378

K
Kirilll Zaitsev 已提交
379 380 381
Private group chat and IM

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

K
Kirilll Zaitsev 已提交
383
Set HipChat service for a project.
K
Kevin Houdebert 已提交
384 385 386 387

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

K
Kevin Houdebert 已提交
389 390
Parameters:

K
Kirilll Zaitsev 已提交
391 392 393 394 395 396
- `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 已提交
397

398
### Delete HipChat service
K
Kevin Houdebert 已提交
399

400
Delete HipChat service for a project.
K
Kevin Houdebert 已提交
401 402 403 404

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

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

Get HipChat service settings for a project.

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

K
Kirilll Zaitsev 已提交
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443
## 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
```

444 445 446 447 448 449 450 451
### Get Irker (IRC gateway) service settings

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

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

K
Kirilll Zaitsev 已提交
452 453
## JIRA

454 455 456 457 458 459 460 461 462
JIRA issue tracker.

### Get JIRA service settings

Get JIRA service settings for a project.

```
GET /projects/:id/services/jira
```
K
Kirilll Zaitsev 已提交
463 464 465 466 467

### Create/Edit JIRA service

Set JIRA service for a project.

468 469 470 471
>**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 已提交
472 473 474 475 476

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

477 478
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
479 480
| `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`. |
481 482
| `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 已提交
483
| `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 已提交
484 485 486

### Delete JIRA service

487
Remove all previously JIRA settings from a project.
K
Kirilll Zaitsev 已提交
488 489 490 491 492

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

493
## Slack slash commands
R
Robert Schilling 已提交
494

495
Ability to receive slash commands from a Slack chat instance.
R
Robert Schilling 已提交
496

497
### Get Slack slash command service settings
R
Robert Schilling 已提交
498

499
Get Slack slash command service settings for a project.
R
Robert Schilling 已提交
500 501

```
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532
GET /projects/:id/services/slack-slash-commands
```

Example response:

```json
{
  "id": 4,
  "title": "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,
  "merge_requests_events": true,
  "tag_push_events": true,
  "note_events": true,
  "build_events": true,
  "pipeline_events": true,
  "properties": {
    "token": "9koXpg98eAheJpvBs5tK"
  }
}
```

### Create/Edit Slack slash command service

Set Slack slash command for a project.

```
PUT /projects/:id/services/slack-slash-commands
R
Robert Schilling 已提交
533 534 535 536
```

Parameters:

R
Robert Schilling 已提交
537 538
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
539
| `token` | string | yes | The Slack token |
R
Robert Schilling 已提交
540

R
Robert Schilling 已提交
541

542
### Delete Slack slash command service
R
Robert Schilling 已提交
543

544
Delete Slack slash command service for a project.
R
Robert Schilling 已提交
545 546

```
547
DELETE /projects/:id/services/slack-slash-commands
R
Robert Schilling 已提交
548 549
```

550 551 552 553 554
## Mattermost slash commands

Ability to receive slash commands from a Mattermost chat instance.

### Get Mattermost slash command service settings
R
Robert Schilling 已提交
555

556
Get Mattermost slash command service settings for a project.
R
Robert Schilling 已提交
557 558 559 560 561

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

562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
### Create/Edit Mattermost slash command service

Set Mattermost slash command for a project.

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

Parameters:

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | yes | The Mattermost token |


### Delete Mattermost slash command service

Delete Mattermost slash command service for a project.

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

R
Robert Schilling 已提交
585 586 587 588 589 590 591 592 593 594 595 596 597 598
## 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 已提交
599 600 601 602
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `recipients` | string | yes | Comma-separated list of recipient email addresses |
| `add_pusher` | boolean | no | Add pusher to recipients list |
K
Kamil Trzciński 已提交
603
| `notify_only_broken_pipelines` | boolean | no | Notify only broken pipelines |
R
Robert Schilling 已提交
604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620

### 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 已提交
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635
## 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**)
636
- `restrict_to_branch` (optional) - Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches.
K
Kirilll Zaitsev 已提交
637 638 639 640 641 642 643 644 645

### Delete PivotalTracker service

Delete PivotalTracker service for a project.

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

646 647 648 649 650 651 652 653
### Get PivotalTracker service settings

Get PivotalTracker service settings for a project.

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

K
Kirilll Zaitsev 已提交
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681
## 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
```

682 683 684 685 686 687 688 689
### Get Pushover service settings

Get Pushover service settings for a project.

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

K
Kirilll Zaitsev 已提交
690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716
## 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
```

717 718 719 720 721 722 723 724
### Get Redmine service settings

Get Redmine service settings for a project.

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

F
Felipe Artur 已提交
725
## Slack notifications
K
Kirilll Zaitsev 已提交
726

F
Felipe Artur 已提交
727
Receive event notifications in Slack
K
Kirilll Zaitsev 已提交
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750

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

751 752 753 754 755 756 757 758
### Get Slack service settings

Get Slack service settings for a project.

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

F
Felipe Artur 已提交
759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792
## 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 已提交
793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821
## 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
```

822 823 824 825 826 827 828
### Get JetBrains TeamCity CI service settings

Get JetBrains TeamCity CI service settings for a project.

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

830
[jira-doc]: ../user/project/integrations/jira.md
831
[old-jira-api]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-13-stable/doc/api/services.md#jira
E
Eric Eastwood 已提交
832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866


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