added svcapi ui and camunda code
[it/otf.git] / otf-service-api / swagger.yml
1 openapi: 3.0.1\r
2 info:\r
3   title: Open Test Framework API\r
4   description: A RESTful API used to communicate with the OTF test control unit.\r
5   contact:\r
6     name: OTF\r
7     url: https://localhost:32524\r
8   version: "1.0"\r
9 tags:\r
10 - name: Health Service\r
11   description: Query the availability of the API\r
12 - name: Test Execution Service\r
13   description: Query the status and history of your test executions\r
14 - name: Test Instance Service\r
15   description: Create, execute,and query test instances\r
16 - name: Test Strategy Service\r
17   description: Deploy and delete test strategies to and from the test control unit.\r
18     (This documentation will only be available to the development team)\r
19 paths:\r
20   /otf/api/health/v1:\r
21     get:\r
22       tags:\r
23       - Health Service\r
24       summary: Checks if the test control unit is available\r
25       operationId: getHealth_1\r
26       responses:\r
27         200:\r
28           description: The test control unit is available\r
29           content:\r
30             application/json:\r
31               schema:\r
32                 $ref: '#/components/schemas/OtfApiResponse'\r
33   /otf/api/testExecution/v1/executionId/{executionId}:\r
34     get:\r
35       tags:\r
36       - Test Execution Service\r
37       operationId: getExecutionStatus_1\r
38       parameters:\r
39       - name: executionId\r
40         in: path\r
41         required: true\r
42         schema:\r
43           type: string\r
44       - name: Authorization\r
45         in: header\r
46         schema:\r
47           type: string\r
48       responses:\r
49         default:\r
50           description: default response\r
51           content:\r
52             application/json: {}\r
53   /otf/api/testInstance/execute/v1/id/{testInstanceId}:\r
54     post:\r
55       tags:\r
56       - Test Instance Service\r
57       summary: Executes a test instance by it's unique identifier\r
58       operationId: execute_1\r
59       parameters:\r
60       - name: testInstanceId\r
61         in: path\r
62         description: A string representation of a BSON ObjectId\r
63         required: true\r
64         schema:\r
65           type: string\r
66           description: The UUID of the test instance\r
67           format: uuid\r
68         example: 12345678912345678912345f\r
69       - name: Authorization\r
70         in: header\r
71         description: Base64 encoded Application Authorization Framework credentials\r
72         required: true\r
73         schema:\r
74           type: string\r
75         example: Basic b3RmQGF0dC5jb206cGFzc3dvcmQxMjM=\r
76       requestBody:\r
77         content:\r
78           application/json:\r
79             schema:\r
80               $ref: '#/components/schemas/ExecuteTestInstanceRequest'\r
81       responses:\r
82         200:\r
83           description: A successful synchronously executed test returns a test execution\r
84             object\r
85           content:\r
86             application/json:\r
87               schema:\r
88                 $ref: '#/components/schemas/TestExecutionResult'\r
89         201:\r
90           description: |-\r
91             A successful asynchronously executed test with asyncMode set to 'poll' returns an execution identifier\r
92             The identifier can be used as a parameter to the Test Execution Service to check the status of the executed test\r
93           content:\r
94             application/json:\r
95               schema:\r
96                 $ref: '#/components/schemas/TestExecutionResult'\r
97         401:\r
98           description: The mechanized identifier used with the request is prohibited\r
99             from accessing the resource.\r
100           content:\r
101             application/json:\r
102               schema:\r
103                 $ref: '#/components/schemas/OtfApiResponse'\r
104   /otf/api/testInstance/v1/id/{id}:\r
105     get:\r
106       tags:\r
107       - Test Instance Service\r
108       operationId: findById_1\r
109       parameters:\r
110       - name: id\r
111         in: path\r
112         description: A string representation of a BSON ObjectId\r
113         required: true\r
114         schema:\r
115           type: string\r
116           description: The UUID of the test instance\r
117           format: uuid\r
118         example: 12345678912345678912345f\r
119       - name: Authorization\r
120         in: header\r
121         description: Base64 encoded Application Authorization Framework credentials\r
122         required: true\r
123         schema:\r
124           type: string\r
125         example: Basic b3RmQGF0dC5jb206cGFzc3dvcmQxMjM=\r
126       responses:\r
127         default:\r
128           description: default response\r
129           content:\r
130             application/json: {}\r
131   /otf/api/testInstance/create/v1/testDefinitionId/{testDefinitionId}/version/{version}:\r
132     post:\r
133       tags:\r
134       - Test Instance Service\r
135       summary: Create a test instance using the specified version of the test definition\r
136       operationId: createByTestDefinitionIdAndVersion_1\r
137       parameters:\r
138       - name: testDefinitionId\r
139         in: path\r
140         description: A string representation of a BSON ObjectId\r
141         required: true\r
142         schema:\r
143           type: string\r
144           description: The UUID of the test definition.\r
145           format: uuid\r
146         example: 12345678912345678912345f\r
147       - name: version\r
148         in: path\r
149         description: The version of the test definition used to create the instance\r
150         required: true\r
151         schema:\r
152           type: string\r
153         example: 2\r
154       - name: Authorization\r
155         in: header\r
156         description: Base64 encoded Application Authorization Framework credentials\r
157         required: true\r
158         schema:\r
159           type: string\r
160         example: Basic b3RmQGF0dC5jb206cGFzc3dvcmQxMjM=\r
161       - name: execute\r
162         in: query\r
163         description: Execute the test instance after it is created\r
164         allowEmptyValue: true\r
165         schema:\r
166           type: boolean\r
167         example: true\r
168       requestBody:\r
169         content:\r
170           application/json:\r
171             schema:\r
172               $ref: '#/components/schemas/CreateTestInstanceRequest'\r
173       responses:\r
174         201:\r
175           description: The created Test Instance object is returned when it is created\r
176           content:\r
177             application/json:\r
178               schema:\r
179                 $ref: '#/components/schemas/TestInstance'\r
180   /otf/api/testInstance/v1/testInstanceName/{testInstanceName}:\r
181     get:\r
182       tags:\r
183       - Test Instance Service\r
184       summary: Finds a test instance by it's name\r
185       operationId: findByTestInstanceName_1\r
186       parameters:\r
187       - name: testInstanceName\r
188         in: path\r
189         description: The name of the test instance to retrieve\r
190         required: true\r
191         schema:\r
192           type: string\r
193         example: myTestInstance\r
194       - name: Authorization\r
195         in: header\r
196         description: Base64 encoded Application Authorization Framework credentials\r
197         required: true\r
198         schema:\r
199           type: string\r
200         example: Basic b3RmQGF0dC5jb206cGFzc3dvcmQxMjM=\r
201       responses:\r
202         200:\r
203           description: A test instance object is returned when if it is found\r
204           content:\r
205             application/json:\r
206               schema:\r
207                 $ref: '#/components/schemas/TestInstance'\r
208   /otf/api/testInstance/v1/processDefinitionKey/{processDefinitionKey}:\r
209     get:\r
210       tags:\r
211       - Test Instance Service\r
212       operationId: findByProcessDefKey_1\r
213       parameters:\r
214       - name: processDefinitionKey\r
215         in: path\r
216         description: The process definition key associated with the test definition\r
217         required: true\r
218         schema:\r
219           type: string\r
220         example: someUniqueProcessDefinitionKey\r
221       - name: Authorization\r
222         in: header\r
223         description: Base64 encoded Application Authorization Framework credentials\r
224         required: true\r
225         schema:\r
226           type: string\r
227         example: Basic b3RmQGF0dC5jb206cGFzc3dvcmQxMjM=\r
228       responses:\r
229         default:\r
230           description: default response\r
231           content:\r
232             application/json: {}\r
233   /otf/api/testInstance/create/v1/testDefinitionId/{testDefinitionId}:\r
234     post:\r
235       tags:\r
236       - Test Instance Service\r
237       summary: Create a test instance using the latest version of the test definition\r
238       operationId: createByTestDefinitionId_1\r
239       parameters:\r
240       - name: testDefinitionId\r
241         in: path\r
242         description: A string representation of a BSON ObjectId\r
243         required: true\r
244         schema:\r
245           type: string\r
246           description: The UUID of the test definition\r
247           format: uuid\r
248         example: 12345678912345678912345f\r
249       - name: Authorization\r
250         in: header\r
251         description: Base64 encoded Application Authorization Framework credentials\r
252         required: true\r
253         schema:\r
254           type: string\r
255         example: Basic b3RmQGF0dC5jb206cGFzc3dvcmQxMjM=\r
256       - name: execute\r
257         in: query\r
258         description: Execute the test instance after it is created\r
259         allowEmptyValue: true\r
260         schema:\r
261           type: boolean\r
262         example: true\r
263       requestBody:\r
264         content:\r
265           application/json:\r
266             schema:\r
267               $ref: '#/components/schemas/CreateTestInstanceRequest'\r
268       responses:\r
269         201:\r
270           description: The created Test Instance object is returned when it is created\r
271           content:\r
272             application/json:\r
273               schema:\r
274                 $ref: '#/components/schemas/TestInstance'\r
275   /otf/api/testInstance/v1/processDefinitionKey/{processDefinitionKey}/version/{version}:\r
276     get:\r
277       tags:\r
278       - Test Instance Service\r
279       operationId: findByProcessDefKeyAndVersion_1\r
280       parameters:\r
281       - name: processDefinitionKey\r
282         in: path\r
283         description: The process definition key associated with the test definition\r
284         required: true\r
285         schema:\r
286           type: string\r
287         example: someUniqueProcessDefinitionKey\r
288       - name: version\r
289         in: path\r
290         description: The version of the test definition used to create the instance\r
291         required: true\r
292         schema:\r
293           type: string\r
294         example: 2\r
295       - name: Authorization\r
296         in: header\r
297         description: Base64 encoded Application Authorization Framework credentials\r
298         required: true\r
299         schema:\r
300           type: string\r
301         example: Basic b3RmQGF0dC5jb206cGFzc3dvcmQxMjM=\r
302       responses:\r
303         default:\r
304           description: default response\r
305           content:\r
306             application/json: {}\r
307   /otf/api/testInstance/create/v1/processDefinitionKey/{processDefinitionKey}/version/{version}:\r
308     post:\r
309       tags:\r
310       - Test Instance Service\r
311       summary: Create a test instance using the specified version of the test definition\r
312       operationId: createByProcessDefKeyAndVersion_1\r
313       parameters:\r
314       - name: processDefinitionKey\r
315         in: path\r
316         description: The process definition key associated with the test definition\r
317         required: true\r
318         schema:\r
319           type: string\r
320         example: someUniqueProcessDefinitionKey\r
321       - name: version\r
322         in: path\r
323         description: The version of the test definition used to create the instance\r
324         required: true\r
325         schema:\r
326           type: string\r
327         example: 2\r
328       - name: Authorization\r
329         in: header\r
330         description: Base64 encoded Application Authorization Framework credentials\r
331         required: true\r
332         schema:\r
333           type: string\r
334         example: Basic b3RmQGF0dC5jb206cGFzc3dvcmQxMjM=\r
335       - name: execute\r
336         in: query\r
337         description: Execute the test instance after it is created\r
338         allowEmptyValue: true\r
339         schema:\r
340           type: boolean\r
341         example: true\r
342       requestBody:\r
343         content:\r
344           application/json:\r
345             schema:\r
346               $ref: '#/components/schemas/CreateTestInstanceRequest'\r
347       responses:\r
348         201:\r
349           description: The created Test Instance object is returned when it is created\r
350           content:\r
351             application/json:\r
352               schema:\r
353                 $ref: '#/components/schemas/TestInstance'\r
354   /otf/api/testInstance/create/v1/processDefinitionKey/{processDefinitionKey}:\r
355     post:\r
356       tags:\r
357       - Test Instance Service\r
358       summary: Create a test instance using the latest version of the test definition\r
359       operationId: createByProcessDefKey_1\r
360       parameters:\r
361       - name: processDefinitionKey\r
362         in: path\r
363         description: The process definition key associated with the test definition\r
364         required: true\r
365         schema:\r
366           type: string\r
367         example: someUniqueProcessDefinitionKey\r
368       - name: Authorization\r
369         in: header\r
370         description: Base64 encoded Application Authorization Framework credentials\r
371         required: true\r
372         schema:\r
373           type: string\r
374         example: Basic b3RmQGF0dC5jb206cGFzc3dvcmQxMjM=\r
375       - name: execute\r
376         in: query\r
377         description: Execute the test instance after it is created\r
378         allowEmptyValue: true\r
379         schema:\r
380           type: boolean\r
381         example: true\r
382       requestBody:\r
383         content:\r
384           application/json:\r
385             schema:\r
386               $ref: '#/components/schemas/CreateTestInstanceRequest'\r
387       responses:\r
388         201:\r
389           description: The created Test Instance object is returned when it is created\r
390           content:\r
391             application/json:\r
392               schema:\r
393                 $ref: '#/components/schemas/TestInstance'\r
394   /otf/api/testStrategy/delete/v1/deploymentId/{deploymentId}:\r
395     delete:\r
396       tags:\r
397       - Test Strategy Service\r
398       operationId: deleteByDeploymentId_1\r
399       parameters:\r
400       - name: deploymentId\r
401         in: path\r
402         required: true\r
403         schema:\r
404           type: string\r
405       - name: authorization\r
406         in: header\r
407         schema:\r
408           type: string\r
409       responses:\r
410         default:\r
411           description: default response\r
412           content:\r
413             application/json: {}\r
414   /otf/api/testStrategy/delete/v1/testDefinitionId/{testDefinitionId}:\r
415     delete:\r
416       tags:\r
417       - Test Strategy Service\r
418       operationId: deleteByTestDefinitionId_1\r
419       parameters:\r
420       - name: testDefinitionId\r
421         in: path\r
422         required: true\r
423         schema:\r
424           type: string\r
425       - name: authorization\r
426         in: header\r
427         schema:\r
428           type: string\r
429       responses:\r
430         default:\r
431           description: default response\r
432           content:\r
433             application/json: {}\r
434   /otf/api/testStrategy/deploy/v1:\r
435     post:\r
436       tags:\r
437       - Test Strategy Service\r
438       operationId: deployTestStrategy_1\r
439       parameters:\r
440       - name: Authorization\r
441         in: header\r
442         schema:\r
443           type: string\r
444       requestBody:\r
445         content:\r
446           multipart/form-data:\r
447             schema:\r
448               type: object\r
449               properties:\r
450                 bpmn:\r
451                   type: object\r
452                 resources:\r
453                   type: object\r
454                 testDefinitionId:\r
455                   type: string\r
456                 testDefinitionDeployerId:\r
457                   type: string\r
458                 definitionId:\r
459                   type: string\r
460       responses:\r
461         default:\r
462           description: default response\r
463           content:\r
464             application/json: {}\r
465 components:\r
466   schemas:\r
467     ApiResponse:\r
468       type: object\r
469       properties:\r
470         code:\r
471           type: integer\r
472           format: int32\r
473         date:\r
474           type: string\r
475           format: date-time\r
476         message:\r
477           type: string\r
478     JSONObject:\r
479       type: object\r
480     ObjectId:\r
481       type: object\r
482       properties:\r
483         timestamp:\r
484           type: integer\r
485           format: int32\r
486         machineIdentifier:\r
487           type: integer\r
488           format: int32\r
489         processIdentifier:\r
490           type: integer\r
491           format: int32\r
492         counter:\r
493           type: integer\r
494           format: int32\r
495         time:\r
496           type: integer\r
497           format: int64\r
498         date:\r
499           type: string\r
500           format: date-time\r
501         timeSecond:\r
502           type: integer\r
503           format: int32\r
504     TestExecution:\r
505       type: object\r
506       properties:\r
507         get_id:\r
508           $ref: '#/components/schemas/ObjectId'\r
509         executionId:\r
510           type: string\r
511         testResult:\r
512           type: string\r
513         testDetails:\r
514           type: object\r
515           additionalProperties:\r
516             type: object\r
517         startTime:\r
518           type: string\r
519           format: date-time\r
520         endTime:\r
521           type: string\r
522           format: date-time\r
523         async:\r
524           type: boolean\r
525         asyncTopic:\r
526           type: string\r
527         asyncMode:\r
528           type: string\r
529         executor:\r
530           type: string\r
531         groupId:\r
532           $ref: '#/components/schemas/ObjectId'\r
533         testInstanceId:\r
534           $ref: '#/components/schemas/ObjectId'\r
535         testInstance:\r
536           type: object\r
537           additionalProperties:\r
538             type: object\r
539         testHeadResults:\r
540           type: array\r
541           items:\r
542             $ref: '#/components/schemas/TestHeadResult'\r
543         testDetailsJSON:\r
544           type: string\r
545         testInstanceJSON:\r
546           type: string\r
547     TestExecutionResult:\r
548       type: object\r
549       properties:\r
550         testExecution:\r
551           $ref: '#/components/schemas/TestExecution'\r
552         executionId:\r
553           type: string\r
554         testCompleted:\r
555           type: boolean\r
556         testExists:\r
557           type: boolean\r
558     TestHeadResult:\r
559       type: object\r
560       properties:\r
561         testHeadId:\r
562           $ref: '#/components/schemas/ObjectId'\r
563         testHeadName:\r
564           type: string\r
565         bpmnVthTaskId:\r
566           type: string\r
567         testHeadResponse:\r
568           type: object\r
569           additionalProperties:\r
570             type: object\r
571         startTime:\r
572           type: string\r
573           format: date-time\r
574         endTime:\r
575           type: string\r
576           format: date-time\r
577         testHeadResponseJSON:\r
578           $ref: '#/components/schemas/JSONObject'\r
579     ExecuteTestInstanceRequest:\r
580       type: object\r
581       properties:\r
582         async:\r
583           type: boolean\r
584           writeOnly: true\r
585         asyncTopic:\r
586           title: Execute the test synchronously or asynchronously..\r
587           type: string\r
588           description: Ignored unless async is true, and asyncMode is DMaaP.\r
589           example: MyDMaaPTopic.\r
590         asyncMode:\r
591           title: Set the asynchronous execution mode.\r
592           type: string\r
593           description: Ignored unless async is true. The poll mode will return an\r
594             executionId that can be used to query the result of the executed test.\r
595             DMaaP is currently unsupported.\r
596           example: POLL\r
597           enum:\r
598           - POLL\r
599           - DMAAP\r
600         testData:\r
601           title: Use an existing test instance with different global test data.\r
602           type: object\r
603           description: Overrides (not overwrites) the testData field for the requested\r
604             execution. The overridden data will be preserved in the test execution\r
605             result.\r
606           example:\r
607             globalVar1: I'm available to your workflow!\r
608             globalVar2:\r
609               me: too\r
610         vthInput:\r
611           title: Use an existing test instance with different inputs to your VTHs.\r
612           type: object\r
613           description: Overrides (not overwrites) the vthInput field for the requested\r
614             execution. The overridden data will be preserved in the test execution\r
615             result.\r
616           example:\r
617             ServiceTask_123:\r
618               vthArg1: An argument your VTH expects.\r
619               vthArg2: {}\r
620             ServiceTask_456:\r
621               vthArg1: An argument your VTH expects.\r
622       description: The model2 for a test instance execution request.\r
623     TestInstance:\r
624       type: object\r
625       properties:\r
626         get_id:\r
627           $ref: '#/components/schemas/ObjectId'\r
628         testInstanceName:\r
629           type: string\r
630         testInstanceDescription:\r
631           type: string\r
632         groupId:\r
633           $ref: '#/components/schemas/ObjectId'\r
634         testDefinitionId:\r
635           $ref: '#/components/schemas/ObjectId'\r
636         processDefinitionId:\r
637           type: string\r
638         useLatestTestDefinition:\r
639           type: boolean\r
640         testData:\r
641           type: object\r
642           additionalProperties:\r
643             type: object\r
644         vthInput:\r
645           type: object\r
646           additionalProperties:\r
647             type: object\r
648         internalTestData:\r
649           type: object\r
650           additionalProperties:\r
651             type: object\r
652         createdAt:\r
653           type: string\r
654           format: date-time\r
655         updatedAt:\r
656           type: string\r
657           format: date-time\r
658         createdBy:\r
659           $ref: '#/components/schemas/ObjectId'\r
660         updatedBy:\r
661           $ref: '#/components/schemas/ObjectId'\r
662         vthInputJSON:\r
663           $ref: '#/components/schemas/JSONObject'\r
664         testDataJSON:\r
665           $ref: '#/components/schemas/JSONObject'\r
666         internalTestDataJSON:\r
667           $ref: '#/components/schemas/JSONObject'\r
668     CreateTestInstanceRequest:\r
669       required:\r
670       - testData\r
671       - testInstanceDescription\r
672       - testInstanceName\r
673       type: object\r
674       properties:\r
675         testInstanceName:\r
676           title: Name the test instance\r
677           type: string\r
678           description: The name must be unique among all test instances belonging\r
679             to the same test definition.\r
680           example: MyTestInstance\r
681         testInstanceDescription:\r
682           title: Describe the test instance being created\r
683           type: string\r
684           description: Use this field to describe the functionality of the test instance\r
685           example: This test instance does absolutely nothing!\r
686         testData:\r
687           title: Set global variables\r
688           type: object\r
689           description: |-\r
690             This field has read and write access by any task within the workflow.\r
691             See the example for more information\r
692           example:\r
693             globalVar1: I'm available to your workflow!\r
694             globalVar2:\r
695               me: too\r
696         vthInput:\r
697           title: Set virtual test head data\r
698           type: object\r
699           description: |-\r
700             This field determines the data each VTH at the designated ServiceTask will receive.\r
701             See the example for more information\r
702           example:\r
703             ServiceTask_123:\r
704               vthArg1: An argument your VTH expects.\r
705               vthArg2: {}\r
706             ServiceTask_456:\r
707               vthArg1: An argument your VTH expects.\r
708         async:\r
709           type: boolean\r
710         asyncTopic:\r
711           type: string\r
712         asyncMode:\r
713           type: string\r
714       description: The model2 for a test instance creation request.\r