Read about our upcoming Code of Conduct on this issue

projects.md 45.8 KB
Newer Older
1
# Projects API
2
3
4

### Project visibility level

5
6
Project in GitLab can be either private, internal or public.
This is determined by the `visibility` field in the project.
7

8
Values for the project visibility level are:
9

10
* `private`:
11
12
  Project access must be granted explicitly for each user.

13
* `internal`:
14
  The project can be cloned by any logged in user.
15

16
* `public`:
17
18
  The project can be cloned without any authentication.

19
## List projects
Nihad Abbasov's avatar
Nihad Abbasov committed
20

21
Get a list of visible projects for authenticated user. When accessed without authentication, only public projects are returned.
Nihad Abbasov's avatar
Nihad Abbasov committed
22
23
24
25
26

```
GET /projects
```

27
28
Parameters:

29
30
31
32
33
34
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `archived` | boolean | no | Limit by archived status |
| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` |
| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` |
35
| `search` | string | no | Return list of projects matching the search criteria |
36
| `simple` | boolean | no | Return only the ID, URL, name, and path of each project |
37
| `owned` | boolean | no | Limit by projects owned by the current user |
38
| `membership` | boolean | no | Limit by projects that the current user is a member of |
39
| `starred` | boolean | no | Limit by projects starred by the current user |
40
| `statistics` | boolean | no | Include project statistics |
41
42
| `with_issues_enabled` | boolean | no | Limit by enabled issues feature |
| `with_merge_requests_enabled` | boolean | no | Limit by enabled merge requests feature |
vanadium23's avatar
vanadium23 committed
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

```json
[
  {
    "id": 4,
    "description": null,
    "default_branch": "master",
    "visibility": "private",
    "ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
    "http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
    "web_url": "http://example.com/diaspora/diaspora-client",
    "tag_list": [
      "example",
      "disapora client"
    ],
    "owner": {
      "id": 3,
      "name": "Diaspora",
      "created_at": "2013-09-30T13:46:02Z"
    },
    "name": "Diaspora Client",
    "name_with_namespace": "Diaspora / Diaspora Client",
    "path": "diaspora-client",
    "path_with_namespace": "diaspora/diaspora-client",
    "issues_enabled": true,
    "open_issues_count": 1,
    "merge_requests_enabled": true,
    "jobs_enabled": true,
    "wiki_enabled": true,
    "snippets_enabled": false,
73
    "resolve_outdated_diff_discussions": false,
vanadium23's avatar
vanadium23 committed
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
100
101
102
    "container_registry_enabled": false,
    "created_at": "2013-09-30T13:46:02Z",
    "last_activity_at": "2013-09-30T13:46:02Z",
    "creator_id": 3,
    "namespace": {
      "id": 3,
      "name": "Diaspora",
      "path": "diaspora",
      "kind": "group",
      "full_path": "diaspora"
    },
    "import_status": "none",
    "archived": false,
    "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png",
    "shared_runners_enabled": true,
    "forks_count": 0,
    "star_count": 0,
    "runners_token": "b8547b1dc37721d05889db52fa2f02",
    "public_jobs": true,
    "shared_with_groups": [],
    "only_allow_merge_if_pipeline_succeeds": false,
    "only_allow_merge_if_all_discussions_are_resolved": false,
    "request_access_enabled": false,
    "statistics": {
      "commit_count": 37,
      "storage_size": 1038090,
      "repository_size": 1038090,
      "lfs_objects_size": 0,
      "job_artifacts_size": 0
103
104
105
106
107
108
109
110
111
112
    },
    "_links": {
      "self": "http://example.com/api/v4/projects",
      "issues": "http://example.com/api/v4/projects/1/issues",
      "merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
      "repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
      "labels": "http://example.com/api/v4/projects/1/labels",
      "events": "http://example.com/api/v4/projects/1/events",
      "members": "http://example.com/api/v4/projects/1/members"
    },
vanadium23's avatar
vanadium23 committed
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
  },
  {
    "id": 6,
    "description": null,
    "default_branch": "master",
    "visibility": "private",
    "ssh_url_to_repo": "git@example.com:brightbox/puppet.git",
    "http_url_to_repo": "http://example.com/brightbox/puppet.git",
    "web_url": "http://example.com/brightbox/puppet",
    "tag_list": [
      "example",
      "puppet"
    ],
    "owner": {
      "id": 4,
      "name": "Brightbox",
      "created_at": "2013-09-30T13:46:02Z"
    },
    "name": "Puppet",
    "name_with_namespace": "Brightbox / Puppet",
    "path": "puppet",
    "path_with_namespace": "brightbox/puppet",
    "issues_enabled": true,
    "open_issues_count": 1,
    "merge_requests_enabled": true,
    "jobs_enabled": true,
    "wiki_enabled": true,
    "snippets_enabled": false,
141
    "resolve_outdated_diff_discussions": false,
vanadium23's avatar
vanadium23 committed
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
    "container_registry_enabled": false,
    "created_at": "2013-09-30T13:46:02Z",
    "last_activity_at": "2013-09-30T13:46:02Z",
    "creator_id": 3,
    "namespace": {
      "id": 4,
      "name": "Brightbox",
      "path": "brightbox",
      "kind": "group",
      "full_path": "brightbox"
    },
    "import_status": "none",
    "import_error": null,
    "permissions": {
      "project_access": {
        "access_level": 10,
        "notification_level": 3
      },
      "group_access": {
        "access_level": 50,
        "notification_level": 3
      }
    },
    "archived": false,
    "avatar_url": null,
    "shared_runners_enabled": true,
    "forks_count": 0,
    "star_count": 0,
    "runners_token": "b8547b1dc37721d05889db52fa2f02",
    "public_jobs": true,
    "shared_with_groups": [],
    "only_allow_merge_if_pipeline_succeeds": false,
    "only_allow_merge_if_all_discussions_are_resolved": false,
    "request_access_enabled": false,
    "statistics": {
      "commit_count": 12,
      "storage_size": 2066080,
      "repository_size": 2066080,
      "lfs_objects_size": 0,
      "job_artifacts_size": 0
182
183
184
185
186
187
188
189
190
    },
    "_links": {
      "self": "http://example.com/api/v4/projects",
      "issues": "http://example.com/api/v4/projects/1/issues",
      "merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
      "repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
      "labels": "http://example.com/api/v4/projects/1/labels",
      "events": "http://example.com/api/v4/projects/1/events",
      "members": "http://example.com/api/v4/projects/1/members"
vanadium23's avatar
vanadium23 committed
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
    }
  }
]
```

