blob: c79449210811bc12257ff5cfbae99465405a0db5 [file] [log] [blame]
xg353y2aad6d62018-05-18 17:59:06 +02001
2{
3 "swagger":"2.0",
4 "info":{
Determe, Sebastien (sd378r)3f939aa2018-06-27 16:50:31 +02005 "version":"3.0.0-SNAPSHOT",
xg353y2aad6d62018-05-18 17:59:06 +02006 "title":"clamp"
7 },
8 "host":"",
9 "basePath":"/clamp/restservices/clds/v1",
10 "schemes":[
11 "http"
12 ],
13 "paths":{
14 "/clds/action/{action}/{modelName}":{
15 "put":{
16 "description":"REST service that saves and processes an action for a CLDS model by name.",
17 "consumes":[
18 "application/json"
19 ],
20 "produces":[
21 "application/json"
22 ],
23 "parameters":[
24 {
25 "type":"string",
26 "name":"action",
27 "in":"path",
28 "required":true
29 },
30 {
31 "type":"string",
32 "name":"modelName",
33 "in":"path",
34 "required":true
35 },
36 {
37 "type":"string",
38 "name":"test",
39 "in":"query",
40 "required":true
41 },
42 {
43 "name":"body",
44 "in":"body",
45 "required":true,
46 "schema":{
47 "$ref":"#/definitions/CldsModel"
48 }
49 }
50 ],
51 "responses":{
52 "200":{
53 "description":"OK",
54 "headers":{
55 },
56 "schema":{
57 "$ref":"#/definitions/CldsModel"
58 }
59 },
60 "500":{
61 "description":"Internal Server Error",
62 "headers":{
63 },
64 "schema":{
65 "$ref":"#/definitions/CldsModel"
66 }
67 }
68 }
69 }
70 },
71 "/clds/cldsDetails":{
72 "get":{
73 "consumes":[
74 ],
75 "produces":[
76 "application/json"
77 ],
78 "parameters":[
79 ],
80 "responses":{
81 "200":{
82 "description":"OK",
83 "headers":{
84 },
85 "schema":{
86 "type":"array",
87 "items":{
88 "$ref":"#/definitions/CldsMonitoringDetails"
89 }
90 }
91 }
92 }
93 }
94 },
95 "/clds/cldsInfo":{
96 "get":{
97 "consumes":[
98 ],
99 "produces":[
100 "application/json"
101 ],
102 "parameters":[
103 ],
104 "responses":{
105 "200":{
106 "description":"OK",
107 "headers":{
108 },
109 "schema":{
110 "$ref":"#/definitions/CldsInfo"
111 }
112 }
113 }
114 }
115 },
116 "/clds/dcae/event":{
117 "post":{
118 "description":"REST service that accepts events for a model.",
119 "consumes":[
120 "application/json"
121 ],
122 "produces":[
123 "application/json"
124 ],
125 "parameters":[
126 {
127 "type":"string",
128 "name":"test",
129 "in":"query",
130 "required":true
131 },
132 {
133 "name":"body",
134 "in":"body",
135 "required":true,
136 "schema":{
137 "$ref":"#/definitions/DcaeEvent"
138 }
139 }
140 ],
141 "responses":{
142 "200":{
143 "description":"OK",
144 "headers":{
145 },
146 "schema":{
147 "type":"string"
148 }
149 }
150 }
151 }
152 },
153 "/clds/deploy/{modelName}":{
154 "put":{
155 "consumes":[
156 "application/json"
157 ],
158 "produces":[
159 "application/json"
160 ],
161 "parameters":[
162 {
163 "type":"string",
164 "name":"modelName",
165 "in":"path",
166 "required":true
167 },
168 {
169 "name":"body",
170 "in":"body",
171 "required":true,
172 "schema":{
173 "$ref":"#/definitions/CldsModel"
174 }
175 }
176 ],
177 "responses":{
178 "200":{
179 "description":"OK",
180 "headers":{
181 },
182 "schema":{
183 "$ref":"#/definitions/CldsModel"
184 }
185 },
186 "500":{
187 "description":"Internal Server Error",
188 "headers":{
189 },
190 "schema":{
191 "$ref":"#/definitions/CldsModel"
192 }
193 }
194 }
195 }
196 },
197 "/clds/healthcheck":{
198 "get":{
199 "description":"REST service that retrieves clds healthcheck information.",
200 "consumes":[
201 ],
202 "produces":[
203 "application/json"
204 ],
205 "parameters":[
206 ],
207 "responses":{
208 "200":{
209 "description":"OK",
210 "headers":{
211 },
212 "schema":{
213 "$ref":"#/definitions/CldsHealthCheck"
214 }
215 },
216 "500":{
217 "description":"Internal Server Error",
218 "headers":{
219 },
220 "schema":{
221 "$ref":"#/definitions/CldsHealthCheck"
222 }
223 }
224 }
225 }
226 },
227 "/clds/model-names":{
228 "get":{
229 "description":"REST service that retrieves a list of CLDS model names.",
230 "consumes":[
231 ],
232 "produces":[
233 "application/json"
234 ],
235 "parameters":[
236 ],
237 "responses":{
238 "200":{
239 "description":"OK",
240 "headers":{
241 },
242 "schema":{
243 "type":"array",
244 "items":{
245 "$ref":"#/definitions/ValueItem"
246 }
247 }
248 }
249 }
250 }
251 },
252 "/clds/model/bpmn/{modelName}":{
253 "get":{
254 "description":"REST service that retrieves BPMN for a CLDS model name from the database.\n This is subset of the json getModel. This is only expected to be used for\n testing purposes, not by the UI.",
255 "consumes":[
256 ],
257 "produces":[
258 "text/xml"
259 ],
260 "parameters":[
261 {
262 "type":"string",
263 "name":"modelName",
264 "in":"path",
265 "required":true
266 }
267 ],
268 "responses":{
269 "200":{
270 "description":"OK",
271 "headers":{
272 },
273 "schema":{
274 "type":"string"
275 }
276 }
277 }
278 }
279 },
280 "/clds/model/image/{modelName}":{
281 "get":{
282 "description":"REST service that retrieves image for a CLDS model name from the\n database. This is subset of the json getModel. This is only expected to\n be used for testing purposes, not by the UI.",
283 "consumes":[
284 ],
285 "produces":[
286 "text/xml"
287 ],
288 "parameters":[
289 {
290 "type":"string",
291 "name":"modelName",
292 "in":"path",
293 "required":true
294 }
295 ],
296 "responses":{
297 "200":{
298 "description":"OK",
299 "headers":{
300 },
301 "schema":{
302 "type":"string"
303 }
304 }
305 }
306 }
307 },
308 "/clds/model/{modelName}":{
309 "get":{
310 "description":"REST service that retrieves a CLDS model by name from the database.",
311 "consumes":[
312 ],
313 "produces":[
314 "application/json"
315 ],
316 "parameters":[
317 {
318 "type":"string",
319 "name":"modelName",
320 "in":"path",
321 "required":true
322 }
323 ],
324 "responses":{
325 "200":{
326 "description":"OK",
327 "headers":{
328 },
329 "schema":{
330 "$ref":"#/definitions/CldsModel"
331 }
332 }
333 }
334 },
335 "put":{
336 "description":"REST service that saves a CLDS model by name in the database.",
337 "consumes":[
338 "application/json"
339 ],
340 "produces":[
341 "application/json"
342 ],
343 "parameters":[
344 {
345 "type":"string",
346 "name":"modelName",
347 "in":"path",
348 "required":true
349 },
350 {
351 "name":"body",
352 "in":"body",
353 "required":true,
354 "schema":{
355 "$ref":"#/definitions/CldsModel"
356 }
357 }
358 ],
359 "responses":{
360 "200":{
361 "description":"OK",
362 "headers":{
363 },
364 "schema":{
365 "$ref":"#/definitions/CldsModel"
366 }
367 }
368 }
369 }
370 },
371 "/clds/properties":{
372 "get":{
373 "description":"REST service that retrieves total properties required by UI",
374 "consumes":[
375 ],
376 "produces":[
377 "application/json"
378 ],
379 "parameters":[
380 ],
381 "responses":{
382 "200":{
383 "description":"OK",
384 "headers":{
385 },
386 "schema":{
387 "type":"string"
388 }
389 }
390 }
391 }
392 },
393 "/clds/properties/{serviceInvariantUUID}":{
394 "get":{
395 "description":"REST service that retrieves total properties by using invariantUUID based\n on refresh and non refresh",
396 "consumes":[
397 ],
398 "produces":[
399 "application/json"
400 ],
401 "parameters":[
402 {
403 "type":"string",
404 "name":"serviceInvariantUUID",
405 "in":"path",
406 "required":true
407 },
408 {
409 "type":"boolean",
410 "name":"refresh",
411 "in":"query",
412 "required":false,
413 "default":"false"
414 }
415 ],
416 "responses":{
417 "200":{
418 "description":"OK",
419 "headers":{
420 },
421 "schema":{
422 "type":"string"
423 }
424 }
425 }
426 }
427 },
428 "/clds/sdc/services":{
429 "get":{
430 "description":"REST service that retrieves sdc services",
431 "consumes":[
432 ],
433 "produces":[
434 "application/json"
435 ],
436 "parameters":[
437 ],
438 "responses":{
439 "200":{
440 "description":"OK",
441 "headers":{
442 },
443 "schema":{
444 "type":"string"
445 }
446 }
447 }
448 }
449 },
450 "/clds/undeploy/{modelName}":{
451 "put":{
452 "consumes":[
453 "application/json"
454 ],
455 "produces":[
456 "application/json"
457 ],
458 "parameters":[
459 {
460 "type":"string",
461 "name":"modelName",
462 "in":"path",
463 "required":true
464 },
465 {
466 "name":"body",
467 "in":"body",
468 "required":true,
469 "schema":{
470 "$ref":"#/definitions/CldsModel"
471 }
472 }
473 ],
474 "responses":{
475 "200":{
476 "description":"OK",
477 "headers":{
478 },
479 "schema":{
480 "$ref":"#/definitions/CldsModel"
481 }
482 },
483 "500":{
484 "description":"Internal Server Error",
485 "headers":{
486 },
487 "schema":{
488 "$ref":"#/definitions/CldsModel"
489 }
490 }
491 }
492 }
493 },
494 "/cldsTempate/template-names":{
495 "get":{
496 "description":"REST service that retrieves a list of CLDS template names.",
497 "consumes":[
498 ],
499 "produces":[
500 "application/json"
501 ],
502 "parameters":[
503 ],
504 "responses":{
505 "200":{
506 "description":"OK",
507 "headers":{
508 },
509 "schema":{
510 "type":"array",
511 "items":{
512 "$ref":"#/definitions/ValueItem"
513 }
514 }
515 }
516 }
517 }
518 },
519 "/cldsTempate/template/bpmn/{templateName}":{
520 "get":{
521 "description":"REST service that retrieves BPMN for a CLDS template name from the\n database. This is subset of the json getModel. This is only expected to\n be used for testing purposes, not by the UI.",
522 "consumes":[
523 ],
524 "produces":[
525 "text/xml"
526 ],
527 "parameters":[
528 {
529 "type":"string",
530 "name":"templateName",
531 "in":"path",
532 "required":true
533 }
534 ],
535 "responses":{
536 "200":{
537 "description":"OK",
538 "headers":{
539 },
540 "schema":{
541 "type":"string"
542 }
543 }
544 }
545 }
546 },
547 "/cldsTempate/template/image/{templateName}":{
548 "get":{
549 "description":"REST service that retrieves image for a CLDS template name from the\n database. This is subset of the json getModel. This is only expected to\n be used for testing purposes, not by the UI.",
550 "consumes":[
551 ],
552 "produces":[
553 "text/xml"
554 ],
555 "parameters":[
556 {
557 "type":"string",
558 "name":"templateName",
559 "in":"path",
560 "required":true
561 }
562 ],
563 "responses":{
564 "200":{
565 "description":"OK",
566 "headers":{
567 },
568 "schema":{
569 "type":"string"
570 }
571 }
572 }
573 }
574 },
575 "/cldsTempate/template/{templateName}":{
576 "get":{
577 "description":"REST service that retrieves a CLDS template by name from the database.",
578 "consumes":[
579 ],
580 "produces":[
581 "application/json"
582 ],
583 "parameters":[
584 {
585 "type":"string",
586 "name":"templateName",
587 "in":"path",
588 "required":true
589 }
590 ],
591 "responses":{
592 "200":{
593 "description":"OK",
594 "headers":{
595 },
596 "schema":{
597 "$ref":"#/definitions/CldsTemplate"
598 }
599 }
600 }
601 },
602 "put":{
603 "description":"REST service that saves a CLDS template by name in the database.",
604 "consumes":[
605 "application/json"
606 ],
607 "produces":[
608 "application/json"
609 ],
610 "parameters":[
611 {
612 "type":"string",
613 "name":"templateName",
614 "in":"path",
615 "required":true
616 },
617 {
618 "name":"body",
619 "in":"body",
620 "required":true,
621 "schema":{
622 "$ref":"#/definitions/CldsTemplate"
623 }
624 }
625 ],
626 "responses":{
627 "200":{
628 "description":"OK",
629 "headers":{
630 },
631 "schema":{
632 "$ref":"#/definitions/CldsTemplate"
633 }
634 }
635 }
636 }
637 },
Determe, Sebastien (sd378r)3f939aa2018-06-27 16:50:31 +0200638 "/healthcheck":{
639 "get":{
640 "description":"REST service that retrieves clds healthcheck information.",
641 "consumes":[
642 ],
643 "produces":[
644 "application/json"
645 ],
646 "parameters":[
647 ],
648 "responses":{
649 "200":{
650 "description":"OK",
651 "headers":{
652 },
653 "schema":{
654 "$ref":"#/definitions/CldsHealthCheck"
655 }
656 },
657 "500":{
658 "description":"Internal Server Error",
659 "headers":{
660 },
661 "schema":{
662 "$ref":"#/definitions/CldsHealthCheck"
663 }
664 }
665 }
666 }
667 },
668 "/user/getUser":{
xg353y2aad6d62018-05-18 17:59:06 +0200669 "get":{
670 "description":"REST service that returns the username.",
671 "consumes":[
672 ],
673 "produces":[
674 "text/plain"
675 ],
676 "parameters":[
xg353y2aad6d62018-05-18 17:59:06 +0200677 ],
678 "responses":{
679 "200":{
680 "description":"OK",
681 "headers":{
682 },
683 "schema":{
684 "type":"string"
685 }
686 }
687 }
688 }
689 }
690 },
691 "definitions":{
692 "CldsEvent":{
693 "properties":{
694 "actionAndStateCd":{
695 "type":"boolean"
696 },
697 "actionCd":{
698 "type":"boolean"
699 },
700 "actionStateCd":{
701 "type":"boolean"
702 },
703 "id":{
704 "type":"string"
705 },
706 "processInstanceId":{
707 "type":"string"
708 },
709 "userid":{
710 "type":"string"
711 }
712 }
713 },
714 "CldsHealthCheck":{
715 "properties":{
716 "description":{
717 "type":"string"
718 },
719 "healthCheckComponent":{
720 "type":"string"
721 },
722 "healthCheckStatus":{
723 "type":"string"
724 }
725 }
726 },
727 "CldsInfo":{
728 "properties":{
729 "cldsVersion":{
730 "type":"string"
731 },
732 "permissionReadCl":{
733 "type":"boolean"
734 },
735 "permissionReadTemplate":{
736 "type":"boolean"
737 },
738 "permissionUpdateCl":{
739 "type":"boolean"
740 },
741 "permissionUpdateTemplate":{
742 "type":"boolean"
743 },
744 "userName":{
745 "type":"string"
746 }
747 }
748 },
749 "CldsModel":{
750 "properties":{
751 "blueprintText":{
752 "type":"string"
753 },
754 "bpmnText":{
755 "type":"string"
756 },
757 "cldsModelInstanceList":{
758 "type":"array",
759 "items":{
760 "$ref":"#/definitions/CldsModelInstance"
761 }
762 },
763 "controlName":{
764 "type":"string"
765 },
766 "controlNamePrefix":{
767 "type":"string"
768 },
769 "controlNameUuid":{
770 "type":"string"
771 },
772 "deploymentId":{
773 "type":"string"
774 },
775 "docText":{
776 "type":"string"
777 },
778 "event":{
779 "$ref":"#/definitions/CldsEvent"
780 },
781 "id":{
782 "type":"string"
783 },
784 "imageText":{
785 "type":"string"
786 },
787 "name":{
788 "type":"string"
789 },
790 "permittedActionCd":{
791 "type":"array",
792 "items":{
793 "type":"string"
794 }
795 },
796 "propText":{
797 "type":"string"
798 },
799 "status":{
800 "type":"string"
801 },
802 "templateId":{
803 "type":"string"
804 },
805 "templateName":{
806 "type":"string"
807 },
808 "typeId":{
809 "type":"string"
810 },
811 "typeName":{
812 "type":"string"
813 }
814 }
815 },
816 "CldsModelInstance":{
817 "properties":{
818 "location":{
819 "type":"string"
820 },
821 "modelInstanceId":{
822 "type":"string"
823 },
824 "vmName":{
825 "type":"string"
826 }
827 }
828 },
829 "CldsMonitoringDetails":{
830 "properties":{
831 "action":{
832 "type":"string"
833 },
834 "closeloopName":{
835 "type":"string"
836 },
837 "deploymentId":{
838 "type":"string"
839 },
840 "modelName":{
841 "type":"string"
842 },
843 "serviceTypeId":{
844 "type":"string"
845 },
846 "templateName":{
847 "type":"string"
848 },
849 "timestamp":{
850 "type":"string"
851 },
852 "userid":{
853 "type":"string"
854 }
855 }
856 },
857 "CldsTemplate":{
858 "properties":{
859 "bpmnId":{
860 "type":"string"
861 },
862 "bpmnText":{
863 "type":"string"
864 },
865 "bpmnUserid":{
866 "type":"string"
867 },
868 "controlNamePrefix":{
869 "type":"string"
870 },
871 "controlNameUuid":{
872 "type":"string"
873 },
874 "id":{
875 "type":"string"
876 },
877 "imageId":{
878 "type":"string"
879 },
880 "imageText":{
881 "type":"string"
882 },
883 "imageUserid":{
884 "type":"string"
885 },
886 "name":{
887 "type":"string"
888 },
889 "propId":{
890 "type":"string"
891 },
892 "propText":{
893 "type":"string"
894 },
895 "propUserid":{
896 "type":"string"
897 },
898 "userAuthorizedToUpdate":{
899 "type":"boolean"
900 }
901 }
902 },
903 "DcaeEvent":{
904 "properties":{
905 "artifactName":{
906 "type":"string"
907 },
908 "cldsActionCd":{
909 "type":"string"
910 },
911 "controlName":{
912 "type":"string"
913 },
914 "event":{
915 "type":"string"
916 },
917 "instances":{
918 "type":"array",
919 "items":{
920 "$ref":"#/definitions/CldsModelInstance"
921 }
922 },
923 "resourceUUID":{
924 "type":"string"
925 },
926 "serviceUUID":{
927 "type":"string"
928 }
929 }
930 },
931 "ValueItem":{
932 "properties":{
933 "value":{
934 "type":"string"
935 }
936 }
937 }
938 }
939}