8d4921d4da23fc9766e00b6e490365683bdb3b4d
[clamp.git] / docs / swagger / swagger.json
1
2 {
3     "swagger":"2.0",
4     "info":{
5         "version":"2.0.0-SNAPSHOT",
6         "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         },
638         "/user/{userName}":{
639             "get":{
640                 "description":"REST service that returns the username.",
641                 "consumes":[
642                 ],
643                 "produces":[
644                     "text/plain"
645                 ],
646                 "parameters":[
647                     {
648                         "type":"string",
649                         "name":"userName",
650                         "in":"path",
651                         "required":true
652                     }
653                 ],
654                 "responses":{
655                     "200":{
656                         "description":"OK",
657                         "headers":{
658                         },
659                         "schema":{
660                             "type":"string"
661                         }
662                     }
663                 }
664             }
665         }
666     },
667     "definitions":{
668         "CldsEvent":{
669             "properties":{
670                 "actionAndStateCd":{
671                     "type":"boolean"
672                 },
673                 "actionCd":{
674                     "type":"boolean"
675                 },
676                 "actionStateCd":{
677                     "type":"boolean"
678                 },
679                 "id":{
680                     "type":"string"
681                 },
682                 "processInstanceId":{
683                     "type":"string"
684                 },
685                 "userid":{
686                     "type":"string"
687                 }
688             }
689         },
690         "CldsHealthCheck":{
691             "properties":{
692                 "description":{
693                     "type":"string"
694                 },
695                 "healthCheckComponent":{
696                     "type":"string"
697                 },
698                 "healthCheckStatus":{
699                     "type":"string"
700                 }
701             }
702         },
703         "CldsInfo":{
704             "properties":{
705                 "cldsVersion":{
706                     "type":"string"
707                 },
708                 "permissionReadCl":{
709                     "type":"boolean"
710                 },
711                 "permissionReadTemplate":{
712                     "type":"boolean"
713                 },
714                 "permissionUpdateCl":{
715                     "type":"boolean"
716                 },
717                 "permissionUpdateTemplate":{
718                     "type":"boolean"
719                 },
720                 "userName":{
721                     "type":"string"
722                 }
723             }
724         },
725         "CldsModel":{
726             "properties":{
727                 "blueprintText":{
728                     "type":"string"
729                 },
730                 "bpmnText":{
731                     "type":"string"
732                 },
733                 "cldsModelInstanceList":{
734                     "type":"array",
735                     "items":{
736                         "$ref":"#/definitions/CldsModelInstance"
737                     }
738                 },
739                 "controlName":{
740                     "type":"string"
741                 },
742                 "controlNamePrefix":{
743                     "type":"string"
744                 },
745                 "controlNameUuid":{
746                     "type":"string"
747                 },
748                 "deploymentId":{
749                     "type":"string"
750                 },
751                 "docText":{
752                     "type":"string"
753                 },
754                 "event":{
755                     "$ref":"#/definitions/CldsEvent"
756                 },
757                 "id":{
758                     "type":"string"
759                 },
760                 "imageText":{
761                     "type":"string"
762                 },
763                 "name":{
764                     "type":"string"
765                 },
766                 "permittedActionCd":{
767                     "type":"array",
768                     "items":{
769                         "type":"string"
770                     }
771                 },
772                 "propText":{
773                     "type":"string"
774                 },
775                 "status":{
776                     "type":"string"
777                 },
778                 "templateId":{
779                     "type":"string"
780                 },
781                 "templateName":{
782                     "type":"string"
783                 },
784                 "typeId":{
785                     "type":"string"
786                 },
787                 "typeName":{
788                     "type":"string"
789                 }
790             }
791         },
792         "CldsModelInstance":{
793             "properties":{
794                 "location":{
795                     "type":"string"
796                 },
797                 "modelInstanceId":{
798                     "type":"string"
799                 },
800                 "vmName":{
801                     "type":"string"
802                 }
803             }
804         },
805         "CldsMonitoringDetails":{
806             "properties":{
807                 "action":{
808                     "type":"string"
809                 },
810                 "closeloopName":{
811                     "type":"string"
812                 },
813                 "deploymentId":{
814                     "type":"string"
815                 },
816                 "modelName":{
817                     "type":"string"
818                 },
819                 "serviceTypeId":{
820                     "type":"string"
821                 },
822                 "templateName":{
823                     "type":"string"
824                 },
825                 "timestamp":{
826                     "type":"string"
827                 },
828                 "userid":{
829                     "type":"string"
830                 }
831             }
832         },
833         "CldsTemplate":{
834             "properties":{
835                 "bpmnId":{
836                     "type":"string"
837                 },
838                 "bpmnText":{
839                     "type":"string"
840                 },
841                 "bpmnUserid":{
842                     "type":"string"
843                 },
844                 "controlNamePrefix":{
845                     "type":"string"
846                 },
847                 "controlNameUuid":{
848                     "type":"string"
849                 },
850                 "id":{
851                     "type":"string"
852                 },
853                 "imageId":{
854                     "type":"string"
855                 },
856                 "imageText":{
857                     "type":"string"
858                 },
859                 "imageUserid":{
860                     "type":"string"
861                 },
862                 "name":{
863                     "type":"string"
864                 },
865                 "propId":{
866                     "type":"string"
867                 },
868                 "propText":{
869                     "type":"string"
870                 },
871                 "propUserid":{
872                     "type":"string"
873                 },
874                 "userAuthorizedToUpdate":{
875                     "type":"boolean"
876                 }
877             }
878         },
879         "DcaeEvent":{
880             "properties":{
881                 "artifactName":{
882                     "type":"string"
883                 },
884                 "cldsActionCd":{
885                     "type":"string"
886                 },
887                 "controlName":{
888                     "type":"string"
889                 },
890                 "event":{
891                     "type":"string"
892                 },
893                 "instances":{
894                     "type":"array",
895                     "items":{
896                         "$ref":"#/definitions/CldsModelInstance"
897                     }
898                 },
899                 "resourceUUID":{
900                     "type":"string"
901                 },
902                 "serviceUUID":{
903                     "type":"string"
904                 }
905             }
906         },
907         "ValueItem":{
908             "properties":{
909                 "value":{
910                     "type":"string"
911                 }
912             }
913         }
914     }
915 }