### List a user's projects

Get a list of visible projects for the given user. When accessed without authentication, only public projects are returned.

```
GET /users/:user_id/projects
```

Parameters:

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `user_id` | string | yes | The ID or username of the user |
| `archived` | boolean | no | Limit by archived status |
| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` |
| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` |
| `search` | string | no | Return list of projects matching the search criteria |
| `simple` | boolean | no | Return only the ID, URL, name, and path of each project |
| `owned` | boolean | no | Limit by projects owned by the current user |
| `membership` | boolean | no | Limit by projects that the current user is a member of |
| `starred` | boolean | no | Limit by projects starred by the current user |
| `statistics` | boolean | no | Include project statistics |
219
220
| `with_issues_enabled` | boolean | no | Limit by enabled issues feature |
| `with_merge_requests_enabled` | boolean | no | Limit by enabled merge requests feature |
221

Nihad Abbasov's avatar
Nihad Abbasov committed
222
223
224
```json
[
  {
Marin Jankovski's avatar
Marin Jankovski committed
225
    "id": 4,
Nihad Abbasov's avatar
Nihad Abbasov committed
226
227
    "description": null,
    "default_branch": "master",
228
    "visibility": "private",
Marin Jankovski's avatar
Marin Jankovski committed
229
230
231
    "ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
    "http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
    "web_url": "http://example.com/diaspora/diaspora-client",
232
233
234
235
    "tag_list": [
      "example",
      "disapora client"
    ],
Nihad Abbasov's avatar
Nihad Abbasov committed
236
    "owner": {
Marin Jankovski's avatar
Marin Jankovski committed
237
238
      "id": 3,
      "name": "Diaspora",
Ben Boeckel's avatar
Ben Boeckel committed
239
      "created_at": "2013-09-30T13:46:02Z"
Nihad Abbasov's avatar
Nihad Abbasov committed
240
    },
Marin Jankovski's avatar
Marin Jankovski committed
241
242
243
244
245
    "name": "Diaspora Client",
    "name_with_namespace": "Diaspora / Diaspora Client",
    "path": "diaspora-client",
    "path_with_namespace": "diaspora/diaspora-client",
    "issues_enabled": true,
Stan Hu's avatar
Stan Hu committed
246
    "open_issues_count": 1,
Marin Jankovski's avatar
Marin Jankovski committed
247
    "merge_requests_enabled": true,
248
    "jobs_enabled": true,
Nihad Abbasov's avatar
Nihad Abbasov committed
249
    "wiki_enabled": true,
Marin Jankovski's avatar
Marin Jankovski committed
250
    "snippets_enabled": false,
251
    "resolve_outdated_diff_discussions": false,
252
    "container_registry_enabled": false,
Ben Boeckel's avatar
Ben Boeckel committed
253
254
    "created_at": "2013-09-30T13:46:02Z",
    "last_activity_at": "2013-09-30T13:46:02Z",
255
    "creator_id": 3,
Marin Jankovski's avatar
Marin Jankovski committed
256
257
258
259
    "namespace": {
      "id": 3,
      "name": "Diaspora",
      "path": "diaspora",
260
261
      "kind": "group",
      "full_path": "diaspora"
262
    },
263
    "import_status": "none",
sue445's avatar
sue445 committed
264
    "archived": false,
Tomasz Maczukin's avatar
Tomasz Maczukin committed
265
266
267
    "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png",
    "shared_runners_enabled": true,
    "forks_count": 0,
268
269
    "star_count": 0,
    "runners_token": "b8547b1dc37721d05889db52fa2f02",
270
    "public_jobs": true,
271
    "shared_with_groups": [],
272
    "only_allow_merge_if_pipeline_succeeds": false,
273
    "only_allow_merge_if_all_discussions_are_resolved": false,
274
275
276
277
278
279
280
    "request_access_enabled": false,
    "statistics": {
      "commit_count": 37,
      "storage_size": 1038090,
      "repository_size": 1038090,
      "lfs_objects_size": 0,
      "job_artifacts_size": 0
281
282
283
284
285
286
287
288
289
    },
    "_links": {
      "self": "http://example.com/api/v4/projects",
      "issues": "http://example.com/api/v4/projects/1/issues",
      "merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
      "repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
      "labels": "http://example.com/api/v4/projects/1/labels",
      "events": "http://example.com/api/v4/projects/1/events",
      "members": "http://example.com/api/v4/projects/1/members"
290
    }
Nihad Abbasov's avatar
Nihad Abbasov committed
291
292
  },
  {
Marin Jankovski's avatar
Marin Jankovski committed
293
    "id": 6,
Nihad Abbasov's avatar
Nihad Abbasov committed
294
    "description": null,
Marin Jankovski's avatar
Marin Jankovski committed
295
    "default_branch": "master",
296
    "visibility": "private",
Marin Jankovski's avatar
Marin Jankovski committed
297
298
299
    "ssh_url_to_repo": "git@example.com:brightbox/puppet.git",
    "http_url_to_repo": "http://example.com/brightbox/puppet.git",
    "web_url": "http://example.com/brightbox/puppet",
300
301
302
303
    "tag_list": [
      "example",
      "puppet"
    ],
Johannes Schleifenbaum's avatar
Johannes Schleifenbaum committed
304
    "owner": {
Marin Jankovski's avatar
Marin Jankovski committed
305
306
307
      "id": 4,
      "name": "Brightbox",
      "created_at": "2013-09-30T13:46:02Z"
Nihad Abbasov's avatar
Nihad Abbasov committed
308
    },
Marin Jankovski's avatar
Marin Jankovski committed
309
310
311
312
    "name": "Puppet",
    "name_with_namespace": "Brightbox / Puppet",
    "path": "puppet",
    "path_with_namespace": "brightbox/puppet",
Nihad Abbasov's avatar
Nihad Abbasov committed
313
    "issues_enabled": true,
Stan Hu's avatar
Stan Hu committed
314
    "open_issues_count": 1,
Nihad Abbasov's avatar
Nihad Abbasov committed
315
    "merge_requests_enabled": true,
316
    "jobs_enabled": true,
Nihad Abbasov's avatar
Nihad Abbasov committed
317
    "wiki_enabled": true,
Marin Jankovski's avatar
Marin Jankovski committed
318
    "snippets_enabled": false,
319
    "resolve_outdated_diff_discussions": false,
320
    "container_registry_enabled": false,
Marin Jankovski's avatar
Marin Jankovski committed
321
322
    "created_at": "2013-09-30T13:46:02Z",
    "last_activity_at": "2013-09-30T13:46:02Z",
323
    "creator_id": 3,
Johannes Schleifenbaum's avatar
Johannes Schleifenbaum committed
324
    "namespace": {
Marin Jankovski's avatar
Marin Jankovski committed
325
326
327
      "id": 4,
      "name": "Brightbox",
      "path": "brightbox",
328
329
      "kind": "group",
      "full_path": "brightbox"
330
    },
331
332
    "import_status": "none",
    "import_error": null,
333
334
335
336
337
338
339
340
341
342
    "permissions": {
      "project_access": {
        "access_level": 10,
        "notification_level": 3
      },
      "group_access": {
        "access_level": 50,
        "notification_level": 3
      }
    },
sue445's avatar
sue445 committed
343
    "archived": false,
Tomasz Maczukin's avatar
Tomasz Maczukin committed
344
345
346
347
    "avatar_url": null,
    "shared_runners_enabled": true,
    "forks_count": 0,
    "star_count": 0,
348
    "runners_token": "b8547b1dc37721d05889db52fa2f02",
349
    "public_jobs": true,
350
    "shared_with_groups": [],
351
    "only_allow_merge_if_pipeline_succeeds": false,
352
    "only_allow_merge_if_all_discussions_are_resolved": false,
353
354
355
356
357
358
359
    "request_access_enabled": false,
    "statistics": {
      "commit_count": 12,
      "storage_size": 2066080,
      "repository_size": 2066080,
      "lfs_objects_size": 0,
      "job_artifacts_size": 0
360
361
362
363
364
365
366
367
368
    },
    "_links": {
      "self": "http://example.com/api/v4/projects",
      "issues": "http://example.com/api/v4/projects/1/issues",
      "merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
      "repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
      "labels": "http://example.com/api/v4/projects/1/labels",
      "events": "http://example.com/api/v4/projects/1/events",
      "members": "http://example.com/api/v4/projects/1/members"
369
    }
370
371
372
373
  }
]
```

374
### Get single project
Nihad Abbasov's avatar
Nihad Abbasov committed
375

376
377
Get a specific project. This endpoint can be accessed without authentication if
the project is publicly accessible.
Nihad Abbasov's avatar
Nihad Abbasov committed
378
379
380
381
382
383
384

```
GET /projects/:id
```

Parameters:

385
386
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
387
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
388
| `statistics` | boolean | no | Include project statistics |
Nihad Abbasov's avatar
Nihad Abbasov committed
389

390
391
```json
{
Marin Jankovski's avatar
Marin Jankovski committed
392
  "id": 3,
393
  "description": null,
Marin Jankovski's avatar
Marin Jankovski committed
394
  "default_branch": "master",
395
  "visibility": "private",
Marin Jankovski's avatar
Marin Jankovski committed
396
397
398
  "ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
  "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
  "web_url": "http://example.com/diaspora/diaspora-project-site",
399
400
401
402
  "tag_list": [
    "example",
    "disapora project"
  ],
403
  "owner": {
Marin Jankovski's avatar
Marin Jankovski committed
404
405
    "id": 3,
    "name": "Diaspora",
Ben Boeckel's avatar
Ben Boeckel committed
406
    "created_at": "2013-09-30T13:46:02Z"
407
  },
Marin Jankovski's avatar
Marin Jankovski committed
408
409
410
411
  "name": "Diaspora Project Site",
  "name_with_namespace": "Diaspora / Diaspora Project Site",
  "path": "diaspora-project-site",
  "path_with_namespace": "diaspora/diaspora-project-site",
412
  "issues_enabled": true,
Stan Hu's avatar
Stan Hu committed
413
  "open_issues_count": 1,
414
  "merge_requests_enabled": true,
415
  "jobs_enabled": true,
416
  "wiki_enabled": true,
Marin Jankovski's avatar
Marin Jankovski committed
417
  "snippets_enabled": false,
418
  "resolve_outdated_diff_discussions": false,
419
  "container_registry_enabled": false,
Ben Boeckel's avatar
Ben Boeckel committed
420
421
  "created_at": "2013-09-30T13:46:02Z",
  "last_activity_at": "2013-09-30T13:46:02Z",
422
  "creator_id": 3,
Marin Jankovski's avatar
Marin Jankovski committed
423
424
425
426
  "namespace": {
    "id": 3,
    "name": "Diaspora",
    "path": "diaspora",
427
428
    "kind": "group",
    "full_path": "diaspora"
Johannes Schleifenbaum's avatar
Johannes Schleifenbaum committed
429
  },
430
431
  "import_status": "none",
  "import_error": null,
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
432
433
434
435
436
437
438
439
440
  "permissions": {
    "project_access": {
      "access_level": 10,
      "notification_level": 3
    },
    "group_access": {
      "access_level": 50,
      "notification_level": 3
    }
441
  },
sue445's avatar
sue445 committed
442
  "archived": false,
Tomasz Maczukin's avatar
Tomasz Maczukin committed
443
444
445
446
  "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
  "shared_runners_enabled": true,
  "forks_count": 0,
  "star_count": 0,
447
  "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b",
448
  "public_jobs": true,
449
450
451
452
453
454
455
456
457
458
459
  "shared_with_groups": [
    {
      "group_id": 4,
      "group_name": "Twitter",
      "group_access_level": 30
    },
    {
      "group_id": 3,
      "group_name": "Gitlab Org",
      "group_access_level": 10
    }
460
  ],
461
  "only_allow_merge_if_pipeline_succeeds": false,
462
  "only_allow_merge_if_all_discussions_are_resolved": false,
463
  "printing_merge_requests_link_enabled": true,
464
465
466
467
468
469
470
  "request_access_enabled": false,
  "statistics": {
    "commit_count": 37,
    "storage_size": 1038090,
    "repository_size": 1038090,
    "lfs_objects_size": 0,
    "job_artifacts_size": 0
471
472
473
474
475
476
477
478
479
  },
  "_links": {
    "self": "http://example.com/api/v4/projects",
    "issues": "http://example.com/api/v4/projects/1/issues",
    "merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
    "repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
    "labels": "http://example.com/api/v4/projects/1/labels",
    "events": "http://example.com/api/v4/projects/1/events",
    "members": "http://example.com/api/v4/projects/1/members"
480
  }
481
482
483
}
```

