├── README.md
└── apiary.apib
/README.md:
--------------------------------------------------------------------------------
1 | zapi-docs
2 | =========
3 |
4 | This is a repository to store ZAPI APIARY Docs. Here is the published [documentation](http://docs.getzephyr.apiary.io).
5 |
6 | Please feel free to leave comment next to corresponding API.
7 |
8 | ###ZAPI
9 | [ZAPI](https://marketplace.atlassian.com/plugins/com.thed.zephyr.zapi) (short for Zephyr for JIRA API) is a RESTFul API layer to access Zephyr For JIRA. Available on [Atlassian Market Place](https://marketplace.atlassian.com).
10 |
11 | ###ZFJ
12 | [ZFJ](https://marketplace.atlassian.com/plugins/com.thed.zephyr.je) Test management plugin within JIRA. Available on [Atlassian Market Place](https://marketplace.atlassian.com)
13 |
--------------------------------------------------------------------------------
/apiary.apib:
--------------------------------------------------------------------------------
1 | HOST: http://localhost:2990/jira_server/rest/zapi/latest/
2 |
3 | --- Zephyr for JIRA REST API ---
4 | ---
5 | Welcome to Zephyr for JIRA REST API documentation. Base URL (http://localhost:2990/jira_server/rest/zapi/latest/)
6 | ---
7 |
8 | --
9 | Cycle Resource API(s)
10 | Following section describes rest resources (API's) pertaining to CycleResource
11 | --
12 | Retrieve a Test Cycle by it's id.
13 |
14 | PathParam: cycleId (id)*.
15 | GET /cycle/{id}
16 | {
17 | "id": 1,
18 | }
19 | < 200
20 | < Content-Type: application/json
21 | {
22 | "id": 1,
23 | "environment": "",
24 | "description": "Audit Test Cycle",
25 | "name": "Audit Test Cycle",
26 | "versionId": 10000,
27 | "projectId": 10000,
28 | "build": ""
29 | }
30 |
31 |
32 | Retrieve all Test Cycles for a given version of the selected project.
33 |
34 | QueryParam(s): projectId\*, versionId\*, offset, expand [executionSummaries].
35 | GET /cycle
36 | > Content-Type: application/json
37 | {
38 | "projectId": 10000,
39 | "versionId": 10100,
40 | "offset": 0,
41 | "expand": "executionSummaries"
42 | }
43 | < 200
44 | < Content-Type: application/json
45 | {
46 | "1": {
47 | "startDate": "",
48 | "endDate": "",
49 | "projectId": 10000,
50 | "build": "",
51 | "totalExecutions": 1,
52 | "totalExecuted": 1,
53 | "environment": "",
54 | "description": "Audit Test Cycle",
55 | "executionSummaries": {
56 | "executionSummary": [
57 | {
58 | "count": 0,
59 | "statusKey": -1,
60 | "statusName": "UNEXECUTED",
61 | "statusColor": "#A0A0A0",
62 | "statusDescription": "The test has not yet been executed."
63 | },
64 | {
65 | "count": 1,
66 | "statusKey": 1,
67 | "statusName": "PASS",
68 | "statusColor": "#75B000",
69 | "statusDescription": "Test was executed and passed successfully."
70 | },
71 | {
72 | "count": 0,
73 | "statusKey": 2,
74 | "statusName": "FAIL",
75 | "statusColor": "#CC3300",
76 | "statusDescription": "Test was executed and failed."
77 | },
78 | {
79 | "count": 0,
80 | "statusKey": 3,
81 | "statusName": "WIP",
82 | "statusColor": "#F2B000",
83 | "statusDescription": "Test execution is a work-in-progress."
84 | },
85 | {
86 | "count": 0,
87 | "statusKey": 4,
88 | "statusName": "BLOCKED",
89 | "statusColor": "#6693B0",
90 | "statusDescription": "The test execution of this test was blocked for some reason."
91 | }
92 | ]
93 | },
94 | "name": "Audit Test Cycle",
95 | "expand": "executionSummaries",
96 | "versionId": 10000,
97 | "started": ""
98 | },
99 | "2": {...},
100 | "-1": {...},
101 | "recordsCount": 3
102 | }
103 |
104 |
105 | Exports a Test Cycle by it's id.
106 |
107 | PathParam: id\*.
108 |
109 | QueryParam(s): projectId, versionId.
110 | GET /cycle/{id}/export
111 | > Content-Type: application/json
112 | {
113 | "projectId": 10000,
114 | "versionId": 10000
115 | }
116 | < 200
117 | < Content-Type: application/json
118 | {
119 | "url": "http://localhost:2990/jira/plugins/servlet/export/exportAttachment?fileName=Cycle-Audit+Test+Cycle.csv"
120 | }
121 |
122 |
123 | Create a new Test Cycle.
124 |
125 | (name\*, projectId\*, versionId\*)
126 | POST /cycle
127 | > Content-Type: application/json
128 | {
129 | "clonedCycleId": "",
130 | "name": "RC1",
131 | "build": "",
132 | "environment": "",
133 | "description": "Released Cycle1",
134 | "startDate": "17/Oct/13",
135 | "endDate": "17/Jan/14",
136 | "projectId": "10000",
137 | "versionId": "10000"
138 | }
139 | < 200
140 | < Content-Type: application/json
141 | {
142 | "id": "10",
143 | "responseMessage": "Cycle 10 created successfully."
144 | }
145 |
146 |
147 | Create a new Test Cycle by cloning the existing Test Cycle, specify the cycleId of the Test Cycle that needs to be cloned in clonedCycleId field.
148 | POST /cycle
149 | > Content-Type: application/json
150 | {
151 | "clonedCycleId": "1",
152 | "name": "CLONE - Audit Test Cycle",
153 | "build": "",
154 | "environment": "",
155 | "description": "Audit Test Cycle",
156 | "startDate": "18/Oct/13",
157 | "endDate": "18/Oct/14",
158 | "projectId": "10000",
159 | "versionId": "10000"
160 | }
161 | < 200
162 | < Content-Type: application/json
163 | {
164 | "id": "15",
165 | "responseMessage": "Cycle 15 created successfully."
166 | }
167 |
168 |
169 | Delete an existing Test Cycle by it's id.
170 |
171 | PathParam: id\*.
172 | DELETE /cycle/{id}
173 | > Content-Type: application/json
174 | {
175 | "id": 12
176 | }
177 | < 200
178 | < Content-Type: application/json
179 | {
180 | "success": "Cycle 12 successfully deleted"
181 | }
182 |
183 |
184 | Update an existing Test Cycle.
185 |
186 | id\*
187 | PUT /cycle
188 | > Content-Type: application/json
189 | {
190 | "id": "3",
191 | "name": "Audit Test Cycle 2",
192 | "build": "",
193 | "environment": "",
194 | "description": "Audit Test Cycle 2",
195 | "startDate": "18/Oct/13",
196 | "endDate": "18/Jan/14",
197 | "projectId": "10000",
198 | "versionId": "10000"
199 | }
200 | < 200
201 | < Content-Type: application/json
202 | {
203 | "id": "3",
204 | "responseMessage": "Cycle 3 updated successfully."
205 | }
206 |
207 |
208 | Move Bulk Executions to Test Cycle by id.
209 |
210 | PathParam: id\*.
211 | PUT /cycle/{id}/move
212 | > Content-Type: application/json
213 | {
214 | "executions": [
215 | "14",
216 | "13"
217 | ],
218 | "projectId": "10000",
219 | "versionId": "10000",
220 | "clearStatusFlag": true,
221 | "clearDefectMappingFlag": true
222 | }
223 | < 200
224 | < Content-Type: application/json
225 | {
226 | "success": "14,13",
227 | "projectMismatch": "-",
228 | "versionMismatch": "-",
229 | "invalid": "-",
230 | "existing": ""
231 | }
232 |
233 |
234 | Copy Bulk Executions to Test Cycle by id.
235 |
236 | PathParam: id\*.
237 | PUT /cycle/{id}/copy
238 | > Content-Type: application/json
239 | {
240 | "executions": [
241 | "23",
242 | "22",
243 | "18"
244 | ],
245 | "projectId": "10000",
246 | "versionId": "10000",
247 | "clearStatusFlag": true,
248 | "clearDefectMappingFlag": true
249 | }
250 | < 200
251 | < Content-Type: application/json
252 | {
253 | "success": "25",
254 | "projectMismatch": "18",
255 | "versionMismatch": "-",
256 | "invalid": "-",
257 | "existing": "23"
258 | }
259 |
260 |
261 | --
262 | Execution Resource API(s)
263 | Following section describes rest resources (API's) pertaining to ExecutionResource
264 | --
265 |
266 | Retrieve all Executions available by issueId.
267 |
268 | QueryParam(s): issueId*.
269 | GET /execution
270 | > Content-Type: application/json
271 | {
272 | "issueId": 10001
273 | }
274 | < 200
275 | < Content-Type: application/json
276 | {
277 | "status": {
278 | "1": {
279 | "id": 1,
280 | "color": "#75B000",
281 | "description": "Test was executed and passed successfully.",
282 | "name": "PASS"
283 | },
284 | "2": {
285 | "id": 2,
286 | "color": "#CC3300",
287 | "description": "Test was executed and failed.",
288 | "name": "FAIL"
289 | },
290 | "3": {
291 | "id": 3,
292 | "color": "#F2B000",
293 | "description": "Test execution is a work-in-progress.",
294 | "name": "WIP"
295 | },
296 | "4": {
297 | "id": 4,
298 | "color": "#6693B0",
299 | "description": "The test execution of this test was blocked for some reason.",
300 | "name": "BLOCKED"
301 | },
302 | "-1": {
303 | "id": -1,
304 | "color": "#A0A0A0",
305 | "description": "The test has not yet been executed.",
306 | "name": "UNEXECUTED"
307 | }
308 | },
309 | "issueId": 10001,
310 | "executions": [
311 | {
312 | "id": 24,
313 | "executionStatus": "1",
314 | "executedOn": "Today 11:06 AM",
315 | "executedBy": "admin",
316 | "executedByDisplay": "admin",
317 | "comment": "",
318 | "htmlComment": "",
319 | "cycleId": 13,
320 | "cycleName": "CLONE - Audit Test Cycle 2",
321 | "versionId": 10000,
322 | "versionName": "v1",
323 | "projectId": 10000,
324 | "issueId": 10001,
325 | "issueKey": "ZFJ-2",
326 | "summary": "test1",
327 | "label": "",
328 | "component": "c1"
329 | },
330 | {
331 | "id": 4,
332 | "executionStatus": "1",
333 | "executedOn": "Tuesday 1:40 PM",
334 | "executedBy": "admin",
335 | "executedByDisplay": "admin",
336 | "comment": "",
337 | "htmlComment": "",
338 | "cycleId": 3,
339 | "cycleName": "Audit Test Cycle 2",
340 | "versionId": 10000,
341 | "versionName": "v1",
342 | "projectId": 10000,
343 | "issueId": 10001,
344 | "issueKey": "ZFJ-2",
345 | "summary": "test1",
346 | "label": "",
347 | "component": "c1"
348 | },
349 | {
350 | "id": 3,
351 | "executionStatus": "-1",
352 | "comment": "",
353 | "htmlComment": "",
354 | "cycleId": -1,
355 | "cycleName": "Ad hoc",
356 | "versionId": 10000,
357 | "versionName": "v1",
358 | "projectId": 10000,
359 | "issueId": 10001,
360 | "issueKey": "ZFJ-2",
361 | "summary": "test1",
362 | "label": "",
363 | "component": "c1"
364 | },
365 | {
366 | "id": 1,
367 | "executionStatus": "1",
368 | "executedOn": "04/Oct/13 3:23 PM",
369 | "executedBy": "admin",
370 | "executedByDisplay": "admin",
371 | "comment": "",
372 | "htmlComment": "",
373 | "cycleId": 1,
374 | "cycleName": "Audit Test Cycle",
375 | "versionId": 10000,
376 | "versionName": "v1",
377 | "projectId": 10000,
378 | "issueId": 10001,
379 | "issueKey": "ZFJ-2",
380 | "summary": "test1",
381 | "label": "",
382 | "component": "c1"
383 | }
384 | ],
385 | "currentlySelectedExecutionId": "",
386 | "recordsCount": 4
387 | }
388 |
389 |
390 | Retrieve all Executions available based on QueryParams.
391 |
392 | QueryParam(s): cycleId\*, action\*, offset, sorter, decorator, contentOnly, noTitle, projectId, versionId.
393 | GET /execution
394 | > Content-Type: application/json
395 | {
396 | "action": "expand",
397 | "contentOnly": "true",
398 | "cycleId": 1,
399 | "decorator": "none",
400 | "noTitle": "true",
401 | "offset": 0,
402 | "projectId": 10000,
403 | "sorter": "ID: DESC",
404 | "versionId": "10000"
405 | }
406 | < 200
407 | < Content-Type: application/json
408 | {
409 | "status": {
410 | "1": {
411 | "id": 1,
412 | "color": "#75B000",
413 | "description": "Test was executed and passed successfully.",
414 | "name": "PASS"
415 | },
416 | "2": {
417 | "id": 2,
418 | "color": "#CC3300",
419 | "description": "Test was executed and failed.",
420 | "name": "FAIL"
421 | },
422 | "3": {
423 | "id": 3,
424 | "color": "#F2B000",
425 | "description": "Test execution is a work-in-progress.",
426 | "name": "WIP"
427 | },
428 | "4": {
429 | "id": 4,
430 | "color": "#6693B0",
431 | "description": "The test execution of this test was blocked for some reason.",
432 | "name": "BLOCKED"
433 | },
434 | "-1": {
435 | "id": -1,
436 | "color": "#A0A0A0",
437 | "description": "The test has not yet been executed.",
438 | "name": "UNEXECUTED"
439 | }
440 | },
441 | "executions": [
442 | {
443 | "id": 1,
444 | "executionStatus": "1",
445 | "executedOn": "04/Oct/13 3:23 PM",
446 | "executedBy": "admin",
447 | "executedByDisplay": "admin",
448 | "comment": "",
449 | "htmlComment": "",
450 | "cycleId": 1,
451 | "cycleName": "Audit Test Cycle",
452 | "versionId": 10000,
453 | "versionName": "v1",
454 | "projectId": 10000,
455 | "issueId": 10001,
456 | "issueKey": "ZFJ-2",
457 | "summary": "test1",
458 | "label": "",
459 | "component": "c1"
460 | }
461 | ],
462 | "currentlySelectedExecutionId": "",
463 | "recordsCount": 1
464 | }
465 |
466 | Retrieve Execution details based on id.
467 |
468 | PathParam: id\*.
469 | GET /execution/{id}
470 | {
471 | "id": 1,
472 | }
473 | < 200
474 | < Content-Type: application/json
475 | {
476 | "execution": {
477 | "id": 1,
478 | "executionStatus": "1",
479 | "executedOn": "04/Oct/13 3:23 PM",
480 | "executedBy": "admin",
481 | "executedByDisplay": "admin",
482 | "defects": [
483 | {
484 | "key": "ZFJ-3",
485 | "status": "Open",
486 | "summary": "test1"
487 | },
488 | {
489 | "key": "ZFJ-6",
490 | "status": "Open",
491 | "summary": "test4"
492 | }
493 | ],
494 | "comment": "",
495 | "htmlComment": "",
496 | "cycleId": 1,
497 | "cycleName": "Audit Test Cycle",
498 | "versionId": 10000,
499 | "versionName": "v1",
500 | "projectId": 10000,
501 | "issueId": 10001,
502 | "issueKey": "ZFJ-2",
503 | "summary": "test1",
504 | "label": "",
505 | "component": "c1"
506 | }
507 | }
508 |
509 | Retrieve all defects based on id.
510 |
511 | PathParam: id\*.
512 | GET /execution/{id}/defects
513 | {
514 | "id": 1,
515 | }
516 | < 200
517 | < Content-Type: application/json
518 | {
519 | "1": {
520 | "ZFJ-3": {
521 | "key": "ZFJ-3",
522 | "status": "Open",
523 | "summary": "test1"
524 | },
525 | "ZFJ-6": {
526 | "key": "ZFJ-6",
527 | "status": "Open",
528 | "summary": "test4"
529 | }
530 | }
531 | }
532 |
533 |
534 | Retrieve Execution count based on QueryParams.
535 |
536 | QueryParam(s): projectId, versionId, groupFld.
537 | GET /execution/count/
538 | > Content-Type: application/json
539 | {
540 | "groupFld": "cycle",
541 | "projectId": 10000,
542 | "versionId": "10000"
543 | }
544 | < 200
545 | < Content-Type: application/json
546 | {
547 | "groupFld": "cycle",
548 | "statusSeries": {
549 | "1": {
550 | "id": 1,
551 | "desc": "Test was executed and passed successfully.",
552 | "color": "#75B000",
553 | "name": "PASS"
554 | },
555 | "2": {
556 | "id": 2,
557 | "desc": "Test was executed and failed.",
558 | "color": "#CC3300",
559 | "name": "FAIL"
560 | },
561 | "3": {
562 | "id": 3,
563 | "desc": "Test execution is a work-in-progress.",
564 | "color": "#F2B000",
565 | "name": "WIP"
566 | },
567 | "4": {
568 | "id": 4,
569 | "desc": "The test execution of this test was blocked for some reason.",
570 | "color": "#6693B0",
571 | "name": "BLOCKED"
572 | },
573 | "-1": {
574 | "id": -1,
575 | "desc": "The test has not yet been executed.",
576 | "color": "#A0A0A0",
577 | "name": "UNEXECUTED"
578 | }
579 | },
580 | "urlBase": "TBD",
581 | "data": [
582 | {
583 | "id": 1,
584 | "cnt": {
585 | "1": 1,
586 | "2": 0,
587 | "3": 1,
588 | "4": 0,
589 | "total": 3,
590 | "-1": 1
591 | },
592 | "name": "Audit Logs Test Cycle"
593 | },
594 | {
595 | "id": 2,
596 | "cnt": {
597 | "1": 0,
598 | "2": 0,
599 | "3": 0,
600 | "4": 0,
601 | "total": 3,
602 | "-1": 3
603 | },
604 | "name": "Manage Filters"
605 | },
606 | {
607 | "id": -1,
608 | "cnt": {
609 | "1": 0,
610 | "2": 0,
611 | "3": 0,
612 | "4": 0,
613 | "total": 0,
614 | "-1": 0
615 | },
616 | "name": "Ad hoc"
617 | }
618 | ]
619 | }
620 |
621 |
622 | Retrieve Execution count based on QueryParams.
623 |
624 | QueryParam(s): projectId, daysPrevious, groupFld, periodName.
625 | GET /execution/count/
626 | > Content-Type: application/json
627 | {
628 | "daysprevious": 30,
629 | "periodName": "daily",
630 | "projectId": 10000,
631 | "groupFld": "timePeriod"
632 | }
633 | < 200
634 | < Content-Type: application/json
635 | {
636 | "data": {
637 | "1371886384394": {
638 | "1": 0,
639 | "2": 0,
640 | "3": 0,
641 | "4": 0,
642 | "total": 0,
643 | "executed": 0,
644 | "-1": 0
645 | },
646 | "1371972784394": {
647 | "1": 0,
648 | "2": 0,
649 | "3": 0,
650 | "4": 0,
651 | "total": 0,
652 | "executed": 0,
653 | "-1": 0
654 | },
655 | "1372059184394": {
656 | "1": 0,
657 | "2": 0,
658 | "3": 0,
659 | "4": 0,
660 | "total": 0,
661 | "executed": 0,
662 | "-1": 0
663 | },
664 | "1372145584394": {
665 | "1": 0,
666 | "2": 0,
667 | "3": 0,
668 | "4": 0,
669 | "total": 0,
670 | "executed": 0,
671 | "-1": 0
672 | },
673 | "1372231984394": {
674 | "1": 0,
675 | "2": 0,
676 | "3": 0,
677 | "4": 0,
678 | "total": 0,
679 | "executed": 0,
680 | "-1": 0
681 | },
682 | "1372318384394": {
683 | "1": 0,
684 | "2": 0,
685 | "3": 0,
686 | "4": 0,
687 | "total": 0,
688 | "executed": 0,
689 | "-1": 0
690 | }
691 | }
692 | }
693 |
694 |
695 | Retrieve status of indexing all executions.
696 |
697 | PathParam: token.
698 | GET /execution/indexStatus/{token}
699 | {
700 | "token": "1382097941490"
701 | }
702 | < 200
703 | < Content-Type: application/json
704 | {
705 | "took": "0 seconds",
706 | "status": "completed"
707 | }
708 |
709 | Retrieve top Executions with defects based on duration (days).
710 |
711 | QueryParam(s): projectId, versionId, issueStatuses ["3|1|4"], howMany [10].
712 | GET /execution/topDefects
713 | > Content-Type: application/json
714 | {
715 | "howMany": 5,
716 | "issueStatuses": "3|1|4",
717 | "projectId": 10000,
718 | "versionId": -1
719 | }
720 | < 200
721 | < Content-Type: application/json
722 | {
723 | "data": [
724 | {
725 | "defectId": 10104,
726 | "defectKey": "ZFJ-7",
727 | "defectSummary": "test1",
728 | "defectStatus": "Open",
729 | "testCount": 3,
730 | "associatedTestIds": [
731 | "10101",
732 | "10105",
733 | "10500"
734 | ]
735 | },
736 | {
737 | "defectId": 10103,
738 | "defectKey": "ZFJ-6",
739 | "defectSummary": "test2",
740 | "defectStatus": "Open",
741 | "testCount": 1,
742 | "associatedTestIds": [
743 | "10105"
744 | ]
745 | },
746 | {
747 | "defectId": 10107,
748 | "defectKey": "ZFJ-10",
749 | "defectSummary": "test3",
750 | "defectStatus": "Open",
751 | "testCount": 1,
752 | "associatedTestIds": [
753 | "10105"
754 | ]
755 | },
756 | {
757 | "defectId": 10200,
758 | "defectKey": "ZFJ-11",
759 | "defectSummary": "test4",
760 | "defectStatus": "Open",
761 | "testCount": 1,
762 | "associatedTestIds": [
763 | "10105"
764 | ]
765 | }
766 | ]
767 | }
768 |
769 |
770 | Add Test to Test Cycle.
771 | POST /execution/addTestsToCycle/
772 | > Content-Type: application/json
773 | {
774 | "issues": [
775 | "ZFJ-6"
776 | ],
777 | "versionId": 10000,
778 | "cycleId": "1",
779 | "projectId": "10000",
780 | "method": "1"
781 | }
782 | < 200
783 | < Content-Type: application/json
784 | {
785 | "warn": "The following just happened:
Tests added: ZFJ-6
786 |
These Tests could not be added
787 | Invalid: -
788 | Belongs to another project: -
789 | Already present in this Test Cycle: -
790 | Not a Test: -
"
791 | }
792 |
793 |
794 | Create a new Execution.
795 | POST /execution
796 | > Content-Type: application/json
797 | {
798 | "issueId": 10600,
799 | "versionId": "10000",
800 | "cycleId": "16",
801 | "projectId": 10000
802 | }
803 | < 200
804 | < Content-Type: application/json
805 | {
806 | "32": {
807 | "id": 32,
808 | "executionStatus": "-1",
809 | "comment": "",
810 | "htmlComment": "",
811 | "cycleId": 16,
812 | "cycleName": "Audit Test Cycle 3",
813 | "versionId": 10000,
814 | "versionName": "v1",
815 | "projectId": 10000,
816 | "issueId": 10600,
817 | "issueKey": "ZFJ-19",
818 | "summary": "test - check1",
819 | "label": "",
820 | "component": ""
821 | }
822 | }
823 |
824 |
825 | Perform a quick Execution by id.
826 |
827 | PathParam: id\*.
828 | POST /execution/{id}/quickExecute
829 | > Content-Type: application/json
830 | {
831 | "status": 3
832 | }
833 | < 200
834 | < Content-Type: application/json
835 | {
836 | "27": {
837 | "executedOn": "Today 12:51 PM",
838 | "executedBy": "admin",
839 | "executionId": 27
840 | }
841 | }
842 |
843 |
844 | Index all Executions.
845 | POST /execution/indexAll
846 | < 200
847 | < Content-Type: application/json
848 | {
849 | "token": 1382097614388
850 | }
851 |
852 |
853 | Reset Execution remote link values.
854 | POST /execution/refreshRemoteLinks/
855 | < 200
856 |
857 |
858 | Export Executions by zqlQuery.
859 |
860 | QueryParam(s): exportType, maxAllowedResult, expand, offset, zqlQuery, startIndex.
861 | POST /execution/export
862 | > Content-Type: application/json
863 | {
864 | "expand": "teststeps",
865 | "exportType": "xls",
866 | "maxAllowedResult": "true",
867 | "startIndex": 0,
868 | "zqlQuery": "executionStatus != 'UNEXECUTED' AND executedBy = admin"
869 | }
870 | < 200
871 | < Content-Type: application/json
872 | {
873 | "url": "http://localhost:2990/jira/plugins/servlet/export/exportAttachment?fileName=ZFJ-Executions-10-18-2013.xls"
874 | }
875 |
876 | Export Executions by zqlQuery and executions.
877 |
878 | QueryParam(s): exportType, maxAllowedResult, expand, offset, zqlQuery, startIndex.
879 | POST /execution/export
880 | > Content-Type: application/json
881 | {
882 | "exportType": "xls",
883 | "maxAllowedResult": "true",
884 | "expand": "teststeps",
885 | "startIndex": "0",
886 | "zqlQuery": "executionDate >= '-2d'",
887 | "executions": [
888 | 1,
889 | 27
890 | ]
891 | }
892 | < 200
893 | < Content-Type: application/json
894 | {
895 | "url": "http://localhost:2990/jira/plugins/servlet/export/exportAttachment?fileName=ZFJ-Executions-10-18-2013.xls"
896 | }
897 |
898 |
899 | Delete a Execution by its id.
900 |
901 | PathParam: id\*.
902 | DELETE /execution/{id}
903 | {
904 | "id": 32
905 | }
906 | < 200
907 | < Content-Type: application/json
908 | {
909 | "success": "Successfully deleted execution(s) 32"
910 | }
911 |
912 |
913 | Delete a bulk Executions.
914 | DELETE /execution/deleteExecutions
915 | < 200
916 | < Content-Type: application/json
917 | {
918 | "success": "[15, 24]",
919 | "error": "-"
920 | }
921 |
922 |
923 | Update bulk status of Executions.
924 | PUT /execution/updateBulkStatus
925 | > Content-Type: application/json
926 | {
927 | "executions": [
928 | "30",
929 | "28"
930 | ],
931 | "status": "-1",
932 | "stepStatus": "1"
933 | }
934 | < 200
935 | < Content-Type: application/json
936 | {
937 | "error": "-",
938 | "success": "All execution(s) were successfully updated."
939 | }
940 |
941 |
942 | Update bulk defects to Executions.
943 | PUT /execution/updateWithBulkDefects
944 | > Content-Type: application/json
945 | {
946 | "executions": [
947 | "24",
948 | "21"
949 | ],
950 | "defects": [
951 | "ZFJ-20"
952 | ],
953 | "detailedResponse": false
954 | }
955 | < 200
956 | {
957 | "24": {},
958 | "21": {}
959 | }
960 |
961 | Perform execution on a existing Execution by its id.
962 |
963 | PathParam: id\*.
964 | PUT /execution/{id}/execute
965 | > Content-Type: application/json
966 | {
967 | "status": "1"
968 | }
969 | < 200
970 | < Content-Type: application/json
971 | {
972 | "id": 4,
973 | "executionStatus": "1",
974 | "executedOn": "Today 6:21 PM",
975 | "executedBy": "admin",
976 | "executedByDisplay": "admin",
977 | "comment": "",
978 | "htmlComment": "",
979 | "cycleId": 3,
980 | "cycleName": "Audit Test Cycle 2",
981 | "versionId": 10000,
982 | "versionName": "v1",
983 | "projectId": 10000,
984 | "issueId": 10001,
985 | "issueKey": "ZFJ-2",
986 | "summary": "test1",
987 | "label": "",
988 | "component": "c1"
989 | }
990 |
991 |
992 | --
993 | Search Resource API(s)
994 | Following section describes the rest resources (API's) pertaining to SearchResource
995 | --
996 | Retrieve (Z)ephyr (Q)uery (L)anguage statements based on QueryParams.
997 |
998 | QueryParam(s):
999 |
1000 | zqlQuery\*, expand, maxRecords, startIndex. (2.0, 2.1)
1001 | zqlQuery\*, expand, maxRecords, offset. (2.2 or later)
1002 | GET /zql/executeSearch
1003 | > Content-Type: application/json
1004 | {
1005 | "expand": "executionStatus",
1006 | "maxRecords": 0,
1007 | "offset": 0,
1008 | "zqlQuery": "executionStatus != 'UNEXECUTED' AND executedBy = admin"
1009 | }
1010 | < 200
1011 | < Content-Type: application/json
1012 | {
1013 | "executions": [
1014 | {
1015 | "id": 24,
1016 | "cycleId": 13,
1017 | "cycleName": "CLONE - Audit Test Cycle 2",
1018 | "issueKey": "ZFJ-2",
1019 | "projectKey": "ZFJ",
1020 | "project": "ZFJ",
1021 | "priority": "Major",
1022 | "component": "c1",
1023 | "versionId": 10000,
1024 | "version": "v1",
1025 | "status": {
1026 | "id": 2,
1027 | "name": "FAIL",
1028 | "description": "Test was executed and failed.",
1029 | "color": "#CC3300",
1030 | "type": 0
1031 | },
1032 | "executedOn": "18/Oct/13",
1033 | "creationDate": "18/Oct/13",
1034 | "executedBy": "admin",
1035 | "executedByUserName": "admin"
1036 | },
1037 | {...},
1038 | {
1039 | "id": 1,
1040 | "cycleId": 1,
1041 | "cycleName": "Audit Test Cycle",
1042 | "issueKey": "ZFJ-2",
1043 | "projectKey": "ZFJ",
1044 | "project": "ZFJ",
1045 | "priority": "Major",
1046 | "component": "c1",
1047 | "versionId": 10000,
1048 | "version": "v1",
1049 | "status": {
1050 | "id": 1,
1051 | "name": "PASS",
1052 | "description": "Test was executed and passed successfully.",
1053 | "color": "#75B000",
1054 | "type": 0
1055 | },
1056 | "executedOn": "4/Oct/13",
1057 | "creationDate": "4/Oct/13",
1058 | "executedBy": "admin",
1059 | "executedByUserName": "admin"
1060 | }
1061 | ],
1062 | "executionStatuses": [
1063 | {
1064 | "id": 1,
1065 | "name": "PASS",
1066 | "description": "Test was executed and passed successfully.",
1067 | "color": "#75B000",
1068 | "type": 0
1069 | },
1070 | {
1071 | "id": 2,
1072 | "name": "FAIL",
1073 | "description": "Test was executed and failed.",
1074 | "color": "#CC3300",
1075 | "type": 0
1076 | },
1077 | {
1078 | "id": 3,
1079 | "name": "WIP",
1080 | "description": "Test execution is a work-in-progress.",
1081 | "color": "#F2B000",
1082 | "type": 0
1083 | },
1084 | {
1085 | "id": 4,
1086 | "name": "BLOCKED",
1087 | "description": "The test execution of this test was blocked for some reason.",
1088 | "color": "#6693B0",
1089 | "type": 0
1090 | },
1091 | {
1092 | "id": -1,
1093 | "name": "UNEXECUTED",
1094 | "description": "The test has not yet been executed.",
1095 | "color": "#A0A0A0",
1096 | "type": 0
1097 | }
1098 | ],
1099 | "stepExecutionStatuses": [
1100 | {
1101 | "id": 1,
1102 | "name": "PASS",
1103 | "description": "Test step was executed and passed successfully",
1104 | "color": "#75B000",
1105 | "type": 0
1106 | },
1107 | {
1108 | "id": 2,
1109 | "name": "FAIL",
1110 | "description": "Test step was executed and failed.",
1111 | "color": "#CC3300",
1112 | "type": 0
1113 | },
1114 | {
1115 | "id": 3,
1116 | "name": "WIP",
1117 | "description": "Test step execution is a work-in-progress.",
1118 | "color": "#F2B000",
1119 | "type": 0
1120 | },
1121 | {
1122 | "id": 4,
1123 | "name": "BLOCKED",
1124 | "description": "The Test step execution of this test was blocked for some reason.",
1125 | "color": "#6693B0",
1126 | "type": 0
1127 | },
1128 | {
1129 | "id": -1,
1130 | "name": "UNEXECUTED",
1131 | "description": "The Test step has not yet been executed.",
1132 | "color": "#A0A0A0",
1133 | "type": 0
1134 | }
1135 | ],
1136 | "offset": 0,
1137 | "currentIndex": 1,
1138 | "maxResultAllowed": 20,
1139 | "linksNew": [
1140 | 1
1141 | ],
1142 | "totalCount": 10,
1143 | "executionIds": []
1144 | }
1145 |
1146 |
1147 | Retrieve ZQL clauses.
1148 | GET /zql/clauses
1149 | < 200
1150 | < Content-Type: application/json
1151 | {
1152 | "clauses": [
1153 | "issue",
1154 | "component",
1155 | "priority",
1156 | "project",
1157 | "executionStatus",
1158 | "executedBy",
1159 | "cycleName",
1160 | "executionDate",
1161 | "creationDate",
1162 | "execution",
1163 | "fixVersion"
1164 | ]
1165 | }
1166 |
1167 |
1168 | Retrieve ZQL fields, reserved words and functions.
1169 | GET /zql/autoCompleteZQLJson
1170 | < 200
1171 | < Content-Type: application/json
1172 | {
1173 | "jqlFieldZ": "[{\"value\":\"component\",\"displayName\":\"component\",\"auto\":\"true\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\"],\"types\":[\"com.atlassian.jira.bc.project.component.ProjectComponent\"]},{\"value\":\"creationDate\",\"displayName\":\"creationDate\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\",\"<\",\"<=\",\">\",\">=\"],\"types\":[\"java.util.Date\"]},{\"value\":\"cycleName\",\"displayName\":\"cycleName\",\"auto\":\"true\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\"],\"types\":[\"com.thed.zephyr.je.model.Cycle\"]},{\"value\":\"executedBy\",\"displayName\":\"executedBy\",\"auto\":\"true\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\"],\"types\":[\"java.lang.String\"]},{\"value\":\"execution\",\"displayName\":\"execution\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\",\"<\",\"<=\",\">\",\">=\"],\"types\":[\"com.thed.zephyr.je.model.Schedule\"]},{\"value\":\"executionDate\",\"displayName\":\"executionDate\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\",\"<\",\"<=\",\">\",\">=\"],\"types\":[\"java.util.Date\"]},{\"value\":\"executionStatus\",\"displayName\":\"executionStatus\",\"auto\":\"true\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\"],\"types\":[\"com.thed.zephyr.je.config.model.ExecutionStatus\"]},{\"value\":\"fixVersion\",\"displayName\":\"fixVersion\",\"auto\":\"true\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"changed\",\"in\",\"was\",\"=\",\"!=\",\"not in\",\"<\",\"was not in\",\">\",\"<=\",\"was in\",\"is\",\"was not\",\">=\",\"is not\"],\"types\":[\"com.atlassian.jira.project.version.Version\"]},{\"value\":\"issue\",\"displayName\":\"issue\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\",\"<\",\"<=\",\">\",\">=\"],\"types\":[\"com.atlassian.jira.issue.Issue\"]},{\"value\":\"priority\",\"displayName\":\"priority\",\"auto\":\"true\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\",\"<\",\"<=\",\">\",\">=\"],\"types\":[\"com.atlassian.jira.issue.priority.Priority\"]},{\"value\":\"project\",\"displayName\":\"project\",\"auto\":\"true\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\"],\"types\":[\"com.atlassian.jira.project.Project\"]}]",
1174 | "reservedWords": "[\"greater\",\"for\",\"privileges\",\"float\",\"validate\",\"distinct\",\"of\",\"break\",\"defaults\",\"byte\",\"initial\",\"file\",\"noaudit\",\"empty\",\"on\",\"false\",\"boolean\",\"right\",\"option\",\"decrement\",\"limit\",\"else\",\"increment\",\"fetch\",\"equals\",\"or\",\"number\",\"table\",\"like\",\"create\",\"row\",\"declare\",\"not\",\"trans\",\"asc\",\"start\",\"session\",\"then\",\"view\",\"strict\",\"explain\",\"go\",\"unique\",\"desc\",\"raise\",\"exclusive\",\"before\",\"next\",\"inout\",\"goto\",\"date\",\"nowait\",\"escape\",\"mode\",\"character\",\"rownum\",\"union\",\"encoding\",\"delete\",\"current\",\"whenever\",\"left\",\"do\",\"null\",\"end\",\"min\",\"trigger\",\"intersection\",\"define\",\"max\",\"previous\",\"integer\",\"sqrt\",\"return\",\"true\",\"checkpoint\",\"divide\",\"join\",\"access\",\"alter\",\"field\",\"delimiter\",\"string\",\"exists\",\"modulo\",\"having\",\"public\",\"insert\",\"abort\",\"uid\",\"to\",\"last\",\"grant\",\"count\",\"transaction\",\"synonym\",\"inner\",\"char\",\"drop\",\"rename\",\"collate\",\"by\",\"where\",\"long\",\"identified\",\"prior\",\"function\",\"changed\",\"revoke\",\"after\",\"remainder\",\"values\",\"more\",\"commit\",\"when\",\"any\",\"power\",\"notin\",\"returns\",\"avg\",\"index\",\"execute\",\"minus\",\"select\",\"int\",\"double\",\"size\",\"rows\",\"and\",\"difference\",\"input\",\"default\",\"isempty\",\"intersect\",\"column\",\"exec\",\"output\",\"cf\",\"update\",\"raw\",\"connect\",\"set\",\"catch\",\"sum\",\"object\",\"from\",\"add\",\"collation\",\"while\",\"was\",\"share\",\"order\",\"isnull\",\"if\",\"less\",\"between\",\"all\",\"with\",\"is\",\"check\",\"alias\",\"resource\",\"lock\",\"into\",\"modify\",\"audit\",\"as\",\"multiply\",\"in\",\"decimal\",\"begin\",\"subtract\",\"immediate\",\"outer\",\"continue\",\"group\",\"user\",\"rowid\",\"first\"]",
1175 | "functionZ": "[]"
1176 | }
1177 |
1178 |
1179 | --
1180 | Attachment Resource API(s)
1181 | Following section describes the rest resources (API's) for fetching and uploading attachments.
1182 | To get attchment for a given entity (Execution or Its Stepresults) or upload, You would need its
1183 | id : Unique Identifier in DB
1184 | Type : `execution | stepresult`
1185 |
1186 | --
1187 | Retrieve attachment by Entity.
1188 |
1189 | QueryParam(s): entityId, entityType `execution | stepresult`.
1190 | GET /attachment/attachmentsByEntity
1191 | > Content-Type: application/json
1192 | {
1193 | "entityId": 13,
1194 | "entityType": "TESTSTEPRESULT"
1195 | }
1196 | < 200
1197 | < Content-Type: application/json
1198 | {
1199 | "data": [
1200 | {
1201 | "fileSize": "169916",
1202 | "fileId": "5",
1203 | "author": "admin",
1204 | "fileIcon": "image.gif",
1205 | "fileName": "config.png",
1206 | "dateCreated": "Today 11:10 AM",
1207 | "fileIconAltText": "PNG File"
1208 | }
1209 | ]
1210 | }
1211 |
1212 | Retrieve attachment by Entity.
1213 |
1214 | GET /attachment/attachmentsByEntity
1215 | > Content-Type: application/json
1216 | {
1217 | "entityId": 13,
1218 | "entityType": "execution"
1219 | }
1220 | < 200
1221 | < Content-Type: application/json
1222 | {
1223 | "data": [
1224 | {
1225 | "fileSize": "266976",
1226 | "fileId": "1",
1227 | "author": "admin",
1228 | "fileIcon": "image.gif",
1229 | "fileName": "Image 5.png",
1230 | "dateCreated": "15/Oct/13 4:34 PM",
1231 | "fileIconAltText": "PNG File"
1232 | }
1233 | ]
1234 | }
1235 |
1236 |
1237 | Delete attachment by id\*.
1238 | id : id of this attachment as retrieved in GET call
1239 | DELETE /attachment/{id}
1240 | {
1241 | "id": 5
1242 | }
1243 | < 200
1244 | {
1245 | "success": "Attachment config.png successfully deleted"
1246 | }
1247 |
1248 |
1249 | Add Attachment by Entity
1250 |
1251 | Post Params: entityType `execution | stepresult`.
1252 |
1253 | POST /attachment{?entityId,entityType}
1254 | > Content-Type: multipart/form-data
1255 | {
1256 | "entityId": 15,
1257 | "entityType": "EXECUTION"
1258 | }
1259 | < 200
1260 |
1261 |
1262 | --
1263 | Chart Resource API(s)
1264 | Following section describes the rest resources pertaining to ChartResource
1265 | --
1266 | Retrieve Issue status(es) per Project.
1267 |
1268 | QueryParam(s): projectId.
1269 | GET /zchart/issueStatuses
1270 | > Content-Type: application/json
1271 | {
1272 | "projectId": 10000
1273 | }
1274 | < 200
1275 | < Content-Type: application/json
1276 | {
1277 | "IssueStatusesOptionsList": [
1278 | {
1279 | "value": "6",
1280 | "label": "Closed"
1281 | },
1282 | {
1283 | "value": "3",
1284 | "label": "In Progress"
1285 | },
1286 | {
1287 | "value": "1",
1288 | "label": "Open"
1289 | },
1290 | {
1291 | "value": "4",
1292 | "label": "Reopened"
1293 | },
1294 | {
1295 | "value": "5",
1296 | "label": "Resolved"
1297 | }
1298 | ]
1299 | }
1300 |
1301 | Generate Tests CreatedData.
1302 |
1303 | QueryParam(s): daysPrevious, periodName, projectKey.
1304 | GET /zchart/testsCreated
1305 | > Content-Type: application/json
1306 | {
1307 | "daysPrevious" : "30",
1308 | "periodName" : "daily",
1309 | "projectKey" : "ZFJ"
1310 | }
1311 | < 200
1312 | < Content-Type: application/json
1313 | {
1314 | "TestsCreationMap": {
1315 | "1379743631889": 0,
1316 | "1379830031889": 0,
1317 | "1379916431889": 0,
1318 | "1380002831889": 0,
1319 | "1380089231889": 0,
1320 | "1380175631889": 0,
1321 | "1380262031889": 0,
1322 | "1380348431889": 0,
1323 | "1380434831889": 0,
1324 | "1380521231889": 0,
1325 | "1380607631889": 0,
1326 | "1380694031889": 0,
1327 | "1380780431889": 0,
1328 | "1380866831889": 1,
1329 | "1380953231889": 0,
1330 | "1381039631889": 0,
1331 | "1381126031889": 0,
1332 | "1381212431889": 0,
1333 | "1381298831889": 0,
1334 | "1381385231889": 6,
1335 | "1381471631889": 0,
1336 | "1381558031889": 0,
1337 | "1381644431889": 0,
1338 | "1381730831889": 0,
1339 | "1381817231889": 3,
1340 | "1381903631889": 1,
1341 | "1381990031889": 1,
1342 | "1382076431889": 0,
1343 | "1382162831889": 0,
1344 | "1382249231889": 0,
1345 | "1382335631889": 0
1346 | },
1347 | "TestsCreationCount": 12,
1348 | "TestsCreationPeriod": 30
1349 | }
1350 |
1351 | --
1352 | Execution Filter Resource API(s)
1353 | Following section describes the rest resources (API's) pertaining to ExecutionFilterResource
1354 | --
1355 | Retrieve an execution filter by id.
1356 |
1357 | PathParam: id\*.
1358 | GET /zql/executionFilter/{id}
1359 | {
1360 | "id": 20,
1361 | }
1362 | < 200
1363 | < Content-Type: application/json
1364 | {
1365 | "id": 20,
1366 | "creationDate": 1382085360222,
1367 | "executionCount": 5,
1368 | "createdBy": "admin",
1369 | "query": "executionStatus != \"UNEXECUTED\"",
1370 | "description": "",
1371 | "isFavorite": true,
1372 | "filterName": "Execution Filter 9",
1373 | "sharePerm": 1,
1374 | "popularity": 1
1375 | }
1376 |
1377 | Retrieve all execution filters by QueryParams.
1378 |
1379 | QueryParam(s): byUser: [true|false], fav: [true|false], offset, maxRecords.
1380 | GET /zql/executionFilter/
1381 | > Content-Type: application/json
1382 | {
1383 | "byUser": true,
1384 | "fav": true,
1385 | "offset": 0,
1386 | "maxRecords": 10
1387 | }
1388 | < 200
1389 | < Content-Type: application/json
1390 | [
1391 | {
1392 | "creationDate": 1374144921687,
1393 | "desc": "Executions by Project",
1394 | "scheduleCount": 1,
1395 | "createdBy": "admin",
1396 | "query": "Project= \"BlueZ\" AND CycleName = \"Audit Test Cycle\"",
1397 | "isFavorite": true,
1398 | "id": 2,
1399 | "filterName": "Executions by Project"
1400 | },
1401 | {
1402 | "creationDate": 1374157031104,
1403 | "desc": "Executions by Component",
1404 | "scheduleCount": 1,
1405 | "createdBy": "admin",
1406 | "query": "Component = \"Audit Impl\" AND CycleName = \"Audit Logs Test Cycle\" ",
1407 | "isFavorite": true,
1408 | "id": 3,
1409 | "filterName": "Executions by Component"
1410 | }
1411 | ]
1412 |
1413 | Retrieve the logged in user.
1414 | GET /zql/executionFilter/user
1415 | < 200
1416 | < Content-Type: application/json
1417 | {
1418 | "LOGGED_IN_USER": "admin"
1419 | }
1420 |
1421 | Retrieve all execution filters by QueryParams.
1422 |
1423 | QueryParam(s): filterName, owner, sharePerm[0|1|-1].
1424 |
1425 | (sharePerm: 0 - private execution filters, 1 - global execution filters, -1 - All private and global execution filters)
1426 | GET /zql/executionFilter/search
1427 | > Content-Type: application/json
1428 | {
1429 | "filterName": "All exec tests",
1430 | "owner" : "mike",
1431 | "sharePerm": 1
1432 | }
1433 | < 200
1434 | < Content-Type: application/json
1435 | [
1436 | {
1437 | "id": 9,
1438 | "creationDate": 1381822961990,
1439 | "currentIndex": 1,
1440 | "executionCount": 5,
1441 | "createdBy": "admin",
1442 | "maxResultAllowed": 20,
1443 | "totalCount": 8,
1444 | "query": "executionStatus != \"UNEXECUTED\"",
1445 | "description": "",
1446 | "isFavorite": true,
1447 | "filterName": "All exec tests",
1448 | "linksNew": [],
1449 | "sharePerm": 1,
1450 | "popularity": 1
1451 | },
1452 | {
1453 | "id": 27,
1454 | "creationDate": 1382085416677,
1455 | "currentIndex": 1,
1456 | "executionCount": 5,
1457 | "createdBy": "admin",
1458 | "maxResultAllowed": 20,
1459 | "totalCount": 8,
1460 | "query": "executionStatus != \"UNEXECUTED\"",
1461 | "description": "",
1462 | "isFavorite": true,
1463 | "filterName": "All exec tests 2",
1464 | "linksNew": [],
1465 | "sharePerm": 1,
1466 | "popularity": 1
1467 | }
1468 | ]
1469 |
1470 | Performs a quick search over all execution filters by it's name.
1471 |
1472 | QueryParam(s): query.
1473 | GET /zql/executionFilter/quickSearch
1474 | > Content-Type: application/json
1475 | {
1476 | "query": "exec"
1477 | }
1478 | < 200
1479 | < Content-Type: application/json
1480 | [
1481 | {
1482 | "id": 9,
1483 | "creationDate": 1381822961990,
1484 | "createdBy": "admin",
1485 | "query": "executionStatus != \"UNEXECUTED\"",
1486 | "description": "",
1487 | "filterName": "Execution Filter1"
1488 | },
1489 | {
1490 | "id": 27,
1491 | "creationDate": 1382085416677,
1492 | "createdBy": "admin",
1493 | "query": "executionStatus != \"UNEXECUTED\"",
1494 | "description": "",
1495 | "filterName": "Execution Filter2"
1496 | }
1497 | ]
1498 |
1499 |
1500 | Create a new execution filter.
1501 |
1502 | query\*, filterName\*
1503 | POST /zql/executionFilter/
1504 | > Content-Type: application/json
1505 | {
1506 | "query": "executionStatus != \"UNEXECUTED\" AND executedBy = admin AND project = ZFJ",
1507 | "filterName": "Execution Filter by Project",
1508 | "description": "Execution Filter by Project",
1509 | "isFavorite": true,
1510 | "sharePerm": "1"
1511 | }
1512 | < 200
1513 | < Content-Type: application/json
1514 | {
1515 | "success": "ZQL Filter created successfully."
1516 | }
1517 |
1518 | Create a new execution filter.
1519 |
1520 | query\*, filterName\*
1521 | POST /zql/executionFilter/
1522 | > Content-Type: application/json
1523 | {
1524 | "query": "executionDate >= '-2d",
1525 | "filterName": "executed in last 2days"
1526 | }
1527 | < 200
1528 | < Content-Type: application/json
1529 | {
1530 | "success": "ZQL Filter created successfully."
1531 | }
1532 |
1533 |
1534 | Remove an execution filter by id.
1535 |
1536 | PathParam: id\*.
1537 | DELETE /zql/executionFilter/{id}
1538 | < 200
1539 | < Content-Type: application/json
1540 | {
1541 | "success": "ZQL Filter deleted successfully."
1542 | }
1543 |
1544 | Copy the selected Execution Filter.
1545 |
1546 | id\*, filterName\*
1547 | PUT /zql/executionFilter/copy
1548 | > Content-Type: application/json
1549 | {
1550 | "id": 27,
1551 | "filterName": "Copy of Execution Filter"
1552 | }
1553 | < 200
1554 | < Content-Type: application/json
1555 | {
1556 | "success": "ZQL Filter copied successfully."
1557 | }
1558 |
1559 |
1560 | Copy the selected Execution Filter.
1561 |
1562 | id\*, filterName\*, isFavorite, sharePerm.
1563 | PUT /zql/executionFilter/copy
1564 | > Content-Type: application/json
1565 | {
1566 | "id": 27,
1567 | "filterName": "Copy of Execution Filter",
1568 | "isFavorite": false,
1569 | "sharePerm": 2
1570 | }
1571 | < 200
1572 | < Content-Type: application/json
1573 | {
1574 | "success": "ZQL Filter copied successfully."
1575 | }
1576 |
1577 |
1578 | Update an execution filter.
1579 |
1580 | id\*
1581 | PUT /zql/executionFilter/update
1582 | > Content-Type: application/json
1583 | {
1584 | "id": 29,
1585 | "filterName": "Execution Filter by Project",
1586 | "description": "",
1587 | "isFavorite": true,
1588 | "sharePerm": "1"
1589 | }
1590 | < 200
1591 | < Content-Type: application/json
1592 | {
1593 | "success": "ZQL Filter updated successfully."
1594 | }
1595 |
1596 |
1597 | Rename an execution filter.
1598 |
1599 | id\*
1600 | PUT /zql/executionFilter/rename
1601 | > Content-Type: application/json
1602 | {
1603 | "id": 28,
1604 | "filterName": "Execution Filter"
1605 | }
1606 | < 200
1607 | < Content-Type: application/json
1608 | {
1609 | "success": "ZQL Filter renamed successfully."
1610 | }
1611 |
1612 |
1613 | Add/Remove an execution filter to/from Favorite.
1614 |
1615 | id\*
1616 | PUT /zql/executionFilter/toggleFav
1617 | > Content-Type: application/json
1618 | {
1619 | "isFavorite": false,
1620 | "id": 30
1621 | }
1622 | < 200
1623 | < Content-Type: application/json
1624 | {
1625 | "success": "Favorite status toggled successfully."
1626 | }
1627 |
1628 | --
1629 | Execution Filter Auto Complete Resource API(s)
1630 | Following section describes rest resources (API's) pertaining to ExecutionFilteAutoCompleteResource
1631 | --
1632 | Retrieve values for autocomplete textbox based on fieldName.
1633 |
1634 | QueryParam(s): fieldName\*, fieldValue.
1635 | GET /zql/autocomplete
1636 | > Content-Type: application/json
1637 | {
1638 | "fieldName": "priority",
1639 | "fieldValue":
1640 | }
1641 | < 200
1642 | < Content-Type: application/json
1643 | {
1644 | "results": [
1645 | {
1646 | "value": "Blocker",
1647 | "displayName": "Blocker"
1648 | },
1649 | {
1650 | "value": "Critical",
1651 | "displayName": "Critical"
1652 | },
1653 | {
1654 | "value": "Major",
1655 | "displayName": "Major"
1656 | },
1657 | {
1658 | "value": "Minor",
1659 | "displayName": "Minor"
1660 | },
1661 | {
1662 | "value": "Trivial",
1663 | "displayName": "Trivial"
1664 | }
1665 | ]
1666 | }
1667 |
1668 |
1669 | Retrieve values for autocomplete textbox based on fieldName.
1670 |
1671 | QueryParam(s): fieldName\*, fieldValue.
1672 | GET /zql/autocomplete
1673 | > Content-Type: application/json
1674 | {
1675 | "fieldName": "executionStatus",
1676 | "fieldValue":
1677 | }
1678 | < 200
1679 | < Content-Type: application/json
1680 | {
1681 | "results": [
1682 | {
1683 | "value": "PASS",
1684 | "displayName": "PASS"
1685 | },
1686 | {
1687 | "value": "FAIL",
1688 | "displayName": "FAIL"
1689 | },
1690 | {
1691 | "value": "WIP",
1692 | "displayName": "WIP"
1693 | },
1694 | {
1695 | "value": "BLOCKED",
1696 | "displayName": "BLOCKED"
1697 | },
1698 | {
1699 | "value": "UNEXECUTED",
1700 | "displayName": "UNEXECUTED"
1701 | }
1702 | ]
1703 | }
1704 |
1705 |
1706 | --
1707 | License Resource API(s)
1708 | Following section describes the rest resources (API's) pertaining to Zephyr for JIRA LicenseResource
1709 | --
1710 | Retrieve License Details.
1711 | GET /license
1712 | > Content-Type: application/json
1713 | < 200
1714 | < Content-Type: application/json
1715 | {
1716 | "customerId": "XYZ",
1717 | "expDateFormatted": "31/Dec/13 6:30 PM",
1718 | "expDate": 1388494800000,
1719 | "isEval": "false",
1720 | "licenseInformation": "Plugin license for Zephyr testing
Support available until (31/Dec/13 6:30 PM )"
1721 | }
1722 |
1723 | --
1724 | UTIL Resource API(s)
1725 | Following section describes the rest resources related to common utility API(s)
1726 | --
1727 | Retrieve all Projects.
1728 | GET /util/project-list
1729 | > Content-Type: application/json
1730 | < 200
1731 | < Content-Type: application/json
1732 | {
1733 | "options": [
1734 | {
1735 | "value": "10000",
1736 | "label": "ZFJ"
1737 | },
1738 | {
1739 | "value": "10100",
1740 | "label": "Введите"
1741 | }
1742 | ]
1743 | }
1744 |
1745 | Retrieve all Versions based on QueryParams.
1746 |
1747 | QueryParam(s): projectId, versionId, showUnscheduled.
1748 | GET /util/versionBoard-list
1749 | > Content-Type: application/json
1750 | {
1751 | "projectId": 10000,
1752 | "showUnscheduled": false
1753 | }
1754 | < 200
1755 | < Content-Type: application/json
1756 | {
1757 | "versionOptions": [
1758 | {
1759 | "value": "-1",
1760 | "label": "Unscheduled"
1761 | },
1762 | {
1763 | "value": "10000",
1764 | "label": "v1"
1765 | },
1766 | {
1767 | "value": "10100",
1768 | "label": "Разрешенный"
1769 | }
1770 | ]
1771 | }
1772 |
1773 |
1774 | Retrieve Miscellaneous Data i.e. Execution Statuses, Priorities, Components.
1775 |
1776 | QueryParam(s): projectId*.
1777 | GET /util/cycleCriteriaInfo
1778 | {
1779 | 'projectId' : 10000
1780 | }
1781 | < 200
1782 | < Content-Type: application/json
1783 | {
1784 | "components": [
1785 | {
1786 | "id": 10000,
1787 | "name": "c1"
1788 | },
1789 | {
1790 | "id": 10100,
1791 | "name": "целый"
1792 | }
1793 | ],
1794 | "priorities": [
1795 | {
1796 | "id": "1",
1797 | "desc": "Blocks development and/or testing work, production could not run.",
1798 | "name": "Blocker"
1799 | },
1800 | {
1801 | "id": "2",
1802 | "desc": "Crashes, loss of data, severe memory leak.",
1803 | "name": "Critical"
1804 | },
1805 | {
1806 | "id": "3",
1807 | "desc": "Major loss of function.",
1808 | "name": "Major"
1809 | },
1810 | {
1811 | "id": "4",
1812 | "desc": "Minor loss of function, or other problem where easy workaround is present.",
1813 | "name": "Minor"
1814 | },
1815 | {
1816 | "id": "5",
1817 | "desc": "Cosmetic problem like misspelt words or misaligned text.",
1818 | "name": "Trivial"
1819 | }
1820 | ],
1821 | "labels": [
1822 | {
1823 | "id": "Label1",
1824 | "name": "Label1"
1825 | }
1826 | ],
1827 | "issueStatuses": [
1828 | {
1829 | "id": "6",
1830 | "name": "Closed"
1831 | },
1832 | {
1833 | "id": "3",
1834 | "name": "In Progress"
1835 | },
1836 | {
1837 | "id": "1",
1838 | "name": "Open"
1839 | },
1840 | {
1841 | "id": "4",
1842 | "name": "Reopened"
1843 | },
1844 | {
1845 | "id": "5",
1846 | "name": "Resolved"
1847 | }
1848 | ],
1849 | "executionStatuses": [
1850 | {
1851 | "id": -1,
1852 | "desc": "The test has not yet been executed.",
1853 | "color": "#A0A0A0",
1854 | "name": "UNEXECUTED"
1855 | },
1856 | {
1857 | "id": 1,
1858 | "desc": "Test was executed and passed successfully.",
1859 | "color": "#75B000",
1860 | "name": "PASS"
1861 | },
1862 | {
1863 | "id": 2,
1864 | "desc": "Test was executed and failed.",
1865 | "color": "#CC3300",
1866 | "name": "FAIL"
1867 | },
1868 | {
1869 | "id": 3,
1870 | "desc": "Test execution is a work-in-progress.",
1871 | "color": "#F2B000",
1872 | "name": "WIP"
1873 | },
1874 | {
1875 | "id": 4,
1876 | "desc": "The test execution of this test was blocked for some reason.",
1877 | "color": "#6693B0",
1878 | "name": "BLOCKED"
1879 | }
1880 | ]
1881 | }
1882 |
1883 |
1884 | Retrieve all Test executionStatus(es).
1885 | GET /util/testExecutionStatus
1886 | < 200
1887 | < Content-Type: application/json
1888 | [
1889 | {
1890 | "id": 1,
1891 | "name": "PASS",
1892 | "description": "Test was executed and passed successfully.",
1893 | "color": "#75B000",
1894 | "type": 0
1895 | },
1896 | {
1897 | "id": 2,
1898 | "name": "FAIL",
1899 | "description": "Test was executed and failed.",
1900 | "color": "#CC3300",
1901 | "type": 0
1902 | },
1903 | {
1904 | "id": 3,
1905 | "name": "WIP",
1906 | "description": "Test execution is a work-in-progress.",
1907 | "color": "#F2B000",
1908 | "type": 0
1909 | },
1910 | {
1911 | "id": 4,
1912 | "name": "BLOCKED",
1913 | "description": "The test execution of this test was blocked for some reason.",
1914 | "color": "#6693B0",
1915 | "type": 0
1916 | },
1917 | {
1918 | "id": -1,
1919 | "name": "UNEXECUTED",
1920 | "description": "The test has not yet been executed.",
1921 | "color": "#A0A0A0",
1922 | "type": 0
1923 | }
1924 | ]
1925 |
1926 |
1927 | Retrieve all TeststepResult executionStatus(es).
1928 | GET /util/teststepExecutionStatus
1929 | < 200
1930 | < Content-Type: application/json
1931 | [
1932 | {
1933 | "id": 1,
1934 | "name": "PASS",
1935 | "description": "Test step was executed and passed successfully",
1936 | "color": "#75B000",
1937 | "type": 0
1938 | },
1939 | {
1940 | "id": 2,
1941 | "name": "FAIL",
1942 | "description": "Test step was executed and failed.",
1943 | "color": "#CC3300",
1944 | "type": 0
1945 | },
1946 | {
1947 | "id": 3,
1948 | "name": "WIP",
1949 | "description": "Test step execution is a work-in-progress.",
1950 | "color": "#F2B000",
1951 | "type": 0
1952 | },
1953 | {
1954 | "id": 4,
1955 | "name": "BLOCKED",
1956 | "description": "The Test step execution of this test was blocked for some reason.",
1957 | "color": "#6693B0",
1958 | "type": 0
1959 | },
1960 | {
1961 | "id": -1,
1962 | "name": "UNEXECUTED",
1963 | "description": "The Test step has not yet been executed.",
1964 | "color": "#A0A0A0",
1965 | "type": 0
1966 | }
1967 | ]
1968 |
1969 |
1970 | Retrieve all dashboards.
1971 | GET /util/dashboard
1972 | < 200
1973 | [
1974 | {
1975 | "id": 10000,
1976 | "name": "System Dashboard"
1977 | },
1978 | {
1979 | "id": 10400,
1980 | "name": "ZFJ Dashboard"
1981 | }
1982 | ]
1983 |
1984 |
1985 | Retrieve dashboard(s) by name.
1986 |
1987 | QueryParams: name, limit [15].
1988 | GET /util/dashboard
1989 | > Content-Type: application/json
1990 | {
1991 | "name": "System Dashboard",
1992 | "limit": 10
1993 | }
1994 | < 200
1995 | [
1996 | {
1997 | "id": 10000,
1998 | "name": "System Dashboard"
1999 | }
2000 | ]
2001 |
2002 |
2003 | --
2004 | Testcase Resource API(s)
2005 | Following section describes rest resources pertaining to TestcaseResource
2006 | --
2007 |
2008 | Retrieve Test counts by QueryParams.
2009 |
2010 | QueryParam(s): projectId\*, versionId, groupFld ("user" | "component") defaults to ["user"].
2011 | GET /test/count
2012 | > Content-Type: application/json
2013 | {
2014 | "groupFld": "component",
2015 | "projectId": 10000,
2016 | "versionId": 10000
2017 | }
2018 | < 200
2019 | < Content-Type: application/json
2020 | {
2021 | "groupFld": "component",
2022 | "urlBase": "TBD",
2023 | "data": [
2024 | {
2025 | "id": 10000,
2026 | "cnt": 0,
2027 | "name": "Audit Logs Impl"
2028 | },
2029 | {
2030 | "id": 10001,
2031 | "cnt": 0,
2032 | "name": "Manage Filters Impl"
2033 | },
2034 | {
2035 | "id": -1,
2036 | "cnt": 0,
2037 | "name": "No Component"
2038 | }
2039 | ]
2040 | }
2041 |
2042 |
2043 | Retrieve Test counts by QueryParams.
2044 |
2045 | QueryParam(s): projectId\*, versionId, groupFld ("user" | "component") defaults to ["user"].
2046 | GET /test/count
2047 | > Content-Type: application/json
2048 | {
2049 | "groupFld": "user",
2050 | "projectId": 10000,
2051 | "versionId": 10000
2052 | }
2053 | < 200
2054 | < Content-Type: application/json
2055 | {
2056 | "groupFld": "user",
2057 | "urlBase": "TBD",
2058 | "data": [
2059 | {
2060 | "id": "admin",
2061 | "cnt": 12,
2062 | "name": "admin"
2063 | }
2064 | ]
2065 | }
2066 |
2067 |
2068 | Retrieve Test by saved search filter id.
2069 |
2070 | PathParam: id\*.
2071 | GET /test/mySearches/{id}/
2072 | {
2073 | "id": 10100,
2074 | }
2075 | < 200
2076 | < Content-Type: application/json
2077 | {
2078 | "count": 12
2079 | }
2080 |
2081 |
2082 | --
2083 | TestStep Resource API(s)
2084 | Following section describes the rest resources pertaining to TestStepResource
2085 | --
2086 |
2087 | Retrieve Teststeps by issueId.
2088 |
2089 | PathParam: issueId*.
2090 | GET /teststep/{issueId}/
2091 | {
2092 | "issueId": 10105
2093 | }
2094 | < 200
2095 | < Content-Type: application/json
2096 | [
2097 | {
2098 | "id": 4,
2099 | "orderId": 1,
2100 | "step": "step1",
2101 | "data": "username",
2102 | "result": "success",
2103 | "htmlStep": "step1",
2104 | "htmlData": "username",
2105 | "htmlResult": "success"
2106 | }
2107 | ]
2108 |
2109 |
2110 | Retrieve Teststeps by issueId and testStep id.
2111 |
2112 | PathParam: issueId\*, id\*.
2113 | GET /teststep/{issueId}/{id}
2114 | {
2115 | "id": 4,
2116 | "issueId": 10105
2117 | }
2118 | < 200
2119 | < Content-Type: application/json
2120 | {
2121 | "id": 4,
2122 | "orderId": 1,
2123 | "step": "step1",
2124 | "data": "username",
2125 | "result": "success",
2126 | "htmlStep": "step1",
2127 | "htmlData": "username",
2128 | "htmlResult": "success"
2129 | }
2130 |
2131 |
2132 | Create a Teststep for issueId.
2133 |
2134 | PathParam: issueId\*.
2135 | POST /teststep/{issueId}
2136 | > Content-Type: application/json
2137 | {
2138 | "step": "validate username",
2139 | "data": "username",
2140 | "result": "success"
2141 | }
2142 | < 200
2143 | < Content-Type: application/json
2144 | {
2145 | "id": 10,
2146 | "orderId": 1,
2147 | "step": "validate username",
2148 | "data": "username",
2149 | "result": "success",
2150 | "htmlStep": "validate username",
2151 | "htmlData": "username",
2152 | "htmlResult": "success"
2153 | }
2154 |
2155 |
2156 | Moves a Teststep by teststep id and issueId with position/after.
2157 |
2158 | PathParam: issueId\*, id\*.
2159 | POST /teststep/{issueId}/{id}/move
2160 | > Content-Type: application/json
2161 | {
2162 | "position": "First"
2163 | }
2164 | < 200
2165 | < Content-Type: application/json
2166 | [
2167 | {
2168 | "id": 21,
2169 | "orderId": 1,
2170 | "step": "Validate password",
2171 | "data": "password",
2172 | "result": "success",
2173 | "htmlStep": "Validate password",
2174 | "htmlData": "password",
2175 | "htmlResult": "success"
2176 | },
2177 | {
2178 | "id": 20,
2179 | "orderId": 2,
2180 | "step": "Validate email",
2181 | "data": "email",
2182 | "result": "success",
2183 | "htmlStep": "Validate email",
2184 | "htmlData": "email",
2185 | "htmlResult": "success"
2186 | },
2187 | {
2188 | "id": 19,
2189 | "orderId": 3,
2190 | "step": "Validate username",
2191 | "data": "username",
2192 | "result": "success",
2193 | "htmlStep": "Validate username",
2194 | "htmlData": "username",
2195 | "htmlResult": "success"
2196 | }
2197 | ]
2198 |
2199 |
2200 | Moves a Teststep by teststep id and issueId with position/after.
2201 |
2202 | PathParam: issueId\*, id\*.
2203 | POST /teststep/{issueId}/{id}/move
2204 | > Content-Type: application/json
2205 | {
2206 | "after": "/jira/rest/zephyr/latest/teststep/10103/21"
2207 | }
2208 | < 200
2209 | < Content-Type: application/json
2210 | [
2211 | {
2212 | "id": 19,
2213 | "orderId": 1,
2214 | "step": "Validate username",
2215 | "data": "username",
2216 | "result": "success",
2217 | "htmlStep": "Validate username",
2218 | "htmlData": "username",
2219 | "htmlResult": "success"
2220 | },
2221 | {
2222 | "id": 21,
2223 | "orderId": 2,
2224 | "step": "Validate password",
2225 | "data": "password",
2226 | "result": "success",
2227 | "htmlStep": "Validate password",
2228 | "htmlData": "password",
2229 | "htmlResult": "success"
2230 | },
2231 | {
2232 | "id": 20,
2233 | "orderId": 3,
2234 | "step": "Validate email",
2235 | "data": "email",
2236 | "result": "success",
2237 | "htmlStep": "Validate email",
2238 | "htmlData": "email",
2239 | "htmlResult": "success"
2240 | }
2241 | ]
2242 |
2243 |
2244 | Delete a Teststep by pathParam issueId and testStep id
2245 |
2246 | PathParam: issueId\*, id\*.
2247 | DELETE /teststep/{issueId}/{id}
2248 | > Content-Type: application/json
2249 | {
2250 | "id": 14
2251 | }
2252 | < 200
2253 |
2254 |
2255 | Update Teststep by issueId and testStep id.
2256 |
2257 | PathParam: issueId, id\*.
2258 | PUT /teststep/{issueId}/{id}
2259 | > Content-Type: application/json
2260 | {
2261 | "id": 15,
2262 | "step": "validate username",
2263 | "data": "username",
2264 | "result": "success"
2265 | }
2266 | < 200
2267 | < Content-Type: application/json
2268 | {
2269 | "id": 15,
2270 | "orderId": 1,
2271 | "step": "validate username",
2272 | "data": "username",
2273 | "result": "success",
2274 | "htmlStep": "validate username",
2275 | "htmlData": "username",
2276 | "htmlResult": "success "
2277 | }
2278 |
2279 |
2280 | --
2281 | StepResult Resource API(s)
2282 | Following section describes the rest resources pertaining to StepResultResource
2283 | --
2284 |
2285 | Retrieve Stepresults by QueryParams.
2286 |
2287 | QueryParam(s): executionId\*, expand.
2288 | GET /stepResult
2289 | > Content-Type: application/json
2290 | {
2291 | "expand": "executionStatus",
2292 | "executionId": 34
2293 | }
2294 | < 200
2295 | < Content-Type: application/json
2296 | [
2297 | {
2298 | "id": 28,
2299 | "executedOn": 1382359263886,
2300 | "status": "1",
2301 | "htmlComment": "",
2302 | "executedBy": "admin",
2303 | "executionId": 34,
2304 | "stepId": 10,
2305 | "executionStatus": [
2306 | {
2307 | "id": 1,
2308 | "name": "PASS",
2309 | "description": "Test step was executed and passed successfully",
2310 | "color": "#75B000",
2311 | "type": 0
2312 | },
2313 | {
2314 | "id": 2,
2315 | "name": "FAIL",
2316 | "description": "Test step was executed and failed.",
2317 | "color": "#CC3300",
2318 | "type": 0
2319 | },
2320 | {
2321 | "id": 3,
2322 | "name": "WIP",
2323 | "description": "Test step execution is a work-in-progress.",
2324 | "color": "#F2B000",
2325 | "type": 0
2326 | },
2327 | {
2328 | "id": 4,
2329 | "name": "BLOCKED",
2330 | "description": "The Test step execution of this test was blocked for some reason.",
2331 | "color": "#6693B0",
2332 | "type": 0
2333 | },
2334 | {
2335 | "id": -1,
2336 | "name": "UNEXECUTED",
2337 | "description": "The Test step has not yet been executed.",
2338 | "color": "#A0A0A0",
2339 | "type": 0
2340 | }
2341 | ],
2342 | "defects": []
2343 | },
2344 | {
2345 | "id": 29,
2346 | "executedOn": 1382359267300,
2347 | "status": "1",
2348 | "htmlComment": "",
2349 | "executedBy": "admin",
2350 | "executionId": 34,
2351 | "stepId": 11,
2352 | "executionStatus": [
2353 | {
2354 | "id": 1,
2355 | "name": "PASS",
2356 | "description": "Test step was executed and passed successfully",
2357 | "color": "#75B000",
2358 | "type": 0
2359 | },
2360 | {
2361 | "id": 2,
2362 | "name": "FAIL",
2363 | "description": "Test step was executed and failed.",
2364 | "color": "#CC3300",
2365 | "type": 0
2366 | },
2367 | {
2368 | "id": 3,
2369 | "name": "WIP",
2370 | "description": "Test step execution is a work-in-progress.",
2371 | "color": "#F2B000",
2372 | "type": 0
2373 | },
2374 | {
2375 | "id": 4,
2376 | "name": "BLOCKED",
2377 | "description": "The Test step execution of this test was blocked for some reason.",
2378 | "color": "#6693B0",
2379 | "type": 0
2380 | },
2381 | {
2382 | "id": -1,
2383 | "name": "UNEXECUTED",
2384 | "description": "The Test step has not yet been executed.",
2385 | "color": "#A0A0A0",
2386 | "type": 0
2387 | }
2388 | ],
2389 | "defects": []
2390 | },
2391 | {
2392 | "id": 30,
2393 | "executedOn": 1382359269820,
2394 | "status": "1",
2395 | "htmlComment": "",
2396 | "executedBy": "admin",
2397 | "executionId": 34,
2398 | "stepId": 12,
2399 | "executionStatus": [
2400 | {
2401 | "id": 1,
2402 | "name": "PASS",
2403 | "description": "Test step was executed and passed successfully",
2404 | "color": "#75B000",
2405 | "type": 0
2406 | },
2407 | {
2408 | "id": 2,
2409 | "name": "FAIL",
2410 | "description": "Test step was executed and failed.",
2411 | "color": "#CC3300",
2412 | "type": 0
2413 | },
2414 | {
2415 | "id": 3,
2416 | "name": "WIP",
2417 | "description": "Test step execution is a work-in-progress.",
2418 | "color": "#F2B000",
2419 | "type": 0
2420 | },
2421 | {
2422 | "id": 4,
2423 | "name": "BLOCKED",
2424 | "description": "The Test step execution of this test was blocked for some reason.",
2425 | "color": "#6693B0",
2426 | "type": 0
2427 | },
2428 | {
2429 | "id": -1,
2430 | "name": "UNEXECUTED",
2431 | "description": "The Test step has not yet been executed.",
2432 | "color": "#A0A0A0",
2433 | "type": 0
2434 | }
2435 | ],
2436 | "defects": []
2437 | }
2438 | ]
2439 |
2440 | Retrieve Stepresult by id.
2441 |
2442 | PathParam: id\*.
2443 |
2444 | QueryParam(s): expand.
2445 | GET /stepResult/{id}
2446 | {
2447 | "expand": "executionStatus"
2448 | }
2449 | < 200
2450 | < Content-Type: application/json
2451 | {
2452 | "id": 3,
2453 | "executedOn": 1380880581896,
2454 | "status": "1",
2455 | "htmlComment": "",
2456 | "executedBy": "admin",
2457 | "executionId": 3,
2458 | "stepId": 1,
2459 | "executionStatus": [
2460 | {
2461 | "id": 1,
2462 | "name": "PASS",
2463 | "description": "Test step was executed and passed successfully",
2464 | "color": "#75B000",
2465 | "type": 0
2466 | },
2467 | {
2468 | "id": 2,
2469 | "name": "FAIL",
2470 | "description": "Test step was executed and failed.",
2471 | "color": "#CC3300",
2472 | "type": 0
2473 | },
2474 | {
2475 | "id": 3,
2476 | "name": "WIP",
2477 | "description": "Test step execution is a work-in-progress.",
2478 | "color": "#F2B000",
2479 | "type": 0
2480 | },
2481 | {
2482 | "id": 4,
2483 | "name": "BLOCKED",
2484 | "description": "The Test step execution of this test was blocked for some reason.",
2485 | "color": "#6693B0",
2486 | "type": 0
2487 | },
2488 | {
2489 | "id": -1,
2490 | "name": "UNEXECUTED",
2491 | "description": "The Test step has not yet been executed.",
2492 | "color": "#A0A0A0",
2493 | "type": 0
2494 | }
2495 | ],
2496 | "defects": []
2497 | }
2498 |
2499 |
2500 | Retrieve step defects for a Stepresult by stepResult id and executionId.
2501 |
2502 | PathParam: id\*.
2503 |
2504 | QueryParam: executionId.
2505 | GET /stepResult/{id}/defects
2506 | > Content-Type: application/json
2507 | {
2508 | "executionId": 34
2509 | }
2510 | < 200
2511 | < Content-Type: application/json
2512 | {
2513 | "28": {
2514 | "ZFJ-21": {
2515 | "key": "ZFJ-21",
2516 | "status": "Open",
2517 | "summary": "test - check - steps"
2518 | }
2519 | }
2520 | }
2521 |
2522 |
2523 | Create a quick stepResult by id.
2524 |
2525 | PathParam: id\*.
2526 | POST /stepResult/{id}/quickExecute
2527 | > Content-Type: application/json
2528 | {
2529 | "status": 1
2530 | }
2531 | < 200
2532 | < Content-Type: application/json
2533 | {
2534 | "27": {
2535 | "executedOn": "Today 12:51 PM",
2536 | "executedBy": "admin",
2537 | "executionId": 27
2538 | }
2539 | }
2540 |
2541 |
2542 | Update a Stepresult by stepResult id.
2543 |
2544 | PathParam: id\*.
2545 | PUT /stepResult/{id}
2546 | > Content-Type: application/json
2547 | {
2548 | "id": 28,
2549 | "issueId": "10100",
2550 | "executionId": 34,
2551 | "status": "1",
2552 | "defectList": [
2553 | "ZFJ-3"
2554 | ],
2555 | "updateDefectList": "true"
2556 | }
2557 | < 200
2558 | < Content-Type: application/json
2559 | {
2560 | "id": 28,
2561 | "htmlComment": "",
2562 | "executedBy": "admin",
2563 | "status": "1",
2564 | "executionId": 34,
2565 | "comment": "",
2566 | "stepId": 10
2567 | }
2568 |
2569 |
2570 | --
2571 | FilterPicker Resource API(s)
2572 | Following section describes the rest resources pertaining to FilterPickerResource
2573 | --
2574 |
2575 | Retrieve any saved test search filters.
2576 | GET /picker/filters
2577 | < 200
2578 | < Content-Type: application/json
2579 | {
2580 | "id": "filt-1",
2581 | "label": "Filter Search",
2582 | "type": "optgroup",
2583 | "weight": "0",
2584 | "options": [
2585 | {
2586 | "id": "10100",
2587 | "label": "Test Filter1",
2588 | "value": "Test Filter1",
2589 | "type": "option",
2590 | "icon": ""
2591 | },
2592 | {
2593 | "id": "10000",
2594 | "label": "Test Filter2",
2595 | "value": "Test Filter2",
2596 | "type": "option",
2597 | "icon": ""
2598 | }
2599 | ]
2600 | }
2601 |
2602 | Retrieve any saved test search filters by query.
2603 |
2604 | QueryParam(s): query.
2605 | GET /picker/filters
2606 | > Content-Type: application/json
2607 | {
2608 | "query": "test"
2609 | }
2610 | < 200
2611 | < Content-Type: application/json
2612 | {
2613 | "id": "filt-1",
2614 | "label": "Filter Search",
2615 | "type": "optgroup",
2616 | "weight": "0",
2617 | "options": [
2618 | {
2619 | "id": "10100",
2620 | "label": "Test Filter",
2621 | "value": "Test Filter",
2622 | "type": "option",
2623 | "icon": ""
2624 | }
2625 | ]
2626 | }
2627 |
2628 | --
2629 | IssuePicker Resource API(s)
2630 | Following section describes the rest resources pertaining to IssuePickerResource
2631 | --
2632 |
2633 | Retrieve Test Issues.
2634 | GET /issues
2635 | < 200
2636 | < Content-Type: application/json
2637 | {
2638 | "sections": [
2639 | {
2640 | "label": "History Search",
2641 | "sub": "Showing 9 of 9 matching issues",
2642 | "id": "hs",
2643 | "issues": [
2644 | {
2645 | "key": "ZFJ-6",
2646 | "keyHtml": "ZFJ-6",
2647 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2648 | "summary": "test4",
2649 | "summaryText": "test4"
2650 | },
2651 | {
2652 | "key": "ZFJ-22",
2653 | "keyHtml": "ZFJ-22",
2654 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2655 | "summary": "test - check - attachement",
2656 | "summaryText": "test - check - attachement"
2657 | },
2658 | {
2659 | "key": "ZFJ-2",
2660 | "keyHtml": "ZFJ-2",
2661 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2662 | "summary": "test1",
2663 | "summaryText": "test1"
2664 | },
2665 | {
2666 | "key": "SD-3",
2667 | "keyHtml": "SD-3",
2668 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2669 | "summary": "test - check - steps",
2670 | "summaryText": "test - check - steps"
2671 | },
2672 | {
2673 | "key": "ZFJ-3",
2674 | "keyHtml": "ZFJ-3",
2675 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2676 | "summary": "test1",
2677 | "summaryText": "test1"
2678 | },
2679 | {
2680 | "key": "ZFJ-15",
2681 | "keyHtml": "ZFJ-15",
2682 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2683 | "summary": "test-15/10",
2684 | "summaryText": "test-15/10"
2685 | },
2686 | {
2687 | "key": "SD-2",
2688 | "keyHtml": "SD-2",
2689 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2690 | "summary": " Введите - 1",
2691 | "summaryText": " Введите - 1"
2692 | },
2693 | {
2694 | "key": "SD-1",
2695 | "keyHtml": "SD-1",
2696 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2697 | "summary": "Введите",
2698 | "summaryText": "Введите"
2699 | },
2700 | {
2701 | "key": "ZFJ-4",
2702 | "keyHtml": "ZFJ-4",
2703 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2704 | "summary": "test2",
2705 | "summaryText": "test2"
2706 | }
2707 | ]
2708 | }
2709 | ]
2710 | }
2711 |
2712 |
2713 | Retrieve Test Issues by QueryParams.
2714 |
2715 | QueryParam(s): query, currentJQL, currentIssueKey, currentProjectId, showSubTasks, showSubTaskParent
2716 | GET /issues
2717 | > Content-Type: application/json
2718 | {
2719 | "currentIssueKey": ,
2720 | "currentJQL": "type=Test",
2721 | "currentProjectId": 10000,
2722 | "query": "test"
2723 | }
2724 | < 200
2725 | < Content-Type: application/json
2726 | {
2727 | "sections": [
2728 | {
2729 | "label": "History Search",
2730 | "sub": "Showing 2 of 2 matching issues",
2731 | "id": "hs",
2732 | "issues": [
2733 | {
2734 | "key": "ZFJ-8",
2735 | "keyHtml": "ZFJ-8",
2736 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2737 | "summary": "test1",
2738 | "summaryText": "test1"
2739 | },
2740 | {
2741 | "key": "ZFJ-7",
2742 | "keyHtml": "ZFJ-7",
2743 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2744 | "summary": "test2",
2745 | "summaryText": "test2"
2746 | }
2747 | ]
2748 | },
2749 | {
2750 | "label": "Current Search",
2751 | "sub": "Showing 2 of 2 matching issues",
2752 | "id": "cs",
2753 | "issues": [
2754 | {
2755 | "key": "ZFJ-7",
2756 | "keyHtml": "ZFJ-7",
2757 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2758 | "summary": "test1",
2759 | "summaryText": "test1"
2760 | },
2761 | {
2762 | "key": "ZFJ-8",
2763 | "keyHtml": "ZFJ-8",
2764 | "img": "/download/resources/com.thed.zephyr.je/images/icons/ico_zephyr_issuetype.png",
2765 | "summary": "test2",
2766 | "summaryText": "test2"
2767 | }
2768 | ]
2769 | }
2770 | ]
2771 | }
2772 |
2773 | --
2774 | SystemInfo Resource API(s)
2775 | Following section describes the rest resources pertaining to SystemInfoResource
2776 | --
2777 |
2778 | Retrieve System Information.
2779 | GET /systemInfo
2780 | < 200
2781 | < Content-Type: application/json
2782 | {
2783 | "zfj_build": "1416",
2784 | "customerId": "Zephyr",
2785 | "jira_db_type": "mysql",
2786 | "licenseDescription": "Plugin license for Zephyr testing",
2787 | "zfj_version": "2.0.0",
2788 | "jira_app_server": "Apache Tomcat",
2789 | "jira_db_build": "6095",
2790 | "jira_version": "6.0"
2791 | }
2792 |
2793 |
2794 | --
2795 | ZAPI Resource API(s)
2796 | Following section describes the rest resources pertaining to ZAPIResource
2797 | --
2798 |
2799 | Retrieve ZAPI module Information.
2800 | GET /moduleInfo
2801 | < 200
2802 | < Content-Type: application/json
2803 | {
2804 | "status": "ENABLED"
2805 | }
2806 |
2807 |
2808 | --
2809 | Audit Resource API(s)
2810 | Following section describes the rest resources pertaining to AuditResource
2811 | --
2812 |
2813 | Retrieve Change history by QueryParams.
2814 |
2815 | QueryParam(s): limit [20], offset [0], entityType, event.
2816 | GET /audit
2817 | {
2818 | "limit": 20,
2819 | "offset": 0
2820 | }
2821 | < 200
2822 | < Content-Type: application/json
2823 | [
2824 | {
2825 | "entityId": "12",
2826 | "entityType": "STEPRESULT",
2827 | "entityEvent": "STEPRESULT_ATTACHMENT_ADDED",
2828 | "auditItems": {
2829 | "id": 363,
2830 | "field": "ATTACHMENT",
2831 | "newValue": "mng_execution_filters.png"
2832 | },
2833 | "creationDate": "21/Oct/13",
2834 | "executionId": "25",
2835 | "creator": "admin"
2836 | },
2837 | {
2838 | "entityId": "28",
2839 | "entityType": "STEPRESULT",
2840 | "entityEvent": "STEPRESULT_UPDATED",
2841 | "auditItems": {
2842 | "id": 364,
2843 | "field": "STATUS",
2844 | "oldValue": "-1",
2845 | "newValue": "1"
2846 | },
2847 | "creationDate": "21/Oct/13",
2848 | "executionId": "34",
2849 | "creator": "admin"
2850 | },
2851 | {
2852 | "entityId": "28",
2853 | "entityType": "STEPRESULT",
2854 | "entityEvent": "STEPRESULT_UPDATED",
2855 | "auditItems": {
2856 | "id": 382,
2857 | "field": "STEP_DEFECT",
2858 | "oldValue": "",
2859 | "newValue": "10700"
2860 | },
2861 | "creationDate": "21/Oct/13",
2862 | "executionId": "34",
2863 | "creator": "admin"
2864 | },
2865 | {
2866 | "entityId": "29",
2867 | "entityType": "STEPRESULT",
2868 | "entityEvent": "STEPRESULT_UPDATED",
2869 | "auditItems": {
2870 | "id": 365,
2871 | "field": "STATUS",
2872 | "oldValue": "-1",
2873 | "newValue": "1"
2874 | },
2875 | "creationDate": "21/Oct/13",
2876 | "executionId": "34",
2877 | "creator": "admin"
2878 | }
2879 | {...}
2880 | ]
2881 |
2882 |
2883 | Retrieve Change history by QueryParams.
2884 |
2885 | QueryParam(s): limit [20], offset [0], entityType, event.
2886 |
2887 | enitityType: Cycle, Execution, StepResult, Step.
2888 |
2889 | event: Cycle Updated, Cycle Deleted, Execution Updated, Execution Deleted, Execution Attachment Added, Execution Attachment Deleted, Step Result Updated, Step Result Attachment Added, Step Result Attachment Deleted, Step Updated, Step Deleted.
2890 | GET /audit
2891 | {
2892 | "limit": 20,
2893 | "offset": 0,
2894 | "entityType": "CYCLE",
2895 | "event": "CYCLE_UPDATED"
2896 | }
2897 | < 200
2898 | < Content-Type: application/json
2899 | [
2900 | {
2901 | "entityId": "1",
2902 | "entityType": "CYCLE",
2903 | "entityEvent": "CYCLE_UPDATED",
2904 | "auditItems": {
2905 | "id": 305,
2906 | "field": "NAME",
2907 | "oldValue": "tc1",
2908 | "newValue": "Audit Test Cycle"
2909 | },
2910 | "creationDate": "17/Oct/13",
2911 | "executionId": "-1",
2912 | "creator": "admin"
2913 | },
2914 | {
2915 | "entityId": "1",
2916 | "entityType": "CYCLE",
2917 | "entityEvent": "CYCLE_UPDATED",
2918 | "auditItems": {
2919 | "id": 306,
2920 | "field": "DESCRIPTION",
2921 | "newValue": "Audit Test Cycle"
2922 | },
2923 | "creationDate": "17/Oct/13",
2924 | "executionId": "-1",
2925 | "creator": "admin"
2926 | },
2927 | {
2928 | "entityId": "3",
2929 | "entityType": "CYCLE",
2930 | "entityEvent": "CYCLE_UPDATED",
2931 | "auditItems": {
2932 | "id": 308,
2933 | "field": "START_DATE",
2934 | "newValue": "1382034600000"
2935 | },
2936 | "creationDate": "18/Oct/13",
2937 | "executionId": "-1",
2938 | "creator": "admin"
2939 | },
2940 | {
2941 | "entityId": "3",
2942 | "entityType": "CYCLE",
2943 | "entityEvent": "CYCLE_UPDATED",
2944 | "auditItems": {
2945 | "id": 309,
2946 | "field": "NAME",
2947 | "oldValue": "tc2",
2948 | "newValue": "Audit Test Cycle 2"
2949 | },
2950 | "creationDate": "18/Oct/13",
2951 | "executionId": "-1",
2952 | "creator": "admin"
2953 | },
2954 | {
2955 | "entityId": "3",
2956 | "entityType": "CYCLE",
2957 | "entityEvent": "CYCLE_UPDATED",
2958 | "auditItems": {
2959 | "id": 310,
2960 | "field": "DESCRIPTION",
2961 | "newValue": "Audit Test Cycle 2"
2962 | },
2963 | "creationDate": "18/Oct/13",
2964 | "executionId": "-1",
2965 | "creator": "admin"
2966 | },
2967 | {
2968 | "entityId": "3",
2969 | "entityType": "CYCLE",
2970 | "entityEvent": "CYCLE_UPDATED",
2971 | "auditItems": {
2972 | "id": 311,
2973 | "field": "END_DATE",
2974 | "newValue": "1389983400000"
2975 | },
2976 | "creationDate": "18/Oct/13",
2977 | "executionId": "-1",
2978 | "creator": "admin"
2979 | }
2980 | ]
--------------------------------------------------------------------------------