blob: 72bd4dd023e8197a2c5f5261d303f0765c804fb1 [file] [log] [blame]
Edwin Kempind0a63922013-01-23 16:32:59 +01001Gerrit Code Review - '/changes/' REST API
2=========================================
3
4This page describes the change related REST endpoints.
5Please also take note of the general information on the
6link:rest-api.html[REST API].
7
Edwin Kempin1dbe19e2013-02-22 16:18:58 +01008[[change-endpoints]]
9Change Endpoints
10----------------
Edwin Kempind0a63922013-01-23 16:32:59 +010011
Edwin Kempin76202742013-02-15 13:51:50 +010012[[list-changes]]
Edwin Kempin82d30372013-02-04 08:49:34 +010013GET /changes/ (Query Changes)
14~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Edwin Kempind0a63922013-01-23 16:32:59 +010015Queries changes visible to the caller. The query string must be
16provided by the `q` parameter. The `n` parameter can be used to limit
17the returned results.
18
Edwin Kempine3446292013-02-19 16:40:14 +010019As result a list of link:#change-info[ChangeInfo] entries is returned.
20The change output is sorted by the last update time, most recently
21updated to oldest updated.
22
Edwin Kempind0a63922013-01-23 16:32:59 +010023Query for open changes of watched projects:
Edwin Kempin37440832013-02-06 11:36:00 +010024
25.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010026----
Edwin Kempin2091edb2013-01-23 19:07:38 +010027 GET /changes/?q=status:open+is:watched&n=2 HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +010028----
Edwin Kempind0a63922013-01-23 16:32:59 +010029
Edwin Kempin37440832013-02-06 11:36:00 +010030.Response
31----
Edwin Kempind0a63922013-01-23 16:32:59 +010032 HTTP/1.1 200 OK
33 Content-Disposition: attachment
34 Content-Type: application/json;charset=UTF-8
35
36 )]}'
37 {
38 "kind": "gerritcodereview#change",
39 "id": "demo~master~Idaf5e098d70898b7119f6f4af5a6c13343d64b57",
40 "project": "demo",
41 "branch": "master",
42 "change_id": "Idaf5e098d70898b7119f6f4af5a6c13343d64b57",
43 "subject": "One change",
44 "status": "NEW",
45 "created": "2012-07-17 07:18:30.854000000",
46 "updated": "2012-07-17 07:19:27.766000000",
47 "reviewed": true,
Edwin Kempindb1f0b82013-02-21 15:07:00 +010048 "mergeable": true,
Edwin Kempind0a63922013-01-23 16:32:59 +010049 "_sortkey": "001e7057000006dc",
50 "_number": 1756,
51 "owner": {
52 "name": "John Doe"
53 },
54 },
55 {
56 "kind": "gerritcodereview#change",
57 "id": "demo~master~I09c8041b5867d5b33170316e2abc34b79bbb8501",
58 "project": "demo",
59 "branch": "master",
60 "change_id": "I09c8041b5867d5b33170316e2abc34b79bbb8501",
61 "subject": "Another change",
62 "status": "NEW",
63 "created": "2012-07-17 07:18:30.884000000",
64 "updated": "2012-07-17 07:18:30.885000000",
Edwin Kempindb1f0b82013-02-21 15:07:00 +010065 "mergeable": true,
Edwin Kempind0a63922013-01-23 16:32:59 +010066 "_sortkey": "001e7056000006dd",
67 "_number": 1757,
68 "owner": {
69 "name": "John Doe"
70 },
71 "_more_changes": true
72 }
73----
74
Edwin Kempind0a63922013-01-23 16:32:59 +010075If the `n` query parameter is supplied and additional changes exist
76that match the query beyond the end, the last change object has a
77`_more_changes: true` JSON field set. Callers can resume a query with
Christian Aistleitner55364012013-02-17 12:18:22 +010078the `N` query parameter, supplying the last change's `_sortkey` field
79as the value. When going in the reverse direction with the `P` query
Edwin Kempind0a63922013-01-23 16:32:59 +010080parameter a `_more_changes: true` is put in the first change object if
81there are results *before* the first change returned.
82
83Clients are allowed to specify more than one query by setting the `q`
84parameter multiple times. In this case the result is an array of
85arrays, one per query in the same order the queries were given in.
86
Edwin Kempina64c4b92013-01-23 11:30:40 +010087.Query for the 25 most recent open changes of the projects that you watch
88****
89get::/changes/?q=status:open+is:watched&n=25
90****
91
Edwin Kempind0a63922013-01-23 16:32:59 +010092Query that retrieves changes for a user's dashboard:
Edwin Kempin37440832013-02-06 11:36:00 +010093
94.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010095----
96 GET /changes/?q=is:open+owner:self&q=is:open+reviewer:self+-owner:self&q=is:closed+owner:self+limit:5&o=LABELS HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +010097----
Edwin Kempind0a63922013-01-23 16:32:59 +010098
Edwin Kempin37440832013-02-06 11:36:00 +010099.Response
100----
Edwin Kempind0a63922013-01-23 16:32:59 +0100101 HTTP/1.1 200 OK
102 Content-Disposition: attachment
103 Content-Type: application/json;charset=UTF-8
104
105 )]}'
106 [
107 [
108 {
109 "kind": "gerritcodereview#change",
110 "id": "demo~master~Idaf5e098d70898b7119f6f4af5a6c13343d64b57",
111 "project": "demo",
112 "branch": "master",
113 "change_id": "Idaf5e098d70898b7119f6f4af5a6c13343d64b57",
114 "subject": "One change",
115 "status": "NEW",
116 "created": "2012-07-17 07:18:30.854000000",
117 "updated": "2012-07-17 07:19:27.766000000",
118 "reviewed": true,
Edwin Kempindb1f0b82013-02-21 15:07:00 +0100119 "mergeable": true,
Edwin Kempind0a63922013-01-23 16:32:59 +0100120 "_sortkey": "001e7057000006dc",
121 "_number": 1756,
122 "owner": {
123 "name": "John Doe"
124 },
125 "labels": {
126 "Verified": {},
127 "Code-Review": {}
128 }
129 }
130 ],
131 [],
132 []
133 ]
134----
135
Edwin Kempina64c4b92013-01-23 11:30:40 +0100136.Query the changes for your user dashboard
137****
138get::/changes/?q=is:open+owner:self&q=is:open+reviewer:self+-owner:self&q=is:closed+owner:self+limit:5&o=LABELS
139****
140
Edwin Kempind0a63922013-01-23 16:32:59 +0100141Additional fields can be obtained by adding `o` parameters, each
142option requires more database lookups and slows down the query
143response time to the client so they are generally disabled by
144default. Optional fields are:
145
Edwin Kempine3446292013-02-19 16:40:14 +0100146[[labels]]
147--
Edwin Kempind0a63922013-01-23 16:32:59 +0100148* `LABELS`: a summary of each label required for submit, and
149 approvers that have granted (or rejected) with that label.
Edwin Kempine3446292013-02-19 16:40:14 +0100150--
Edwin Kempind0a63922013-01-23 16:32:59 +0100151
Edwin Kempine3446292013-02-19 16:40:14 +0100152[[detailed-labels]]
153--
Dave Borowitz4c7231a2013-01-30 16:18:59 -0800154* `DETAILED_LABELS`: detailed label information, including numeric
Dave Borowitz992ddd72013-02-13 11:53:17 -0800155 values of all existing approvals, recognized label values, values
156 permitted to be set by the current user, and reviewers that may be
157 removed by the current user.
Edwin Kempine3446292013-02-19 16:40:14 +0100158--
Dave Borowitz4c7231a2013-01-30 16:18:59 -0800159
Edwin Kempine3446292013-02-19 16:40:14 +0100160[[current-revision]]
161--
Edwin Kempind0a63922013-01-23 16:32:59 +0100162* `CURRENT_REVISION`: describe the current revision (patch set)
163 of the change, including the commit SHA-1 and URLs to fetch from.
Edwin Kempine3446292013-02-19 16:40:14 +0100164--
Edwin Kempind0a63922013-01-23 16:32:59 +0100165
Edwin Kempine3446292013-02-19 16:40:14 +0100166[[all-revisions]]
167--
Edwin Kempind0a63922013-01-23 16:32:59 +0100168* `ALL_REVISIONS`: describe all revisions, not just current.
Edwin Kempine3446292013-02-19 16:40:14 +0100169--
Edwin Kempind0a63922013-01-23 16:32:59 +0100170
Edwin Kempine3446292013-02-19 16:40:14 +0100171[[current-commit]]
172--
Edwin Kempind0a63922013-01-23 16:32:59 +0100173* `CURRENT_COMMIT`: parse and output all header fields from the
174 commit object, including message. Only valid when the current
175 revision or all revisions are selected.
Edwin Kempine3446292013-02-19 16:40:14 +0100176--
Edwin Kempind0a63922013-01-23 16:32:59 +0100177
Edwin Kempine3446292013-02-19 16:40:14 +0100178[[all-commits]]
179--
Edwin Kempind0a63922013-01-23 16:32:59 +0100180* `ALL_COMMITS`: parse and output all header fields from the
181 output revisions. If only `CURRENT_REVISION` was requested
182 then only the current revision's commit data will be output.
Edwin Kempine3446292013-02-19 16:40:14 +0100183--
Edwin Kempind0a63922013-01-23 16:32:59 +0100184
Edwin Kempine3446292013-02-19 16:40:14 +0100185[[current-files]]
186--
Edwin Kempind0a63922013-01-23 16:32:59 +0100187* `CURRENT_FILES`: list files modified by the commit, including
188 basic line counts inserted/deleted per file. Only valid when
189 the current revision or all revisions are selected.
Edwin Kempine3446292013-02-19 16:40:14 +0100190--
Edwin Kempind0a63922013-01-23 16:32:59 +0100191
Edwin Kempine3446292013-02-19 16:40:14 +0100192[[all-files]]
193--
Edwin Kempind0a63922013-01-23 16:32:59 +0100194* `ALL_FILES`: list files modified by the commit, including
195 basic line counts inserted/deleted per file. If only the
196 `CURRENT_REVISION` was requested the only that commit's
197 modified files will be output.
Edwin Kempine3446292013-02-19 16:40:14 +0100198--
Edwin Kempind0a63922013-01-23 16:32:59 +0100199
Edwin Kempine3446292013-02-19 16:40:14 +0100200[[detailed-accounts]]
201--
Dave Borowitz8926a882013-02-01 14:32:48 -0800202* `DETAILED_ACCOUNTS`: include `_account_id` and `email` fields when
203 referencing accounts.
Edwin Kempine3446292013-02-19 16:40:14 +0100204--
Dave Borowitz8926a882013-02-01 14:32:48 -0800205
Edwin Kempin37440832013-02-06 11:36:00 +0100206.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100207----
208 GET /changes/?q=97&o=CURRENT_REVISION&o=CURRENT_COMMIT&o=CURRENT_FILES HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100209----
Edwin Kempind0a63922013-01-23 16:32:59 +0100210
Edwin Kempin37440832013-02-06 11:36:00 +0100211.Response
212----
Edwin Kempind0a63922013-01-23 16:32:59 +0100213 HTTP/1.1 200 OK
214 Content-Disposition: attachment
215 Content-Type: application/json;charset=UTF-8
216
217 )]}'
218 [
219 {
220 "kind": "gerritcodereview#change",
221 "id": "demo~master~I7ea46d2e2ee5c64c0d807677859cfb7d90b8966a",
222 "project": "gerrit",
223 "branch": "master",
224 "change_id": "I7ea46d2e2ee5c64c0d807677859cfb7d90b8966a",
225 "subject": "Use an EventBus to manage star icons",
226 "status": "NEW",
227 "created": "2012-04-25 00:52:25.580000000",
228 "updated": "2012-04-25 00:52:25.586000000",
Edwin Kempindb1f0b82013-02-21 15:07:00 +0100229 "mergeable": true,
Edwin Kempind0a63922013-01-23 16:32:59 +0100230 "_sortkey": "001c9bf400000061",
231 "_number": 97,
232 "owner": {
233 "name": "Shawn Pearce"
234 },
235 "current_revision": "184ebe53805e102605d11f6b143486d15c23a09c",
236 "revisions": {
237 "184ebe53805e102605d11f6b143486d15c23a09c": {
238 "_number": 1,
239 "fetch": {
240 "git": {
241 "url": "git://localhost/gerrit",
242 "ref": "refs/changes/97/97/1"
243 },
244 "http": {
245 "url": "http://127.0.0.1:8080/gerrit",
246 "ref": "refs/changes/97/97/1"
247 }
248 },
249 "commit": {
250 "parents": [
251 {
252 "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646",
253 "subject": "Migrate contributor agreements to All-Projects."
254 }
255 ],
256 "author": {
257 "name": "Shawn O. Pearce",
258 "email": "sop@google.com",
259 "date": "2012-04-24 18:08:08.000000000",
260 "tz": -420
261 },
262 "committer": {
263 "name": "Shawn O. Pearce",
264 "email": "sop@google.com",
265 "date": "2012-04-24 18:08:08.000000000",
266 "tz": -420
267 },
268 "subject": "Use an EventBus to manage star icons",
269 "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..."
270 },
271 "files": {
272 "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeCache.java": {
273 "lines_deleted": 8
274 },
275 "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeDetailCache.java": {
276 "lines_inserted": 1
277 },
278 "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeScreen.java": {
279 "lines_inserted": 11,
280 "lines_deleted": 19
281 },
282 "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable.java": {
283 "lines_inserted": 23,
284 "lines_deleted": 20
285 },
286 "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/StarCache.java": {
287 "status": "D",
288 "lines_deleted": 139
289 },
290 "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/StarredChanges.java": {
291 "status": "A",
292 "lines_inserted": 204
293 },
294 "gerrit-gwtui/src/main/java/com/google/gerrit/client/ui/Screen.java": {
295 "lines_deleted": 9
296 }
297 }
298 }
299 }
300 }
301 ]
302----
303
Edwin Kempinff9e6e32013-02-21 13:07:11 +0100304[[get-change]]
305GET /changes/\{change-id\} (Get Change)
306~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
307Retrieves a change.
308
309.Request
310----
311 GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0
312----
313
314As response a link:#change-info[ChangeInfo] entity is returned that
315describes the change.
316
317.Response
318----
319 HTTP/1.1 200 OK
320 Content-Disposition: attachment
321 Content-Type: application/json;charset=UTF-8
322
323 )]}'
324 {
325 "kind": "gerritcodereview#change",
326 "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
327 "project": "myProject",
328 "branch": "master",
329 "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
330 "subject": "Implementing Feature X",
331 "status": "NEW",
332 "created": "2013-02-01 09:59:32.126000000",
333 "updated": "2013-02-21 11:16:36.775000000",
334 "reviewed": true,
335 "mergeable": true,
336 "_sortkey": "0023412400000f7d",
337 "_number": 3965,
338 "owner": {
339 "name": "John Doe"
340 }
341 }
342----
343
Edwin Kempin8e492202013-02-21 15:38:25 +0100344[[get-change-detail]]
345GET /changes/\{change-id\}/detail (Get Change Detail)
346~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
347Retrieves a change with link:#labels[labels], link:#detailed-labels[
348detailed labels] and link:#detailed-accounts[detailed accounts].
349
350.Request
351----
352 GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/detail HTTP/1.0
353----
354
355As response a link:#change-info[ChangeInfo] entity is returned that
356describes the change.
357
358.Response
359----
360 HTTP/1.1 200 OK
361 Content-Disposition: attachment
362 Content-Type: application/json;charset=UTF-8
363
364 )]}'
365 {
366 "kind": "gerritcodereview#change",
367 "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
368 "project": "myProject",
369 "branch": "master",
370 "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
371 "subject": "Implementing Feature X",
372 "status": "NEW",
373 "created": "2013-02-01 09:59:32.126000000",
374 "updated": "2013-02-21 11:16:36.775000000",
375 "reviewed": true,
376 "mergeable": true,
377 "_sortkey": "0023412400000f7d",
378 "_number": 3965,
379 "owner": {
380 "_account_id": 1000096,
381 "name": "John Doe",
382 "email": "john.doe@example.com"
383 },
384 "labels": {
385 "Verified": {
386 "all": [
387 {
388 "value": 0,
389 "_account_id": 1000096,
390 "name": "John Doe",
391 "email": "john.doe@example.com"
392 },
393 {
394 "value": 0,
395 "_account_id": 1000097,
396 "name": "Jane Roe",
397 "email": "jane.roe@example.com"
398 }
399 ],
400 "values": {
401 "-1": "Fails",
402 " 0": "No score",
403 "+1": "Verified"
404 }
405 },
406 "Code-Review": {
407 "recommended": {
408 "_account_id": 1000097,
409 "name": "Jane Roe",
410 "email": "jane.roe@example.com"
411 },
412 "disliked": {
413 "_account_id": 1000096,
414 "name": "John Doe",
415 "email": "john.doe@example.com"
416 },
417 "all": [
418 {
419 "value": -1,
420 "_account_id": 1000096,
421 "name": "John Doe",
422 "email": "john.doe@example.com"
423 },
424 {
425 "value": 1,
426 "_account_id": 1000097,
427 "name": "Jane Roe",
428 "email": "jane.roe@example.com"
429 }
430 ]
431 "values": {
432 "-2": "Do not submit",
433 "-1": "I would prefer that you didn\u0027t submit this",
434 " 0": "No score",
435 "+1": "Looks good to me, but someone else must approve",
436 "+2": "Looks good to me, approved"
437 }
438 }
439 },
440 "permitted_labels": {
441 "Verified": [
442 "-1",
443 " 0",
444 "+1"
445 ],
446 "Code-Review": [
447 "-2",
448 "-1",
449 " 0",
450 "+1",
451 "+2"
452 ]
453 },
454 "removable_reviewers": [
455 {
456 "_account_id": 1000096,
457 "name": "John Doe",
458 "email": "john.doe@example.com"
459 },
460 {
461 "_account_id": 1000097,
462 "name": "Jane Roe",
463 "email": "jane.roe@example.com"
464 }
465 ]
466 }
467----
468
Edwin Kempin64006bb2013-02-22 08:17:04 +0100469[[get-topic]]
470GET /changes/\{change-id\}/topic (Get Topic)
471~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
472Retrieves the topic of a change.
473
474.Request
475----
476 GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topic HTTP/1.0
477----
478
479.Response
480----
481 HTTP/1.1 200 OK
482 Content-Disposition: attachment
483 Content-Type: application/json;charset=UTF-8
484
485 )]}'
486 "Documentation"
487----
488
489If the change does not have a topic an empty string is returned.
490
491[[set-topic]]
492PUT /changes/\{change-id\}/topic (Set Topic)
493~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
494Sets the topic of a change.
495
496The new topic must be provided in the request body inside a
497link:#topic-input[TopicInput] entity.
498
499.Request
500----
501 PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topic HTTP/1.0
502 Content-Type: application/json;charset=UTF-8
503
504 {
505 "topic": "Documentation"
506 }
507----
508
509As response the new topic is returned.
510
511.Response
512----
513 HTTP/1.1 200 OK
514 Content-Disposition: attachment
515 Content-Type: application/json;charset=UTF-8
516
517 )]}'
518 "Documentation"
519----
520
521If the topic was deleted the response is "`204 No Content`".
522
523[[delete-topic]]
524DELETE /changes/\{change-id\}/topic (Delete Topic)
525~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
526Deletes the topic of a change.
527
528The request body does not need to include a link:#topic-input[
529TopicInput] entity if no review comment is added.
530
531Please note that some proxies prohibit request bodies for DELETE
532requests. In this case, if you want to specify a commit message, use
533link:#set-topic[PUT] to delete the topic.
534
535.Request
536----
537 DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topic HTTP/1.0
538----
539
540.Response
541----
542 HTTP/1.1 204 No Content
543----
544
Edwin Kempined5364b2013-02-22 10:39:33 +0100545[[abandon-change]]
546POST /changes/\{change-id\}/abandon (Abandon Change)
547~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
548Abandons a change.
549
550The request body does not need to include a link:#abandon-input[
551AbandonInput] entity if no review comment is added.
552
553.Request
554----
555 POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/abandon HTTP/1.0
556----
557
558As response a link:#change-info[ChangeInfo] entity is returned that
559describes the abandoned change.
560
561.Response
562----
563 HTTP/1.1 200 OK
564 Content-Disposition: attachment
565 Content-Type: application/json;charset=UTF-8
566
567 )]}'
568 {
569 "kind": "gerritcodereview#change",
570 "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
571 "project": "myProject",
572 "branch": "master",
573 "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
574 "subject": "Implementing Feature X",
575 "status": "ABANDONED",
576 "created": "2013-02-01 09:59:32.126000000",
577 "updated": "2013-02-21 11:16:36.775000000",
578 "reviewed": true,
579 "mergeable": true,
580 "_sortkey": "0023412400000f7d",
581 "_number": 3965,
582 "owner": {
583 "name": "John Doe"
584 }
585 }
586----
587
588If the change cannot be abandoned because the change state doesn't
589allow abandoning of the change, the response is "`409 Conflict`" and
590the error message is contained in the response body.
591
592.Response
593----
594 HTTP/1.1 409 Conflict
595 Content-Disposition: attachment
596 Content-Type: text/plain;charset=UTF-8
597
598 change is merged
599----
600
601[[restore-change]]
602POST /changes/\{change-id\}/restore (Restore Change)
603~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
604Restores a change.
605
606The request body does not need to include a link:#restore-input[
607RestoreInput] entity if no review comment is added.
608
609.Request
610----
611 POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/restore HTTP/1.0
612----
613
614As response a link:#change-info[ChangeInfo] entity is returned that
615describes the restored change.
616
617.Response
618----
619 HTTP/1.1 200 OK
620 Content-Disposition: attachment
621 Content-Type: application/json;charset=UTF-8
622
623 )]}'
624 {
625 "kind": "gerritcodereview#change",
626 "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
627 "project": "myProject",
628 "branch": "master",
629 "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
630 "subject": "Implementing Feature X",
631 "status": "NEW",
632 "created": "2013-02-01 09:59:32.126000000",
633 "updated": "2013-02-21 11:16:36.775000000",
634 "reviewed": true,
635 "mergeable": true,
636 "_sortkey": "0023412400000f7d",
637 "_number": 3965,
638 "owner": {
639 "name": "John Doe"
640 }
641 }
642----
643
644If the change cannot be restored because the change state doesn't
645allow restoring the change, the response is "`409 Conflict`" and
646the error message is contained in the response body.
647
648.Response
649----
650 HTTP/1.1 409 Conflict
651 Content-Disposition: attachment
652 Content-Type: text/plain;charset=UTF-8
653
654 change is new
655----
656
Edwin Kempind2ec4152013-02-22 12:17:19 +0100657[[revert-change]]
658POST /changes/\{change-id\}/revert (Revert Change)
659~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
660Reverts a change.
661
662The request body does not need to include a link:#revert-input[
663RevertInput] entity if no review comment is added.
664
665.Request
666----
667 POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revert HTTP/1.0
668----
669
670As response a link:#change-info[ChangeInfo] entity is returned that
671describes the reverting change.
672
673.Response
674----
675 HTTP/1.1 200 OK
676 Content-Disposition: attachment
677 Content-Type: application/json;charset=UTF-8
678
679 )]}'
680 {
681 "kind": "gerritcodereview#change",
682 "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
683 "project": "myProject",
684 "branch": "master",
685 "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
686 "subject": "Revert \"Implementing Feature X\"",
687 "status": "NEW",
688 "created": "2013-02-01 09:59:32.126000000",
689 "updated": "2013-02-21 11:16:36.775000000",
690 "reviewed": true,
691 "mergeable": true,
692 "_sortkey": "0023412400000f7d",
693 "_number": 3965,
694 "owner": {
695 "name": "John Doe"
696 }
697 }
698----
699
700If the change cannot be reverted because the change state doesn't
701allow reverting the change, the response is "`409 Conflict`" and
702the error message is contained in the response body.
703
704.Response
705----
706 HTTP/1.1 409 Conflict
707 Content-Disposition: attachment
708 Content-Type: text/plain;charset=UTF-8
709
710 change is new
711----
712
Edwin Kempin0eddba02013-02-22 15:30:12 +0100713[[submit-change]]
714POST /changes/\{change-id\}/submit (Submit Change)
715~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
716Submits a change.
717
718The request body only needs to include a link:#submit-input[
719SubmitInput] entity if the request should wait for the merge to
720complete.
721
722.Request
723----
724 POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/submit HTTP/1.0
725 Content-Type: application/json;charset=UTF-8
726
727 {
728 "wait_for_merge": true
729 }
730----
731
732As response a link:#change-info[ChangeInfo] entity is returned that
733describes the submitted/merged change.
734
735.Response
736----
737 HTTP/1.1 200 OK
738 Content-Disposition: attachment
739 Content-Type: application/json;charset=UTF-8
740
741 )]}'
742 {
743 "kind": "gerritcodereview#change",
744 "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
745 "project": "myProject",
746 "branch": "master",
747 "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
748 "subject": "Implementing Feature X",
749 "status": "MERGED",
750 "created": "2013-02-01 09:59:32.126000000",
751 "updated": "2013-02-21 11:16:36.775000000",
752 "reviewed": true,
753 "mergeable": true,
754 "_sortkey": "0023412400000f7d",
755 "_number": 3965,
756 "owner": {
757 "name": "John Doe"
758 }
759 }
760----
761
762If the change cannot be submitted because the submit rule doesn't allow
763submitting the change, the response is "`409 Conflict`" and the error
764message is contained in the response body.
765
766.Response
767----
768 HTTP/1.1 409 Conflict
769 Content-Disposition: attachment
770 Content-Type: text/plain;charset=UTF-8
771
772 blocked by Verified
773----
774
Edwin Kempin1dbe19e2013-02-22 16:18:58 +0100775[[reviewer-endpoints]]
776Reviewer Endpoints
777------------------
778
779[[list-reviewers]]
780GET /changes/\{change-id\}/reviewers/ (List Reviewers)
781~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
782Lists the reviewers of a change.
783
784As result a list of link:#reviewer-info[ReviewerInfo] entries is returned.
785
786.Request
787----
788 GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/ HTTP/1.0
789----
790
791.Response
792----
793 HTTP/1.1 200 OK
794 Content-Disposition: attachment
795 Content-Type: application/json;charset=UTF-8
796
797 )]}'
798 [
799 {
800 "kind": "gerritcodereview#reviewer",
801 "approvals": {
802 "Verified": "+1",
803 "Code-Review": "+2"
804 },
805 "_account_id": 1000096,
806 "name": "John Doe",
807 "email": "john.doe@example.com"
808 },
809 {
810 "kind": "gerritcodereview#reviewer",
811 "approvals": {
812 "Verified": " 0",
813 "Code-Review": "-1"
814 },
815 "_account_id": 1000097,
816 "name": "Jane Roe",
817 "email": "jane.roe@example.com"
818 }
819 ]
820----
821
Edwin Kempina3d02ef2013-02-22 16:31:53 +0100822[[get-reviewer]]
823GET /changes/\{change-id\}/reviewers/\{account-id\} (Get Reviewer)
824~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
825Retrieves a reviewer of a change.
826
827As response a link:#reviewer-info[ReviewerInfo] entity is returned that
828describes the reviewer.
829
830.Request
831----
832 GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/john.doe@example.com HTTP/1.0
833----
834
835.Response
836----
837 HTTP/1.1 200 OK
838 Content-Disposition: attachment
839 Content-Type: application/json;charset=UTF-8
840
841 )]}'
842 {
843 "kind": "gerritcodereview#reviewer",
844 "approvals": {
845 "Verified": "+1",
846 "Code-Review": "+2"
847 },
848 "_account_id": 1000096,
849 "name": "John Doe",
850 "email": "john.doe@example.com"
851 }
852----
853
Edwin Kempin392328e2013-02-25 12:50:03 +0100854[[add-reviewer]]
855POST /changes/\{change-id\}/reviewers (Add Reviewer)
856~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
857Adds one user or all members of one group as reviewer to the change.
858
859The reviewer to be added to the change must be provided in the request
860body as a link:#reviewer-input[ReviewerInput] entity.
861
862.Request
863----
864 POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0
865 Content-Type: application/json;charset=UTF-8
866
867 {
868 "reviewer": "john.doe@example.com"
869 }
870----
871
872As response an link:#add-reviewer-result[AddReviewerResult] entity is
873returned that describes the newly added reviewers.
874
875.Response
876----
877 HTTP/1.1 200 OK
878 Content-Disposition: attachment
879 Content-Type: application/json;charset=UTF-8
880
881 )]}'
882 {
883 "reviewers": [
884 {
885 "kind": "gerritcodereview#reviewer",
886 "approvals": {
887 "Verified": " 0",
888 "Code-Review": " 0"
889 },
890 "_account_id": 1000096,
891 "name": "John Doe",
892 "email": "john.doe@example.com"
893 }
894 ]
895 }
896----
897
898If a group is specified, adding the group members as reviewers is an
899atomic operation. This means if an error is returned, none of the
900members are added as reviewer.
901
902If a group with many members is added as reviewer a confirmation may be
903required.
904
905.Request
906----
907 POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0
908 Content-Type: application/json;charset=UTF-8
909
910 {
911 "reviewer": "MyProjectVerifiers"
912 }
913----
914
915.Response
916----
917 HTTP/1.1 200 OK
918 Content-Disposition: attachment
919 Content-Type: application/json;charset=UTF-8
920
921 )]}'
922 {
923 "error": "The group My Group has 15 members. Do you want to add them all as reviewers?",
924 "confirm": true
925 }
926----
927
928To confirm the addition of the reviewers, resend the request with the
929`confirm` flag being set.
930
931.Request
932----
933 POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0
934 Content-Type: application/json;charset=UTF-8
935
936 {
937 "reviewer": "MyProjectVerifiers",
938 "confirm": true
939 }
940----
941
Edwin Kempin53301072013-02-25 12:57:07 +0100942[[delete-reviewer]]
943DELETE /changes/\{change-id\}/reviewers/\{account-id\} (Delete Reviewer)
944~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
945Deletes a reviewer from a change.
946
947.Request
948----
949 DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe HTTP/1.0
950----
951
952.Response
953----
954 HTTP/1.1 204 No Content
955----
956
Edwin Kempinff9e6e32013-02-21 13:07:11 +0100957
958[[ids]]
959IDs
960---
961
Edwin Kempina3d02ef2013-02-22 16:31:53 +0100962[[account-id]]
963link:rest-api-accounts.html#account-id[\{account-id\}]
964~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
965--
966--
967
Edwin Kempinff9e6e32013-02-21 13:07:11 +0100968[[change-id]]
969\{change-id\}
970~~~~~~~~~~~~~
971Identifier that uniquely identifies one change.
972
973This can be:
974
975* an ID of the change in the format "'$$<project>~<branch>~<Change-Id>$$'",
976 where for the branch the `refs/heads/` prefix can be omitted
977 ("$$myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940$$")
978* a Change-Id if it uniquely identifies one change
979 ("I8473b95934b5732ac55d26311a706c9c2bde9940")
980* a legacy numeric change ID ("4247")
981
982
Edwin Kempine3446292013-02-19 16:40:14 +0100983[[json-entities]]
984JSON Entities
985-------------
986
Edwin Kempined5364b2013-02-22 10:39:33 +0100987[[abandon-input]]
988AbandonInput
989~~~~~~~~~~~~
990The `AbandonInput` entity contains information for abandoning a change.
991
992[options="header",width="50%",cols="1,^1,5"]
993|===========================
994|Field Name ||Description
995|`message` |optional|
996Message to be added as review comment to the change when abandoning the
997change.
998|===========================
999
Edwin Kempine3446292013-02-19 16:40:14 +01001000[[account-info]]
1001AccountInfo
1002~~~~~~~~~~~
1003The `AccountInfo` entity contains information about an account.
1004
1005[options="header",width="50%",cols="1,^1,5"]
1006|===========================
1007|Field Name ||Description
1008|`_account_id` ||The numeric ID of the account.
1009|`name` |optional|The full name of the user. +
1010Only set if link:#detailed-accounts[detailed account information] is
1011requested.
1012|`email` |optional|
1013The email address the user prefers to be contacted through. +
1014Only set if link:#detailed-accounts[detailed account information] is
1015requested.
1016|===========================
1017
Edwin Kempin392328e2013-02-25 12:50:03 +01001018[[add-reviewer-result]]
1019AddReviewerResult
1020~~~~~~~~~~~~~~~~~
1021The `AddReviewerResult` entity describes the result of adding a
1022reviewer to a change.
1023
1024[options="header",width="50%",cols="1,^1,5"]
1025|===========================
1026|Field Name ||Description
1027|`reviewers` |optional|
1028The newly added reviewers as a list of link:#reviewer-info[
1029ReviewerInfo] entities.
1030|`error` |optional|
1031Error message explaining why the reviewer could not be added. +
1032If a group was specified in the input and an error is returned, it
1033means that none of the members were added as reviewer.
1034|`confirm` |`false` if not set|
1035Whether adding the reviewer requires confirmation.
1036|===========================
1037
Edwin Kempine3446292013-02-19 16:40:14 +01001038[[approval-info]]
1039ApprovalInfo
1040~~~~~~~~~~~~
1041The `ApprovalInfo` entity contains information about an approval from a
1042user for a label on a change.
1043
1044`ApprovalInfo` has the same fields as link:#account-info[AccountInfo].
1045In addition `ApprovalInfo` has the following fields:
1046
1047[options="header",width="50%",cols="1,^1,5"]
1048|===========================
1049|Field Name ||Description
1050|`value` ||The vote that the user has given for the label.
1051|===========================
1052
1053[[change-info]]
1054ChangeInfo
1055~~~~~~~~~~
1056The `ChangeInfo` entity contains information about a change.
1057
1058[options="header",width="50%",cols="1,^1,5"]
1059|==================================
1060|Field Name ||Description
1061|`kind` ||`gerritcodereview#change`
1062|`id` ||
1063The ID of the change in the format "'<project>\~<branch>~<Change-Id>'",
1064where project, branch and Change-Id are URL encoded. For branch the
1065`refs/heads/` prefix is omitted.
1066|`project` ||The name of the project.
1067|`branch` ||
1068The name of the target branch. +
1069The `refs/heads/` prefix is omitted.
Edwin Kempincd6c01a12013-02-21 14:58:52 +01001070|`topic` |optional|The topic to which this change belongs.
Edwin Kempine3446292013-02-19 16:40:14 +01001071|`change_id` ||The Change-Id of the change.
1072|`subject` ||
1073The subject of the change (header line of the commit message).
1074|`status` ||
1075The status of the change (`NEW`, `SUBMITTED`, `MERGED`, `ABANDONED`,
1076`DRAFT`).
1077|`created` ||
1078The link:rest-api.html#timestamp[timestamp] of when the change was
1079created.
1080|`updated` ||
1081The link:rest-api.html#timestamp[timestamp] of when the change was last
1082updated.
1083|`starred` |not set if `false`|
1084Whether the calling user has starred this change.
1085|`reviewed` |not set if `false`|
1086Whether the change was reviewed by the calling user.
1087|`mergeable` ||Whether the change is mergeable.
1088|`_sortkey` ||The sortkey of the change.
1089|`_number` ||The legacy numeric ID of the change.
1090|`owner` ||
1091The owner of the change as an link:#account-info[AccountInfo] entity.
1092|`labels` |optional|
1093The labels of the change as a map that maps the label names to
1094link:#label-info[LabelInfo] entries. +
1095Only set if link:#labels[labels] or link:#detailed-labels[detailed
1096labels] are requested.
1097|`permitted_labels` |optional|
1098A map of the permitted labels that maps a label name to the list of
1099values that are allowed for that label. +
1100Only set if link:#detailed-labels[detailed labels] are requested.
1101|`removable_reviewers`|optional|
1102The reviewers that can be removed by the calling user as a list of
1103link:#account-info[AccountInfo] entities. +
1104Only set if link:#detailed-labels[detailed labels] are requested.
1105|`current_revision` |optional|
1106The commit ID of the current patch set of this change. +
1107Only set if link:#current-revision[the current revision] is requested
1108or if link:#all-revisions[all revisions] are requested.
1109|`revisions` |optional|
1110All patch sets of this changes as a map that maps the commit ID of the
1111patch set to a link:#revision-info[RevisionInfo] entity. +
1112Only set if link:#all-revisions[all revisions] are requested.
1113|`_more_changes` |optional, not set if `false`|
1114Whether the query would deliver more results if not limited. +
1115Only set on either the last or the first change that is returned.
1116|==================================
1117
1118[[commit-info]]
1119CommitInfo
1120~~~~~~~~~~
1121The `CommitInfo` entity contains information about a commit.
1122
1123[options="header",width="50%",cols="1,6"]
1124|==========================
1125|Field Name |Description
1126|`commit` |The commit ID.
1127|`parent` |
1128The parent commits of this commit as a list of
1129link:#commit-info[CommitInfo] entities.
1130|`author` |The author of the commit as a
1131link:#git-person-info[GitPersonInfo] entity.
1132|`committer` |The committer of the commit as a
1133link:#git-person-info[GitPersonInfo] entity.
1134|`subject` |
1135The subject of the commit (header line of the commit message).
1136|`message` |The commit message.
1137|==========================
1138
1139[[fetch-info]]
1140FetchInfo
1141~~~~~~~~~
1142The `FetchInfo` entity contains information about how to fetch a patch
1143set via a certain protocol.
1144
1145[options="header",width="50%",cols="1,6"]
1146|==========================
1147|Field Name |Description
1148|`url` |The URL of the project.
1149|`ref` |The ref of the patch set.
1150|==========================
1151
1152[[file-info]]
1153FileInfo
1154~~~~~~~~
1155The `FileInfo` entity contains information about a file in a patch set.
1156
1157[options="header",width="50%",cols="1,^1,5"]
1158|=============================
1159|Field Name ||Description
1160|`status` |optional|
1161The status of the file ("`A`"=Added, "`D`"=Deleted, "`R`"=Renamed,
1162"`C`"=Copied, "`W`"=Rewritten). +
1163Not set if the file was Modified ("`M`").
1164|`binary` |not set if `false`|Whether the file is binary.
1165|`old_path` |optional|
1166The old file path. +
1167Only set if file was renamed or copied.
1168|`lines_inserted`|optional|
1169Number of inserted lines. +
1170Not set for binary files or if no lines were inserted.
1171|`lines_deleted` |optional|
1172Number of deleted lines. +
1173Not set for binary files or if no lines were deleted.
1174|=============================
1175
1176[[git-person-info]]
1177GitPersonInfo
1178~~~~~~~~~~~~~
1179The `GitPersonInfo` entity contains information about the
1180author/committer of a commit.
1181
1182[options="header",width="50%",cols="1,6"]
1183|==========================
1184|Field Name |Description
1185|`name` |The name of the author/committer.
1186|`email` |The email address of the author/committer.
1187|`date` |The link:rest-api.html#timestamp[timestamp] of when
1188this identity was constructed.
1189|`tz` |The timezone offset from UTC of when this identity was
1190constructed.
1191|==========================
1192
1193[[label-info]]
1194LabelInfo
1195~~~~~~~~~
1196The `LabelInfo` entity contains information about a label on a change.
1197
1198[options="header",width="50%",cols="1,^1,5"]
1199|===========================
1200|Field Name ||Description
1201|`approved` |optional|The user who approved this label on the change
1202as a link:#account-info[AccountInfo] entity. +
1203Only set if link:#labels[labels] are requested.
1204|`rejected` |optional|The user who rejected this label on the change
1205as a link:#account-info[AccountInfo] entity. +
1206Only set if link:#labels[labels] are requested.
1207|`recommended` |optional|The user who recommended this label on the
1208change as a link:#account-info[AccountInfo] entity. +
1209Only set if link:#labels[labels] are requested.
1210|`disliked` |optional|The user who disliked this label on the change
1211as a link:#account-info[AccountInfo] entity. +
1212Only set if link:#labels[labels] are requested.
1213|`value` |optional|The voting value of the user who
1214recommended/disliked this label on the change if it is not
1215"`+1`"/"`-1`". +
1216Only set if link:#labels[labels] are requested.
1217|`optional` |not set if `false`|
1218Whether the label is optional. Optional means the label may be set, but
1219it's neither necessary for submission nor does it block submission if
1220set.
1221|`all` |optional|List of all approvals for this label as a list
1222of link:#approval-info[ApprovalInfo] entities. +
1223Only set if link:#detailed-labels[detailed labels] are requested.
1224|`values` |optional|A map of all values that are allowed for this
1225label. The map maps the values ("`-2`", "`-1`", " `0`", "`+1`", "`+2`")
1226to the value descriptions. +
1227Only set if link:#detailed-labels[detailed labels] are requested.
1228|===========================
1229
Edwin Kempined5364b2013-02-22 10:39:33 +01001230[[restore-input]]
1231RestoreInput
1232~~~~~~~~~~~~
1233The `RestoreInput` entity contains information for restoring a change.
1234
1235[options="header",width="50%",cols="1,^1,5"]
1236|===========================
1237|Field Name ||Description
1238|`message` |optional|
1239Message to be added as review comment to the change when restoring the
1240change.
1241|===========================
1242
Edwin Kempind2ec4152013-02-22 12:17:19 +01001243[[revert-input]]
1244RevertInput
1245~~~~~~~~~~~
1246The `RevertInput` entity contains information for reverting a change.
1247
1248[options="header",width="50%",cols="1,^1,5"]
1249|===========================
1250|Field Name ||Description
1251|`message` |optional|
1252Message to be added as review comment to the change when reverting the
1253change.
1254|===========================
1255
Edwin Kempin1dbe19e2013-02-22 16:18:58 +01001256[[reviewer-info]]
1257ReviewerInfo
1258~~~~~~~~~~~~
1259The `ReviewerInfo` entity contains information about a reviewer and its
1260votes on a change.
1261
1262`ReviewerInfo` has the same fields as link:#account-info[AccountInfo]
1263and includes link:#detailed-accounts[detailed account information].
1264In addition `ReviewerInfo` has the following fields:
1265
1266[options="header",width="50%",cols="1,6"]
1267|==========================
1268|Field Name |Description
1269|`kind` |`gerritcodereview#reviewer`
1270|`approvals` |
1271The approvals of the reviewer as a map that maps the label names to the
1272approval values ("`-2`", "`-1`", " `0`", "`+1`", "`+2`").
1273|==========================
1274
Edwin Kempin392328e2013-02-25 12:50:03 +01001275[[reviewer-input]]
1276ReviewerInput
1277~~~~~~~~~~~~~
1278The `ReviewerInput` entity contains information for adding a reviewer
1279to a change.
1280
1281[options="header",width="50%",cols="1,^1,5"]
1282|===========================
1283|Field Name ||Description
1284|`reviewer` ||
1285The link:rest-api-accounts.html#account-id[ID] of one account that
1286should be added as reviewer or the link:rest-api-groups.html#group-id[
1287ID] of one group for which all members should be added as reviewers. +
1288If an ID identifies both an account and a group, only the account is
1289added as reviewer to the change.
1290|`confirmed` |optional|
1291Whether adding the reviewer is confirmed. +
1292The Gerrit server may be configured to
1293link:config-gerrit.html#addreviewer.maxWithoutConfirmation[require a
1294confirmation] when adding a group as reviewer that has many members.
1295|===========================
1296
Edwin Kempine3446292013-02-19 16:40:14 +01001297[[revision-info]]
1298RevisionInfo
1299~~~~~~~~~~~~
1300The `RevisionInfo` entity contains information about a patch set.
1301
1302[options="header",width="50%",cols="1,^1,5"]
1303|===========================
1304|Field Name ||Description
1305|`draft` |not set if `false`|Whether the patch set is a draft.
1306|`_number` ||The patch set number.
1307|`fetch` ||
1308Information about how to fetch this patch set. The fetch information is
1309provided as a map that maps the protocol name ("`git`", "`http`",
1310"`ssh`") to link:#fetch-info[FetchInfo] entities.
1311|`commit` ||The commit of the patch set as
1312link:#commit-info[CommitInfo] entity.
1313|`files` ||
1314The files of the patch set as a map that maps the file names to
1315link:#file-info[FileInfo] entities.
1316|===========================
1317
Edwin Kempin0eddba02013-02-22 15:30:12 +01001318[[submit-input]]
1319SubmitInput
1320~~~~~~~~~~~
1321The `SubmitInput` entity contains information for submitting a change.
1322
1323[options="header",width="50%",cols="1,^1,5"]
1324|===========================
1325|Field Name ||Description
1326|`wait_for_merge`|`false` if not set|
1327Whether the request should wait for the merge to complete. +
1328If `false` the request returns immediately after the change has been
1329added to the merge queue and the caller can't know whether the change
1330could be merged successfully.
1331|===========================
1332
Edwin Kempin64006bb2013-02-22 08:17:04 +01001333[[topic-input]]
1334TopicInput
1335~~~~~~~~~~
1336The `TopicInput` entity contains information for setting a topic.
1337
1338[options="header",width="50%",cols="1,^1,5"]
1339|===========================
1340|Field Name ||Description
1341|`topic` |optional|The topic. +
1342The topic will be deleted if not set.
1343|`message` |optional|
1344Message to be added as review comment to the change when setting the
1345topic.
1346|===========================
1347
Edwin Kempind0a63922013-01-23 16:32:59 +01001348
1349GERRIT
1350------
1351Part of link:index.html[Gerrit Code Review]