484
## Get project users
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
485

486
Get the users list of a project.
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
487
488
489
490


Parameters:

491
492
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
493
494
495
496
497
| `search` | string | no | Search for specific users |

```
GET /projects/:id/users
```
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
498
499

```json
Johannes Schleifenbaum's avatar
Johannes Schleifenbaum committed
500
501
[
  {
502
503
504
505
506
507
    "id": 1,
    "username": "john_smith",
    "name": "John Smith",
    "state": "active",
    "avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
    "web_url": "http://localhost:3000/john_smith"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
508
  },
Johannes Schleifenbaum's avatar
Johannes Schleifenbaum committed
509
  {
510
511
512
513
514
515
    "id": 2,
    "username": "jack_smith",
    "name": "Jack Smith",
    "state": "blocked",
    "avatar_url": "http://gravatar.com/../e32131cd8.jpeg",
    "web_url": "http://localhost:3000/jack_smith"
Johannes Schleifenbaum's avatar
Johannes Schleifenbaum committed
516
517
  }
]
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
518
519
520
521
```

### Get project events

Mark Fletcher's avatar
Mark Fletcher committed
522
Please refer to the [Events API documentation](events.md#list-a-projects-visible-events)
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
523

524
### Create project
525

526
Creates a new project owned by the authenticated user.
527
528
529
530
531
532
533

```
POST /projects
```

Parameters:

534
535
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
536
537
| `name` | string | yes if path is not provided | The name of the new project. Equals path if not provided. |
| `path` | string | yes if name is not provided | Repository name for new project. Generated based on name if not provided (generated lowercased with dashes). |
538
539
540
541
| `namespace_id` | integer | no | Namespace for the new project (defaults to the current user's namespace) |
| `description` | string | no | Short project description |
| `issues_enabled` | boolean | no | Enable issues for this project |
| `merge_requests_enabled` | boolean | no | Enable merge requests for this project |
542
| `jobs_enabled` | boolean | no | Enable jobs for this project |
543
544
| `wiki_enabled` | boolean | no | Enable wiki for this project |
| `snippets_enabled` | boolean | no | Enable snippets for this project |
545
| `resolve_outdated_diff_discussions` | boolean | no | Automatically resolve merge request diffs discussions on lines changed with a push |
546
547
| `container_registry_enabled` | boolean | no | Enable container registry for this project |
| `shared_runners_enabled` | boolean | no | Enable shared runners for this project |
548
| `visibility` | string | no | See [project visibility level](#project-visibility-level) |
549
| `import_url` | string | no | URL to import repository from |
550
551
| `public_jobs` | boolean | no | If `true`, jobs can be viewed by non-project-members |
| `only_allow_merge_if_pipeline_succeeds` | boolean | no | Set whether merge requests can only be merged with successful jobs |
552
| `only_allow_merge_if_all_discussions_are_resolved` | boolean | no | Set whether merge requests can only be merged when all the discussions are resolved |
553
554
| `lfs_enabled` | boolean | no | Enable LFS |
| `request_access_enabled` | boolean | no | Allow users to request member access |
vanadium23's avatar
vanadium23 committed
555
| `tag_list`    | array   | no       | The list of tags for a project; put array of tags, that should be finally assigned to a project |
556
| `avatar`    | mixed   | no      | Image file for avatar of the project                |
557
| `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line |
558
| `ci_config_path` | string | no | The path to CI config file |
559

560
561
### Create project for user

562
Creates a new project owned by the specified user. Available only for admins.
563
564
565
566
567
568
569

```
POST /projects/user/:user_id
```

Parameters:

570
571
572
573
574
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `user_id` | integer | yes | The user ID of the project owner |
| `name` | string | yes | The name of the new project |
| `path` | string | no | Custom repository name for new project. By default generated based on name |
575
| `default_branch` | string | no | `master` by default |
576
577
578
579
| `namespace_id` | integer | no | Namespace for the new project (defaults to the current user's namespace) |
| `description` | string | no | Short project description |
| `issues_enabled` | boolean | no | Enable issues for this project |
| `merge_requests_enabled` | boolean | no | Enable merge requests for this project |
580
| `jobs_enabled` | boolean | no | Enable jobs for this project |
581
582
| `wiki_enabled` | boolean | no | Enable wiki for this project |
| `snippets_enabled` | boolean | no | Enable snippets for this project |
583
| `resolve_outdated_diff_discussions` | boolean | no | Automatically resolve merge request diffs discussions on lines changed with a push |
584
585
| `container_registry_enabled` | boolean | no | Enable container registry for this project |
| `shared_runners_enabled` | boolean | no | Enable shared runners for this project |
586
| `visibility` | string | no | See [project visibility level](#project-visibility-level) |
587
| `import_url` | string | no | URL to import repository from |
588
589
| `public_jobs` | boolean | no | If `true`, jobs can be viewed by non-project-members |
| `only_allow_merge_if_pipeline_succeeds` | boolean | no | Set whether merge requests can only be merged with successful jobs |
590
| `only_allow_merge_if_all_discussions_are_resolved` | boolean | no | Set whether merge requests can only be merged when all the discussions are resolved |
591
592
| `lfs_enabled` | boolean | no | Enable LFS |
| `request_access_enabled` | boolean | no | Allow users to request member access |
vanadium23's avatar
vanadium23 committed
593
| `tag_list`    | array   | no       | The list of tags for a project; put array of tags, that should be finally assigned to a project |
594
| `avatar`    | mixed   | no      | Image file for avatar of the project                |
595
| `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line |
596
| `ci_config_path` | string | no | The path to CI config file |
597

598
599
### Edit project

600
Updates an existing project.
601
602
603
604
605
606
607

```
PUT /projects/:id
```

Parameters:

608
609
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
610
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
611
612
| `name` | string | yes | The name of the project |
| `path` | string | no | Custom repository name for the project. By default generated based on name |
613
| `default_branch` | string | no | `master` by default |
614
615
616
| `description` | string | no | Short project description |
| `issues_enabled` | boolean | no | Enable issues for this project |
| `merge_requests_enabled` | boolean | no | Enable merge requests for this project |
617
| `jobs_enabled` | boolean | no | Enable jobs for this project |
618
619
| `wiki_enabled` | boolean | no | Enable wiki for this project |
| `snippets_enabled` | boolean | no | Enable snippets for this project |
620
| `resolve_outdated_diff_discussions` | boolean | no | Automatically resolve merge request diffs discussions on lines changed with a push |
621
622
| `container_registry_enabled` | boolean | no | Enable container registry for this project |
| `shared_runners_enabled` | boolean | no | Enable shared runners for this project |
623
| `visibility` | string | no | See [project visibility level](#project-visibility-level) |
624
| `import_url` | string | no | URL to import repository from |
625
626
| `public_jobs` | boolean | no | If `true`, jobs can be viewed by non-project-members |
| `only_allow_merge_if_pipeline_succeeds` | boolean | no | Set whether merge requests can only be merged with successful jobs |
627
| `only_allow_merge_if_all_discussions_are_resolved` | boolean | no | Set whether merge requests can only be merged when all the discussions are resolved |
628
629
| `lfs_enabled` | boolean | no | Enable LFS |
| `request_access_enabled` | boolean | no | Allow users to request member access |
vanadium23's avatar
vanadium23 committed
630
| `tag_list`    | array   | no       | The list of tags for a project; put array of tags, that should be finally assigned to a project |
631
| `avatar`    | mixed   | no      | Image file for avatar of the project                |
632
| `ci_config_path` | string | no | The path to CI config file |
633

634
635
### Fork project

636
Forks a project into the user namespace of the authenticated user or the one provided.
637

638
639
The forking operation for a project is asynchronous and is completed in a background job. The request will return immediately. To determine whether the fork of the project has completed, query the `import_status` for the new project.

640
```
641
POST /projects/:id/fork
642
643
644
645
```

Parameters:

646
647
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
648
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
649
| `namespace` | integer/string | yes | The ID or path of the namespace that the project will be forked to |
650

651
652
### Star a project

653
Stars a given project. Returns status code `304` if the project is already starred.
654
655
656
657
658

```
POST /projects/:id/star
```

659
660
Parameters:

661
662
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
663
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
664
665

```bash
Robert Schilling's avatar
Robert Schilling committed
666
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/star"
667
668
669
670
671
672
673
674
675
```

Example response:

```json
{
  "id": 3,
  "description": null,
  "default_branch": "master",
676
  "visibility": "internal",
677
678
679
680
681
682
683
684
685
686
687
688
689
690
  "ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
  "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
  "web_url": "http://example.com/diaspora/diaspora-project-site",
  "tag_list": [
    "example",
    "disapora project"
  ],
  "name": "Diaspora Project Site",
  "name_with_namespace": "Diaspora / Diaspora Project Site",
  "path": "diaspora-project-site",
  "path_with_namespace": "diaspora/diaspora-project-site",
  "issues_enabled": true,
  "open_issues_count": 1,
  "merge_requests_enabled": true,
691
  "jobs_enabled": true,
692
693
  "wiki_enabled": true,
  "snippets_enabled": false,
694
  "resolve_outdated_diff_discussions": false,
695
  "container_registry_enabled": false,
Ben Boeckel's avatar
Ben Boeckel committed
696
697
  "created_at": "2013-09-30T13:46:02Z",
  "last_activity_at": "2013-09-30T13:46:02Z",
698
699
700
701
702
  "creator_id": 3,
  "namespace": {
    "id": 3,
    "name": "Diaspora",
    "path": "diaspora",
703
704
    "kind": "group",
    "full_path": "diaspora"
705
  },
706
  "import_status": "none",
707
708
709
710
  "archived": true,
  "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
  "shared_runners_enabled": true,
  "forks_count": 0,
711
  "star_count": 1,
712
  "public_jobs": true,
713
  "shared_with_groups": [],
714
  "only_allow_merge_if_pipeline_succeeds": false,
715
  "only_allow_merge_if_all_discussions_are_resolved": false,
716
717
718
719
720
721
722
723
724
725
  "request_access_enabled": false,
  "_links": {
    "self": "http://example.com/api/v4/projects",
    "issues": "http://example.com/api/v4/projects/1/issues",
    "merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
    "repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
    "labels": "http://example.com/api/v4/projects/1/labels",
    "events": "http://example.com/api/v4/projects/1/events",
    "members": "http://example.com/api/v4/projects/1/members"
  }
726
727
728
729
730
}
```

### Unstar a project

731
Unstars a given project. Returns status code `304` if the project is not starred.
732
733

```
734
POST /projects/:id/unstar
735
736
737
738
```

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
739
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
740
741

```bash
Robert Schilling's avatar
Robert Schilling committed
742
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/unstar"
743
744
745
746
747
748
749
750
751
```

Example response:

```json
{
  "id": 3,
  "description": null,
  "default_branch": "master",
752
  "visibility": "internal",
753
754
755
756
757
758
759
760
761
762
763
764
765
766
  "ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
  "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
  "web_url": "http://example.com/diaspora/diaspora-project-site",
  "tag_list": [
    "example",
    "disapora project"
  ],
  "name": "Diaspora Project Site",
  "name_with_namespace": "Diaspora / Diaspora Project Site",
  "path": "diaspora-project-site",
  "path_with_namespace": "diaspora/diaspora-project-site",
  "issues_enabled": true,
  "open_issues_count": 1,
  "merge_requests_enabled": true,
767
  "jobs_enabled": true,
768
769
  "wiki_enabled": true,
  "snippets_enabled": false,
770
  "resolve_outdated_diff_discussions": false,
771
  "container_registry_enabled": false,
Ben Boeckel's avatar
Ben Boeckel committed
772
773
  "created_at": "2013-09-30T13:46:02Z",
  "last_activity_at": "2013-09-30T13:46:02Z",
774
775
776
777
778
  "creator_id": 3,
  "namespace": {
    "id": 3,
    "name": "Diaspora",
    "path": "diaspora",
779
780
    "kind": "group",
    "full_path": "diaspora"
781
  },
782
  "import_status": "none",
783
784
785
786
  "archived": true,
  "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
  "shared_runners_enabled": true,
  "forks_count": 0,
787
  "star_count": 0,
788
  "public_jobs": true,
789
  "shared_with_groups": [],
790
  "only_allow_merge_if_pipeline_succeeds": false,
791
  "only_allow_merge_if_all_discussions_are_resolved": false,
792
793
794
795
796
797
798
799
800
801
  "request_access_enabled": false,
  "_links": {
    "self": "http://example.com/api/v4/projects",
    "issues": "http://example.com/api/v4/projects/1/issues",
    "merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
    "repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
    "labels": "http://example.com/api/v4/projects/1/labels",
    "events": "http://example.com/api/v4/projects/1/events",
    "members": "http://example.com/api/v4/projects/1/members"
  }
802
803
804
}
```

805
806
### Archive a project

807
Archives the project if the user is either admin or the project owner of this project. This action is
808
809
810
idempotent, thus archiving an already archived project will not change the project.

```
811
POST /projects/:id/archive
812
813
814
815
```

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
816
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
817
818

```bash
Robert Schilling's avatar
Robert Schilling committed
819
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/archive"
820
821
822
823
824
825
826
827
828
```

Example response:

```json
{
  "id": 3,
  "description": null,
  "default_branch": "master",
829
  "visibility": "private",
830
831
832
833
834
835
836
837
838
839
  "ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
  "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
  "web_url": "http://example.com/diaspora/diaspora-project-site",
  "tag_list": [
    "example",
    "disapora project"
  ],
  "owner": {
    "id": 3,
    "name": "Diaspora",
Ben Boeckel's avatar
Ben Boeckel committed
840
    "created_at": "2013-09-30T13:46:02Z"
841
842
843
844
845
846
847
848
  },
  "name": "Diaspora Project Site",
  "name_with_namespace": "Diaspora / Diaspora Project Site",
  "path": "diaspora-project-site",
  "path_with_namespace": "diaspora/diaspora-project-site",
  "issues_enabled": true,
  "open_issues_count": 1,
  "merge_requests_enabled": true,
849
  "jobs_enabled": true,
850
851
  "wiki_enabled": true,
  "snippets_enabled": false,
852
  "resolve_outdated_diff_discussions": false,
853
  "container_registry_enabled": false,
Ben Boeckel's avatar
Ben Boeckel committed
854
855
  "created_at": "2013-09-30T13:46:02Z",
  "last_activity_at": "2013-09-30T13:46:02Z",
856
857
858
859
860
  "creator_id": 3,
  "namespace": {
    "id": 3,
    "name": "Diaspora",
    "path": "diaspora",
861
862
    "kind": "group",
    "full_path": "diaspora"
863
  },
864
865
  "import_status": "none",
  "import_error": null,
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
  "permissions": {
    "project_access": {
      "access_level": 10,
      "notification_level": 3
    },
    "group_access": {
      "access_level": 50,
      "notification_level": 3
    }
  },
  "archived": true,
  "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
  "shared_runners_enabled": true,
  "forks_count": 0,
  "star_count": 0,
881
  "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b",
882
  "public_jobs": true,
883
  "shared_with_groups": [],
884
  "only_allow_merge_if_pipeline_succeeds": false,
885
  "only_allow_merge_if_all_discussions_are_resolved": false,
886
887
888
889
890
891
892
893
894
895
  "request_access_enabled": false,
  "_links": {
    "self": "http://example.com/api/v4/projects",
    "issues": "http://example.com/api/v4/projects/1/issues",
    "merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
    "repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
    "labels": "http://example.com/api/v4/projects/1/labels",
    "events": "http://example.com/api/v4/projects/1/events",
    "members": "http://example.com/api/v4/projects/1/members"
  }
896
897
898
899
900
}
```

### Unarchive a project

901
Unarchives the project if the user is either admin or the project owner of this project. This action is
902
903
904
idempotent, thus unarchiving an non-archived project will not change the project.

```
Sergey Gnuskov's avatar
Sergey Gnuskov committed
905
POST /projects/:id/unarchive
906
907
908
909
```

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
910
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
911
912

```bash
Robert Schilling's avatar
Robert Schilling committed
913
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/unarchive"
914
915
916
917
918
919
920
921
922
```

Example response:

```json
{
  "id": 3,
  "description": null,
  "default_branch": "master",
923
  "visibility": "private",
924
925
926
927
928
929
930
931
932
933
  "ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
  "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
  "web_url": "http://example.com/diaspora/diaspora-project-site",
  "tag_list": [
    "example",
    "disapora project"
  ],
  "owner": {
    "id": 3,
    "name": "Diaspora",
Ben Boeckel's avatar
Ben Boeckel committed
934
    "created_at": "2013-09-30T13:46:02Z"
935
936
937
938
939
940
941
942
  },
  "name": "Diaspora Project Site",
  "name_with_namespace": "Diaspora / Diaspora Project Site",
  "path": "diaspora-project-site",
  "path_with_namespace": "diaspora/diaspora-project-site",
  "issues_enabled": true,
  "open_issues_count": 1,
  "merge_requests_enabled": true,
943
  "jobs_enabled": true,
944
945
  "wiki_enabled": true,
  "snippets_enabled": false,
946
  "resolve_outdated_diff_discussions": false,
947
  "container_registry_enabled": false,
Ben Boeckel's avatar
Ben Boeckel committed
948
949
  "created_at": "2013-09-30T13:46:02Z",
  "last_activity_at": "2013-09-30T13:46:02Z",
950
951
952
953
954
  "creator_id": 3,
  "namespace": {
    "id": 3,
    "name": "Diaspora",
    "path": "diaspora",
955
956
    "kind": "group",
    "full_path": "diaspora"
957
  },
958
959
  "import_status": "none",
  "import_error": null,
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
  "permissions": {
    "project_access": {
      "access_level": 10,
      "notification_level": 3
    },
    "group_access": {
      "access_level": 50,
      "notification_level": 3
    }
  },
  "archived": false,
  "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
  "shared_runners_enabled": true,
  "forks_count": 0,
  "star_count": 0,
975
  "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b",
976
  "public_jobs": true,
977
  "shared_with_groups": [],
978
  "only_allow_merge_if_pipeline_succeeds": false,
979
  "only_allow_merge_if_all_discussions_are_resolved": false,
980
981
982
983
984
985
986
987
988
989
  "request_access_enabled": false,
  "_links": {
    "self": "http://example.com/api/v4/projects",
    "issues": "http://example.com/api/v4/projects/1/issues",
    "merge_requests": "http://example.com/api/v4/projects/1/merge_requests",
    "repo_branches": "http://example.com/api/v4/projects/1/repository_branches",
    "labels": "http://example.com/api/v4/projects/1/labels",
    "events": "http://example.com/api/v4/projects/1/events",
    "members": "http://example.com/api/v4/projects/1/members"
  }
990
991
992
}
```

993
### Remove project
994

995
Removes a project including all associated resources (issues, merge requests etc.)
996
997
998
999
1000
1001
1002

```
DELETE /projects/:id
```

Parameters:

1003
1004
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
1005
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
1006

Douwe Maan's avatar
Douwe Maan committed
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
## Uploads

### Upload a file

Uploads a file to the specified project to be used in an issue or merge request description, or a comment.

```
POST /projects/:id/uploads
```

Parameters:

1019
1020
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
1021
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
1022
| `file` | string | yes | The file to be uploaded |
Douwe Maan's avatar
Douwe Maan committed
1023

1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
To upload a file from your filesystem, use the `--form` argument. This causes
cURL to post data using the header `Content-Type: multipart/form-data`.
The `file=` parameter must point to a file on your filesystem and be preceded
by `@`. For example:

```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "file=@dk.png" https://gitlab.example.com/api/v3/projects/5/uploads
```

Returned object:

Douwe Maan's avatar
Douwe Maan committed
1035
1036
1037
1038
1039
1040
1041
1042
1043
```json
{
  "alt": "dk",
  "url": "/uploads/66dbcd21ec5d24ed6ea225176098d52b/dk.png",
  "markdown": "![dk](/uploads/66dbcd21ec5d24ed6ea225176098d52b/dk.png)"
}
```

**Note**: The returned `url` is relative to the project path.
1044
1045
In Markdown contexts, the link is automatically expanded when the format in
`markdown` is used.
Douwe Maan's avatar
Douwe Maan committed
1046

1047
## Project members
1048

1049
Please consult the [Project Members](members.md) documentation.
Nihad Abbasov's avatar
Nihad Abbasov committed
1050

1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
### Share project with group

Allow to share project with group.

```
POST /projects/:id/share
```

Parameters:

1061
1062
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
1063
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
1064
1065
1066
| `group_id` | integer | yes | The ID of the group to share with |
| `group_access` | integer | yes | The permissions level to grant the group |
| `expires_at` | string | no | Share expiration date in ISO 8601 format: 2016-09-26 |
1067

1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
### Delete a shared project link within a group

Unshare the project from the group. Returns `204` and no content on success.

```
DELETE /projects/:id/share/:group_id
```

Parameters:

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
1080
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
1081
1082
1083
| `group_id` | integer | yes | The ID of the group |

```bash
Robert Schilling's avatar
Robert Schilling committed
1084
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/share/17
1085
1086
```

1087
1088
## Hooks

1089
1090
1091
Also called Project Hooks and Webhooks.
These are different for [System Hooks](system_hooks.md) that are system wide.

1092
1093
### List project hooks

1094
Get a list of project hooks.
miks's avatar
miks committed
1095
1096
1097
1098
1099
1100
1101

```
GET /projects/:id/hooks
```

Parameters:

1102
1103
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
1104
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
miks's avatar
miks committed
1105

1106
### Get project hook
1107

1108
Get a specific hook for a project.
1109
1110
1111
1112
1113

```
GET /projects/:id/hooks/:hook_id
```

1114
Parameters:
1115

1116
1117
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
1118
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
1119
| `hook_id` | integer | yes | The ID of a project hook |
1120

1121
1122
1123
1124
```json
{
  "id": 1,
  "url": "http://example.com/hook",
1125
  "project_id": 3,
Ben Boeckel's avatar
Ben Boeckel committed
1126
1127
1128
  "push_events": true,
  "issues_events": true,
  "merge_requests_events": true,
1129
  "tag_push_events": true,
Ben Boeckel's avatar
Ben Boeckel committed
1130
  "note_events": true,
1131
  "job_events": true,
1132
  "pipeline_events": true,
1133
  "wiki_page_events": true,
Ben Boeckel's avatar
Ben Boeckel committed
1134
  "enable_ssl_verification": true,
1135
1136
1137
1138
1139
1140
  "created_at": "2012-10-12T17:04:47Z"
}
```

### Add project hook

1141
Adds a hook to a specified project.
miks's avatar
miks committed