Create a default reviewer pull request condition for the given project.
string
RequiredThe details needed to create a default reviewer pull request condition.
integer
array<RestApplicationUser>
object
object
The default reviewer pull request condition that was created.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
curl --request POST \
--url 'http://{baseurl}/rest/default-reviewers/latest/projects/{projectKey}/condition' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"requiredApprovals": 1,
"reviewers": [
{
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
}
],
"sourceMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"id": "ANY_REF",
"name": "Branch"
}
},
"targetMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"id": "ANY_REF",
"name": "Branch"
}
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"id": 1,
"scope": {
"type": "GLOBAL",
"resourceId": 2
},
"requiredApprovals": 1,
"sourceRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"targetRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"reviewers": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
]
}
Update the default reviewer pull request condition for the given ID.
string
Requiredstring
RequiredThe new details for the default reviewer pull request condition.
integer
array<RestApplicationUser>
object
object
The updated default reviewer pull request condition.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
curl --request PUT \
--url 'http://{baseurl}/rest/default-reviewers/latest/projects/{projectKey}/condition/{id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"requiredApprovals": 1,
"reviewers": [
{
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
}
],
"sourceMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"id": "ANY_REF",
"name": "Branch"
}
},
"targetMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"id": "ANY_REF",
"name": "Branch"
}
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"id": 1,
"scope": {
"type": "GLOBAL",
"resourceId": 2
},
"requiredApprovals": 1,
"sourceRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"targetRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"reviewers": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
]
}
Delete the default reviewer pull request condition associated with the given ID.
string
Requiredstring
RequiredAn empty response indicating that the pull request condition was deleted.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/default-reviewers/latest/projects/{projectKey}/condition/{id}'
Return a page of default reviewer pull request conditions that have been configured for this project.
string
RequiredThe default reviewer pull request conditions associated with the given project.
array<RestPullRequestCondition>
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/default-reviewers/latest/projects/{projectKey}/conditions' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[
{
"id": 1,
"scope": {
"type": "GLOBAL",
"resourceId": 2
},
"requiredApprovals": 1,
"sourceRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"targetRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"reviewers": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
]
}
]
Create a default reviewer pull request condition for the given repository.
string
Requiredstring
RequiredThe details needed to create a default reviewer pull request condition.
integer
array<RestApplicationUser>
object
object
The default reviewer pull request condition that was created.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
curl --request POST \
--url 'http://{baseurl}/rest/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/condition' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"requiredApprovals": 1,
"reviewers": [
{
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
}
],
"sourceMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"id": "ANY_REF",
"name": "Branch"
}
},
"targetMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"id": "ANY_REF",
"name": "Branch"
}
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"id": 1,
"scope": {
"type": "GLOBAL",
"resourceId": 2
},
"requiredApprovals": 1,
"sourceRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"targetRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"reviewers": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
]
}
Update the default reviewer pull request condition for the given ID.
string
Requiredstring
Requiredstring
Requiredinteger
array<RestApplicationUser>
object
object
The updated default reviewer pull request condition.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
curl --request PUT \
--url 'http://{baseurl}/rest/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"requiredApprovals": 1,
"reviewers": [
{
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
}
],
"sourceMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"id": "ANY_REF",
"name": "Branch"
}
},
"targetMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"id": "ANY_REF",
"name": "Branch"
}
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"id": 1,
"scope": {
"type": "GLOBAL",
"resourceId": 2
},
"requiredApprovals": 1,
"sourceRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"targetRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"reviewers": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
]
}
Delete the default reviewer pull request condition associated with the given ID.
string
Requiredinteger
Requiredstring
RequiredAn empty response indicating that the pull request condition was deleted
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}'
Return a page of default reviewer pull request conditions that have been configured for this repository.
string
Requiredstring
RequiredThe default reviewer pull request conditions associated with the given repository.
array<RestPullRequestCondition>
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/conditions' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[
{
"id": 1,
"scope": {
"type": "GLOBAL",
"resourceId": 2
},
"requiredApprovals": 1,
"sourceRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"targetRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"reviewers": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
]
}
]
Return a set of users who are required reviewers for pull requests created from the given source repository and ref to the given target ref in this repository.
string
Requiredstring
Requiredstring
string
string
string
The default reviewer pull request conditions associated with the given repository.
array<RestPullRequestCondition>
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/reviewers' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[
{
"id": 1,
"scope": {
"type": "GLOBAL",
"resourceId": 2
},
"requiredApprovals": 1,
"sourceRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"targetRefMatcher": {
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
},
"displayId": "main"
},
"reviewers": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
]
}
]
Checks preconditions to determine whether the pull request can be rebased.
Some of the preconditions are:
refs/heads/
git rebase
records the current user as the committer for the rebased commits, which requires a name and e-mail addressThis list is not exhaustive, and the exact set of preconditions applied can be extended by third-party add-ons.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
RequiredThe rebaseability status of the pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/git/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"vetoes": [
{
"summaryMessage": "Insufficient branch permissions",
"detailedMessage": "You have insufficient permissions to rebase 'refs/heads/feature-branch'."
}
]
}
Rebases the specified pull request, rewriting the incoming commits to start from the tip commit of the pull request's target branch. This operation alters the pull request's source branch and cannot be undone.
The authenticated user must have REPO_READ permission for the repository that this pull request targets and REPO_WRITE permission for the pull request's source repository to call this resource.
string
Requiredstring
Requiredstring
RequiredThe pull request rebase request.
integer
The merged pull request.
1
2
3
4
5
6
7
curl --request POST \
--url 'http://{baseurl}/rest/git/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"version": 1
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"refChange": {
"type": "ADD",
"ref": {
"id": "refs/heads/master",
"type": "BRANCH",
"displayId": "master"
},
"refId": "refs/heads/master",
"fromHash": "6053a1eaa1c009dd11092d09a72f3c41af1b59ad",
"toHash": "d6edcbf924697ab811a867421dab60d954ccad99"
}
}
Add an emoticon reaction to a pull request comment
string
Requiredstring
Requiredstring
Requiredstring
Requiredstring
RequiredThe added reaction
1
2
3
curl --request PUT \
--url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/reactions/{emoticon}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
{
"comment": {
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"emoticon": {
"value": "<string>",
"url": "<string>",
"shortcut": "<string>"
}
}
Remove an emoticon reaction from a pull request comment
string
Requiredstring
Requiredstring
Requiredstring
Requiredstring
RequiredThe added reaction
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/reactions/{emoticon}'
Retrieve the merge strategies available for this instance. The user must be authenticated to call this resource.
string
RequiredThe merge configuration of this instance.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/admin/pull-requests/{scmId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"type": "repository",
"strategies": [
{
"enabled": true,
"name": "Merge commit",
"id": "no-ff",
"description": "Always create a merge commit",
"flag": "--no-ff"
}
],
"defaultStrategy": {
"enabled": true,
"name": "Merge commit",
"id": "no-ff",
"description": "Always create a merge commit",
"flag": "--no-ff"
},
"commitSummaries": 2154
}
Update the pull request merge strategies for the context repository.
The authenticated user must have ADMIN permission to call this resource.
Only the strategies provided will be enabled, only one may be set to default
An explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty "mergeConfig" attribute. i.e:```{ "mergeConfig": { } }
1 2
Upon completion of this request, the effective configuration will be the default configuration.
string
Requiredthe settings
object
The repository pull request merge strategies for the context repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/admin/pull-requests/{scmId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"mergeConfig": {
"strategies": [
{
"id": "no-ff",
"links": {}
}
],
"defaultStrategy": {
"id": "no-ff",
"links": {}
},
"commitSummaries": 2154
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"type": "repository",
"strategies": [
{
"enabled": true,
"name": "Merge commit",
"id": "no-ff",
"description": "Always create a merge commit",
"flag": "--no-ff"
}
],
"defaultStrategy": {
"enabled": true,
"name": "Merge commit",
"id": "no-ff",
"description": "Always create a merge commit",
"flag": "--no-ff"
},
"commitSummaries": 2154
}
Retrieve a page of pull requests in the current repository that contain the given commit. The user must be authenticated and have access to the specified repository to call this resource.
string
Requiredstring
Requiredstring
Requirednumber
number
Return a page of pull requests in the current repository containing the given commit.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/pull-requests' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
{
"values": [
{
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Retrieve a page of participant users for all the pull requests to or from the specified repository. Optionally clients can specify following filters.
string
Requiredstring
Requiredstring
string
string
number
number
A page of users that match the search criteria.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/participants' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"values": [
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Retrieve a page of pull requests to or from the specified repository.
The authenticated user must have REPO_READ permission for the specified repository to call this resource. Optionally clients can specify PR participant filters. Each filter has a mandatory username.N parameter, and the optional role.N and approved.N parameters.
string
Requiredstring
Requiredstring
string
string
string
string
string
string
number
number
A page of pull requests that match the search criteria.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
{
"values": [
{
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Create a new pull request from a source branch or tag to a target branch. The source and target may be in the same repository, or different ones. (Note that different repositories must belong to the same Repository#getHierarchyId()
hierarchy.)
The fromRef
may be a branch or a tag. The toRef
is required to be a branch. Tags are not allowed as targets because tags are intended to be immutable and should not be changed after they are created.
The authenticated user must have REPO_READ permission for the fromRef
and toRef
repositories to call this resource.
string
Requiredstring
RequiredThe pull request data
integer
string
boolean
boolean
integer
integer
string
string
object
string
The newly created pull request.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"htmlDescription": "<string>",
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"scmId": "git",
"slug": "my-repo",
"links": {}
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"scmId": "git",
"slug": "my-repo",
"links": {}
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200,
"links": {}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
{
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
}
Retrieve a pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
RequiredThe specified pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
{
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
Update the title, description, reviewers or destination branch of an existing pull request.
Note: the reviewers list may be updated using this resource. However the author and participants list may not.
The authenticated user must either:
to call this resource.
string
Requiredstring
Requiredstring
RequiredThe updated pull request
integer
string
boolean
boolean
integer
integer
string
string
object
string
The updated pull request.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"htmlDescription": "<string>",
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"scmId": "git",
"slug": "my-repo",
"links": {}
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"scmId": "git",
"slug": "my-repo",
"links": {}
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200,
"links": {}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
{
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
}
Deletes a pull request.
To call this resource, users must be authenticated and have permission to view the pull request. Additionally, they must:
A body containing the version of the pull request must be provided with this request.
{ "version": 1 }
string
Requiredstring
Requiredstring
RequiredA body containing the version of the pull request
integer
The pull request was deleted.
1
2
3
4
5
6
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}' \
--header 'Content-Type: application/json' \
--data '{
"version": 2154
}'
Streams the raw diff for a pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
string
A raw diff for the specified pull request.
any
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.diff' \
--header 'Accept: application/json'
Streams a patch representing a pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
RequiredA patch representing the specified pull request.
any
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.patch' \
--header 'Accept: application/json'
Retrieve a page of activity associated with a pull request.
Activity items include comments, approvals, rescopes (i.e. adding and removing of commits), merges and more.
Different types of activity items may be introduced in newer versions of Stash or by user installed plugins, so clients should be flexible enough to handle unexpected entity shapes in the returned page.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
string
number
number
A page of activity relating to the specified pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/activities' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"values": [
{
"action": "APPROVED",
"id": 1,
"createdDate": 19990759200,
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
}
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Gets comments matching the given set of field values for the specified pull request. (Note this does not perform any kind of searching for comments by their text).
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
array<string>
string
number
number
A page of Comments from the supplied pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
{
"values": [
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Add a new blocker comment.
Comments can be added in a few places by setting different attributes:
General pull request blocker comment:
1 2 3 4
{ "text": "A task on a pull request." }
Blocker reply to a comment:
1 2 3 4 5 6 7
{ "text": "This reply is a task.", "parent": { "id": 1 } }
General blocker file comment:
1 2 3 4 5 6 7 8 9 10 11
{ "text": "A blocker comment on a file.", "anchor": { "diffType": "RANGE", "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd", "path": "path/to/file", "srcPath": "path/to/file", "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b" } }
Blocker file line comment:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ "text": "A task on a particular line within a file.", "anchor": { "diffType": "COMMIT", "line": 1, "lineType": "CONTEXT", "fileType": "FROM", "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd", "path": "path/to/file", "srcPath": "path/to/file", "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b" } }
For file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. For backwards compatibility purposes if no diffType is provided and no fromHash/toHash pair is provided the diffType will be resolved to 'EFFECTIVE'. In any other cases the diffType is REQUIRED.
For line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be:
'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are:
If the current user is not a participant the user is added as a watcher of the pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
RequiredThe comment to add.
integer
string
integer
string
string
object
The newly created comment.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"state": "OPEN",
"version": 1,
"severity": "NORMAL",
"text": "An insightful comment.",
"properties": {}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
Retrieves a pull request comment.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe requested comment.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments/{commentId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
Update a comment, with the following restrictions:
Convert a comment to a task or vice versa.
Comments can be converted to tasks by setting the 'severity' attribute to 'BLOCKER':
1 2 3 4 5
{ "severity": "BLOCKER" }
Tasks can be converted to comments by setting the 'severity' attribute to 'NORMAL': ```
{ "severity": "NORMAL" }
1 2 3 4 5 6 7 8
Resolve a blocker comment. Blocker comments can be resolved by setting the 'state' attribute to 'RESOLVED': ``` { "state": "RESOLVED" }
Note: the supplied JSON object must contain a version
that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe comment to add.
integer
string
integer
string
string
object
The newly updated comment.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments/{commentId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"state": "OPEN",
"version": 1,
"severity": "NORMAL",
"text": "An insightful comment.",
"properties": {}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
Delete a pull request comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
Requiredstring
The operation was successful.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments/{commentId}'
Gets changes for the specified PullRequest.
If the changeScope query parameter is set to 'UNREVIEWED', the application will attempt to stream unreviewed changes based on the lastReviewedCommit of the current user, which are the changes between the lastReviewedCommit and the latest commit of the source branch. The current user is considered to not have any unreviewed changes for the pull request when the lastReviewedCommit is either null (everything is unreviewed, so all changes are streamed), equal to the latest commit of the source branch (everything is reviewed), or no longer on the source branch (the source branch has been rebased). In these cases, the application will fall back to streaming all changes (the default), which is the effective diff for the pull request. The type of changes streamed can be determined by the changeScope parameter included in the properties map of the response.
Note: This resource is currently not paged. The server will return at most one page. The server will truncate the number of changes to either the request's page limit or an internal maximum, whichever is smaller. The start parameter of the page request is also ignored.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
string
string
string
number
number
A page of unreviewed Changes for the current user from the supplied pull request, including the unreviewedCommits in the properties map.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/changes' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"type": "ADD",
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"executable": true,
"nodeType": "DIRECTORY",
"conflict": {
"ourChange": {
"type": "ADD",
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
}
},
"theirChange": {
"type": "ADD",
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
}
}
},
"contentId": "abcdef0123abcdef4567abcdef8987abcdef6543",
"fromContentId": "bcdef0123abcdef4567abcdef8987abcdef6543a",
"percentUnchanged": 98,
"srcExecutable": true,
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
}
}
Gets comments for the specified pull request and path.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
Requiredstring
string
array<string>
string
array<string>
string
string
number
number
A page of Comments from the supplied pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments?path={path}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
{
"values": [
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Add a new comment.
Comments can be added in a few places by setting different attributes:
General pull request comment:{ "text": "An insightful general comment on a pull request." }Reply to a comment:
{General file comment:"text": "A measured reply.", "parent": { "id": 1 } }
{ "text": "An insightful general comment on a file.", "anchor": { "diffType": "RANGE", "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd", "path": "path/to/file", "srcPath": "path/to/file", "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b" } }File line comment:
{ "text": "A pithy comment on a particular line within a file.", "anchor": { "diffType": "COMMIT", "line": 1, "lineType": "CONTEXT", "fileType": "FROM", "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd", "path": "path/to/file", "srcPath": "path/to/file", "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b" } }
Add a new task.
Tasks are just comments with the attribute 'severity' set to 'BLOCKER':
General pull request task:
{ "text": "A task on a pull request.", "severity": "BLOCKER" }
Add a pending comment.
Pending comments are just comments with the attribute 'state' set to 'PENDING':
Pending comment:
{ "text": "This is a pending comment", "state": "PENDING" }
For file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. For backwards compatibility purposes if no diffType is provided and no fromHash/toHash pair is provided the diffType will be resolved to 'EFFECTIVE'. In any other cases the diffType is REQUIRED.
For line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be:
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
RequiredThe comment to add
integer
string
integer
string
string
object
The newly created comment.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"state": "OPEN",
"version": 1,
"severity": "NORMAL",
"text": "An insightful comment.",
"properties": {}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
Retrieves a pull request comment.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe requested comment.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
Update a comment, with the following restrictions:
Convert a comment to a task or vice versa.
Comments can be converted to tasks by setting the 'severity' attribute to 'BLOCKER':
{ "severity": "BLOCKER" }
Tasks can be converted to comments by setting the 'severity' attribute to 'NORMAL':
{ "severity": "NORMAL" }
Resolve a task.
Tasks can be resolved by setting the 'state' attribute to 'RESOLVED':
{ "state": "RESOLVED" }
Note: the supplied JSON object must contain a version
that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe updated comment
integer
string
integer
string
string
object
The newly updated comment.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"state": "OPEN",
"version": 1,
"severity": "NORMAL",
"text": "An insightful comment.",
"properties": {}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
Delete a pull request comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
Requiredstring
The operation was successful.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}'
Apply a suggestion contained within a comment.
string
Requiredstring
Requiredstring
Requiredstring
RequiredA request containing other parameters required to apply a suggestion - The given versions/hashes must match the server's version/hashes or the suggestion application will fail (in order to avoid applying the suggestion to the wrong place
object
string
object
object
An empty response indicating the suggestion has been applied.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/apply-suggestion' \
--header 'Content-Type: application/json' \
--data '{
"commentVersion": {
"asInt": 2154,
"present": true
},
"commitMessage": "A commit message",
"pullRequestVersion": {
"asInt": 2154,
"present": true
},
"suggestionIndex": {
"asInt": 2154,
"present": true
}
}'
Retrieve commits for the specified pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
string
string
number
number
A page of commits from the supplied pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commits' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"values": [
{
"message": "More work on feature 1",
"parents": [
{
"id": "abcdef0123abcdef4567abcdef8987abcdef6543",
"displayId": "abcdef0"
}
],
"committerTimestamp": 1449075830,
"committer": {
"name": "Charlie",
"emailAddress": "charlie@example.com"
},
"authorTimestamp": 1359075920,
"author": {
"name": "Charlie",
"emailAddress": "charlie@example.com"
},
"id": "abcdef0123abcdef4567abcdef8987abcdef6543",
"displayId": "abcdef0"
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Decline a pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
The body holder
string
integer
The pull request was declined.
1
2
3
4
5
6
7
8
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/decline' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"comment": "An optional comment explaining why the pull request is being declined",
"version": 2154
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
{
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
}
Streams the raw diff for a pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
string
string
string
string
A raw diff for the specified pull request.
any
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/diff' \
--header 'Accept: application/json'
Streams the raw diff for a pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
Requiredstring
string
string
string
string
number
number
A raw diff for the specified pull request.
any
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/diff/{path}' \
--header 'Accept: application/json'
Test whether a pull request can be merged.
A pull request may not be merged if:
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
RequiredThe mergeability status of the pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
{
"outcome": "CLEAN",
"vetoes": [
{
"summaryMessage": "Insufficient branch permissions",
"detailedMessage": "You have insufficient permissions to rebase 'refs/heads/feature-branch'."
}
],
"conflicted": true
}
Merge the specified pull request.
The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
The body holder
string
object
string
string
integer
The merged pull request.
1
2
3
4
5
6
7
8
9
10
11
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"autoSubject": "(Optional, 5.7+) true to prepend an auto-generated subject to the message (default), or false to use the message as-is",
"context": {},
"message": "(Optional) A descriptive message for the merge commit",
"strategyId": "(Optional) squash",
"version": 2154
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
{
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
}
Retrieves a page of the participants for a given pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requirednumber
number
Details of the participants in this pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"values": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Assigns a participant to an explicit role in pull request. Currently only the REVIEWER role may be assigned.
If the user is not yet a participant in the pull request, they are made one and assigned the supplied role.
If the user is already a participant in the pull request, their previous role is replaced with the supplied role unless they are already assigned the AUTHOR role which cannot be changed and will result in a Bad Request (400) response code.
The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
object
string
string
boolean
Details of the participants in this pull request.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
Change the current user's status for a pull request. Implicitly adds the user as a participant if they are not already. If the current user is the author, this method will fail.
The possible values for {@code status} are UNAPPROVED, NEEDS_WORK, or APPROVED.
If the new {@code status} is NEEDS_WORK or APPROVED then the {@code lastReviewedCommit} for the participant will be updated to the latest commit of the source branch of the pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe participant representing the status to set, all fields except status are ignored
string
object
string
string
boolean
Details of the new participant.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"links": {},
"active": true,
"avatarUrl": "<string>"
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
Unassigns a participant from the REVIEWER role they may have been given in a pull request.
If the participant has no explicit role this method has no effect.
Afterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered.
The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe update completed.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}'
Re-open a declined pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
Requiredstring
The body holder
integer
The merged pull request.
1
2
3
4
5
6
7
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/reopen' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"version": 2154
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
{
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
}
Get the CommentThread
threads which have Comment
comments that have a CommentState#PENDING
pending state and are part of the pull request review for the authenticated user.
string
Requiredstring
Requiredstring
Requirednumber
number
A page of Comments from the supplied pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/review' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
182
183
184
185
186
187
188
189
190
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
{
"values": [
{
"parent": {
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
},
"id": 1,
"state": "OPEN",
"version": 1,
"createdDate": 1359075920,
"anchor": {
"path": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"line": 98,
"diffType": "COMMIT",
"fileType": "FROM",
"fromHash": "62a0505e8204115b8b9c8a95bfa264a8c0896a93",
"lineType": "ADDED",
"pullRequest": {
"id": 1,
"state": "DECLINED",
"open": true,
"locked": true,
"version": 2154,
"createdDate": 13590759200,
"description": "It is a kludge, but put the tuple from the database in the cache.",
"toRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"title": "Talking Nerdy",
"closed": true,
"closedDate": 19990759200,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"type": "BRANCH",
"displayId": "feature-ABC-1233",
"latestCommit": "babecafebabecafebabecafebabecafebabecafe",
"repository": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"origin": {
"name": "My repo",
"id": 2154,
"state": "AVAILABLE",
"public": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"statusMessage": "Available",
"archived": true,
"forkable": true,
"defaultBranch": "main",
"relatedLinks": {},
"partition": 2154,
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
},
"project": {
"name": "My Cool Project",
"key": "PRJ",
"id": 2154,
"type": "NORMAL",
"public": true,
"avatar": "<string>",
"namespace": "<string>",
"description": "The description for my cool project",
"scope": "PROJECT"
},
"description": "My repo description",
"scmId": "git",
"slug": "my-repo",
"scope": "REPOSITORY"
}
},
"participants": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"reviewers": [
{
"status": "UNAPPROVED",
"user": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"role": "AUTHOR",
"lastReviewedCommit": "7549846524f8aed2bd1c0249993ae1bf9d3c9998",
"approved": true
}
],
"updatedDate": 14490759200
},
"srcPath": {
"name": "file.txt",
"parent": "path/to",
"extension": "txt",
"components": [
"path",
"to",
"file.txt"
]
},
"toHash": "3cdd5d19178a54d2e51b5098d43b57571241d0ab",
"lineComment": true
},
"comments": [],
"severity": "NORMAL",
"html": "<string>",
"reply": true,
"text": "An insightful comment.",
"author": {
"name": "jcitizen",
"id": 101,
"type": "NORMAL",
"displayName": "Jane Citizen",
"emailAddress": "jane@example.com",
"slug": "jcitizen",
"active": true
},
"anchored": true,
"pending": true,
"updatedDate": 1449075920,
"properties": {}
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Complete a review on a pull request.
string
Requiredstring
Requiredstring
RequiredThe REST request which contains comment text and participant status
string
string
Getting back the number of published comments and completing the review on a pull request.
any
1
2
3
4
5
6
7
8
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/review' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"commentText": "General comment text",
"participantStatus": "approved"
}'
Discard a pull request review for the authenticated user.
The authenticated user must have REPO_READ permission for the repository to call this resource.
string
Requiredstring
Requiredstring
RequiredThe pull request review has been discarded.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/review'
Add the authenticated user as a watcher for the specified pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
RequiredThe user is now watching the pull request.
1
2
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/watch'
Remove the authenticated user as a watcher for the specified pull request.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
RequiredThe user is no longer watching the pull request.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/watch'
Retrieve a page of reviewer groups of a given scope.
The authenticated user must have REPO_READ permission for the specified repository to call this resource.
string
Requiredstring
Requirednumber
number
A page
of reviewer group(s) of the provided scope and its inherited scope.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
"values": [
{
"name": "name",
"id": 2154,
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Create a reviewer group.
The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.
string
Requiredstring
RequiredThe request containing the details of the reviewer group.
string
integer
string
string
array<ApplicationUser>
object
The newly created reviewer group.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "name",
"id": 2154,
"avatarUrl": "<string>",
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"name": "name",
"id": 2154,
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}
Retrieve a reviewer group.
The authenticated user must have REPO_READ permission for the specified repository to call this resource.
string
Requiredstring
Requiredstring
RequiredThe reviewer group.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"name": "name",
"id": 2154,
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}
Update the attributes of a reviewer group.
The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.
string
Requiredstring
Requiredstring
RequiredThe request containing the attributes of the reviewer group to be updated. Only the attributes to be updated need to be present in this object.
string
integer
string
string
array<ApplicationUser>
object
The updated reviewer group.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "name",
"id": 2154,
"avatarUrl": "<string>",
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"name": "name",
"id": 2154,
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}
Deletes a reviewer group.
The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.
string
Requiredstring
Requiredstring
RequiredThe operation was successful
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}'
Retrieve a list of the users of a reviewer group.
This does not return all the users of the group, only the users who have REPO_READ permission for the specified repository.
The authenticated user must have REPO_READ permission for the specified repository to call this resource.
string
Requiredstring
Requiredstring
RequiredThe list of users of a reviewer group.
array<RestApplicationUser>
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}/users' \
--header 'Accept: application/json;charset=UTF-8'
Retrieve a page of reviewer groups of a given scope.
The authenticated user must have PROJECT_READ permission for the specified project to call this resource.
string
Requirednumber
number
A page of reviewer group(s) of the provided scope.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/settings/reviewer-groups' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
"values": [
{
"name": "name",
"id": 2154,
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}
],
"size": 1,
"limit": 25,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154
}
Create a reviewer group.
The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.
string
RequiredThe reviewer group to be create
string
integer
string
string
array<ApplicationUser>
object
The newly created reviewer group.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
curl --request POST \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/settings/reviewer-groups' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "name",
"id": 2154,
"avatarUrl": "<string>",
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"name": "name",
"id": 2154,
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}
Retrieve a reviewer group.
The authenticated user must have PROJECT_READ permission for the specified project to call this resource.
string
Requiredstring
RequiredThe reviewer group.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/settings/reviewer-groups/{id}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"name": "name",
"id": 2154,
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}
Update the attributes of a reviewer group.
The authenticated user must have PROJECT_READ permission for the specified project to call this resource.
string
Requiredstring
RequiredThe request containing the attributes of the reviewer group to be updated. Only the attributes to be updated need to be present in this object.
string
integer
string
string
array<ApplicationUser>
object
A page of changes.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
curl --request PUT \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/settings/reviewer-groups/{id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "name",
"id": 2154,
"avatarUrl": "<string>",
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"name": "name",
"id": 2154,
"description": "null",
"users": [
{
"id": 2154,
"type": "NORMAL",
"displayName": "<string>",
"slug": "<string>",
"active": true,
"name": "<string>",
"emailAddress": "<string>"
}
],
"scope": {
"type": "GLOBAL",
"resourceId": 2
}
}
Deletes a reviewer group.
The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.
string
Requiredstring
RequiredThe operation was successful.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/api/latest/projects/{projectKey}/settings/reviewer-groups/{id}'
Rate this page: