Revert "Update snapshot and/or references of policy/parent to latest snapshots"
[policy/parent.git] / docs / clamp / acm / design-impl / participants / swagger / participant-sim.json
1 {
2     "openapi": "3.0.1",
3     "info": {
4         "title": "ACM Mock Participant",
5         "description": "CLAMP Mock Participant API",
6         "license": {
7             "name": "Apache 2.0",
8             "url": "http://www.apache.org/licenses/LICENSE-2.0"
9         }
10     },
11     "externalDocs": {
12         "description": "CLAMP Automation Composition Management Documentation",
13         "url": "https://docs.onap.org/projects/onap-policy-parent/en/latest/clamp/clamp.html"
14     },
15     "servers": [
16         {
17             "url": "http://localhost:8084/onap/policy/clamp/acm/simparticipant",
18             "description": "Generated server url"
19         }
20     ],
21     "paths": {
22         "/v2/parameters": {
23             "get": {
24                 "tags": [
25                     "Simulator-participant-controller"
26                 ],
27                 "summary": "Return all Parameters",
28                 "description": "Return all the parameters configured in the Simulator Participant",
29                 "operationId": "getConfig",
30                 "parameters": [
31                     {
32                         "name": "X-onap-RequestId",
33                         "in": "header",
34                         "description": "RequestID for http transaction",
35                         "required": false,
36                         "schema": {
37                             "type": "string",
38                             "format": "uuid"
39                         }
40                     }
41                 ],
42                 "responses": {
43                     "200": {
44                         "description": "OK, reutrns a serialised instance of [SimConfig](https://github.com/onap/policy-clamp/blob/master/participant/participant-impl/policy-clamp-participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/model/SimConfig.java)",
45                         "content": {
46                             "application/json": {
47                                 "schema": {
48                                     "$ref": "#/components/schemas/SimConfig"
49                                 }
50                             }
51                         }
52                     },
53                     "401": {
54                         "description": "Authorization Error",
55                         "content": {
56                             "application/json": {
57                                 "schema": {
58                                     "$ref": "#/components/schemas/SimConfig"
59                                 }
60                             },
61                             "application/yaml": {
62                                 "schema": {
63                                     "$ref": "#/components/schemas/SimConfig"
64                                 }
65                             }
66                         }
67                     },
68                     "500": {
69                         "description": "Internal Server Error",
70                         "content": {
71                             "application/json": {
72                                 "schema": {
73                                     "$ref": "#/components/schemas/SimConfig"
74                                 }
75                             },
76                             "application/yaml": {
77                                 "schema": {
78                                     "$ref": "#/components/schemas/SimConfig"
79                                 }
80                             }
81                         }
82                     }
83                 },
84                 "security": [
85                     {
86                         "basicAuth": []
87                     }
88                 ]
89             },
90             "put": {
91                 "tags": [
92                     "Simulator-participant-controller"
93                 ],
94                 "summary": "change the parameters",
95                 "description": "Change the parameters the behaviour of the Simulator Participant",
96                 "operationId": "setConfig",
97                 "parameters": [
98                     {
99                         "name": "X-ONAP-RequestID",
100                         "in": "header",
101                         "description": "RequestID for http transaction",
102                         "required": false,
103                         "schema": {
104                             "type": "string",
105                             "format": "uuid"
106                         }
107                     }
108                 ],
109                 "requestBody": {
110                     "content": {
111                         "application/json": {
112                             "schema": {
113                                 "$ref": "#/components/schemas/SimConfig"
114                             }
115                         },
116                         "application/yaml": {
117                             "schema": {
118                                 "$ref": "#/components/schemas/SimConfig"
119                             }
120                         }
121                     },
122                     "required": true
123                 },
124                 "responses": {
125                     "200": {
126                         "description": "OK, the parameters has been saved"
127                     },
128                     "400": {
129                         "description": "Bad Request"
130                     },
131                     "401": {
132                         "description": "Authorization Error"
133                     },
134                     "500": {
135                         "description": "Internal Server Error"
136                     }
137                 },
138                 "security": [
139                     {
140                         "basicAuth": []
141                     }
142                 ]
143             }
144         },
145         "/v2/datas": {
146             "get": {
147                 "tags": [
148                     "Simulator-participant-controller"
149                 ],
150                 "summary": "Query details of the requested internal datas",
151                 "description": "Query details of the requested internal datas",
152                 "operationId": "getDatas",
153                 "parameters": [
154                     {
155                         "name": "X-onap-RequestId",
156                         "in": "header",
157                         "description": "RequestID for http transaction",
158                         "required": false,
159                         "schema": {
160                             "type": "string",
161                             "format": "uuid"
162                         }
163                     }
164                 ],
165                 "responses": {
166                     "200": {
167                         "description": "Serialised instance of [InternalDatas](https://github.com/onap/policy-clamp/blob/master/participant/participant-impl/policy-clamp-participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/model/InternalDatas.java)",
168                         "content": {
169                             "application/json": {
170                                 "schema": {
171                                     "$ref": "#/components/schemas/InternalDatas"
172                                 }
173                             }
174                         }
175                     },
176                     "401": {
177                         "description": "Authorization Error",
178                         "content": {
179                             "application/json": {
180                                 "schema": {
181                                     "$ref": "#/components/schemas/InternalDatas"
182                                 }
183                             },
184                             "application/yaml": {
185                                 "schema": {
186                                     "$ref": "#/components/schemas/InternalDatas"
187                                 }
188                             }
189                         }
190                     },
191                     "500": {
192                         "description": "Internal Server Error",
193                         "content": {
194                             "application/json": {
195                                 "schema": {
196                                     "$ref": "#/components/schemas/InternalDatas"
197                                 }
198                             },
199                             "application/yaml": {
200                                 "schema": {
201                                     "$ref": "#/components/schemas/InternalDatas"
202                                 }
203                             }
204                         }
205                     }
206                 },
207                 "security": [
208                     {
209                         "basicAuth": []
210                     }
211                 ]
212             },
213             "put": {
214                 "tags": [
215                     "Simulator-participant-controller"
216                 ],
217                 "summary": "change the parameters",
218                 "description": "Change the data of the Simulator Participant",
219                 "operationId": "setData",
220                 "parameters": [
221                     {
222                         "name": "X-ONAP-RequestID",
223                         "in": "header",
224                         "description": "RequestID for http transaction",
225                         "required": false,
226                         "schema": {
227                             "type": "string",
228                             "format": "uuid"
229                         }
230                     }
231                 ],
232                 "requestBody": {
233                     "content": {
234                         "application/json": {
235                             "schema": {
236                                 "$ref": "#/components/schemas/InternalData"
237                             }
238                         },
239                         "application/yaml": {
240                             "schema": {
241                                 "$ref": "#/components/schemas/InternalData"
242                             }
243                         }
244                     },
245                     "required": true
246                 },
247                 "responses": {
248                     "200": {
249                         "description": "OK, the data has been saved"
250                     },
251                     "400": {
252                         "description": "Bad Request"
253                     },
254                     "401": {
255                         "description": "Authorization Error"
256                     },
257                     "500": {
258                         "description": "Internal Server Error"
259                     }
260                 },
261                 "security": [
262                     {
263                         "basicAuth": []
264                     }
265                 ]
266             }
267         },
268         "/v2/compositiondatas": {
269             "get": {
270                 "tags": [
271                     "Simulator-participant-controller"
272                 ],
273                 "summary": "Query details of the requested internal composition datas",
274                 "description": "Query details of the requested internal composition datas",
275                 "operationId": "getCompositionDatas",
276                 "parameters": [
277                     {
278                         "name": "X-onap-RequestId",
279                         "in": "header",
280                         "description": "RequestID for http transaction",
281                         "required": false,
282                         "schema": {
283                             "type": "string",
284                             "format": "uuid"
285                         }
286                     }
287                 ],
288                 "responses": {
289                     "200": {
290                         "description": "Serialised instance of [InternalDatas](https://github.com/onap/policy-clamp/blob/master/participant/participant-impl/policy-clamp-participant-impl-simulator/src/main/java/org/onap/policy/clamp/acm/participant/sim/model/InternalDatas.java)",
291                         "content": {
292                             "application/json": {
293                                 "schema": {
294                                     "$ref": "#/components/schemas/InternalDatas"
295                                 }
296                             }
297                         }
298                     },
299                     "401": {
300                         "description": "Authorization Error",
301                         "content": {
302                             "application/json": {
303                                 "schema": {
304                                     "$ref": "#/components/schemas/InternalDatas"
305                                 }
306                             },
307                             "application/yaml": {
308                                 "schema": {
309                                     "$ref": "#/components/schemas/InternalDatas"
310                                 }
311                             }
312                         }
313                     },
314                     "500": {
315                         "description": "Internal Server Error",
316                         "content": {
317                             "application/json": {
318                                 "schema": {
319                                     "$ref": "#/components/schemas/InternalDatas"
320                                 }
321                             },
322                             "application/yaml": {
323                                 "schema": {
324                                     "$ref": "#/components/schemas/InternalDatas"
325                                 }
326                             }
327                         }
328                     }
329                 },
330                 "security": [
331                     {
332                         "basicAuth": []
333                     }
334                 ]
335             },
336             "put": {
337                 "tags": [
338                     "Simulator-participant-controller"
339                 ],
340                 "summary": "change the parameters",
341                 "description": "Change the data of the Simulator Participant",
342                 "operationId": "setCompositionData",
343                 "parameters": [
344                     {
345                         "name": "X-ONAP-RequestID",
346                         "in": "header",
347                         "description": "RequestID for http transaction",
348                         "required": false,
349                         "schema": {
350                             "type": "string",
351                             "format": "uuid"
352                         }
353                     }
354                 ],
355                 "requestBody": {
356                     "content": {
357                         "application/json": {
358                             "schema": {
359                                 "$ref": "#/components/schemas/InternalData"
360                             }
361                         },
362                         "application/yaml": {
363                             "schema": {
364                                 "$ref": "#/components/schemas/InternalData"
365                             }
366                         }
367                     },
368                     "required": true
369                 },
370                 "responses": {
371                     "200": {
372                         "description": "OK, the data has been saved"
373                     },
374                     "400": {
375                         "description": "Bad Request"
376                     },
377                     "401": {
378                         "description": "Authorization Error"
379                     },
380                     "500": {
381                         "description": "Internal Server Error"
382                     }
383                 },
384                 "security": [
385                     {
386                         "basicAuth": []
387                     }
388                 ]
389             }
390         },
391         "/v2/instances": {
392             "get": {
393                 "tags": [
394                     "Simulator-participant-controller"
395                 ],
396                 "summary": "Query details of the requested automation composition instances",
397                 "description": "Query details of the requested automation composition instances for the given automation composition definition ID, returning details of all its automation composition instances",
398                 "operationId": "getAutomationCompositions",
399                 "parameters": [
400                     {
401                         "name": "X-onap-RequestId",
402                         "in": "header",
403                         "description": "RequestID for http transaction",
404                         "required": false,
405                         "schema": {
406                             "type": "string",
407                             "format": "uuid"
408                         }
409                     }
410                 ],
411                 "responses": {
412                     "200": {
413                         "description": "Serialised instance of [AutomationCompositions](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositions.java) containing a list of automation composition instances found",
414                         "content": {
415                             "application/json": {
416                                 "schema": {
417                                     "$ref": "#/components/schemas/AutomationCompositions"
418                                 }
419                             }
420                         }
421                     },
422                     "401": {
423                         "description": "Authorization Error",
424                         "content": {
425                             "application/json": {
426                                 "schema": {
427                                     "$ref": "#/components/schemas/AutomationCompositions"
428                                 }
429                             },
430                             "application/yaml": {
431                                 "schema": {
432                                     "$ref": "#/components/schemas/AutomationCompositions"
433                                 }
434                             }
435                         }
436                     },
437                     "500": {
438                         "description": "Internal Server Error",
439                         "content": {
440                             "application/json": {
441                                 "schema": {
442                                     "$ref": "#/components/schemas/AutomationCompositions"
443                                 }
444                             },
445                             "application/yaml": {
446                                 "schema": {
447                                     "$ref": "#/components/schemas/AutomationCompositions"
448                                 }
449                             }
450                         }
451                     }
452                 },
453                 "security": [
454                     {
455                         "basicAuth": []
456                     }
457                 ]
458             }
459         },
460         "/v2/instances/{instanceId}": {
461             "get": {
462                 "tags": [
463                     "Simulator-participant-controller"
464                 ],
465                 "summary": "Get automation composition instance details.",
466                 "description": "Get details of the requested automation composition instance.",
467                 "operationId": "getAutomationComposition",
468                 "parameters": [
469                     {
470                         "name": "instanceId",
471                         "in": "path",
472                         "description": "The UUID of the automation composition instance to get",
473                         "required": true,
474                         "schema": {
475                             "type": "string",
476                             "format": "uuid"
477                         }
478                     },
479                     {
480                         "name": "X-onap-RequestId",
481                         "in": "header",
482                         "description": "RequestID for http transaction",
483                         "required": false,
484                         "schema": {
485                             "type": "string",
486                             "format": "uuid"
487                         }
488                     }
489                 ],
490                 "responses": {
491                     "200": {
492                         "description": "Serialised instance of [AutomationComposition](https://github.com/onap/policy-clamp/blob/master/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationComposition.java) containing the automation composition instance",
493                         "content": {
494                             "application/json": {
495                                 "schema": {
496                                     "$ref": "#/components/schemas/AutomationComposition"
497                                 }
498                             }
499                         }
500                     },
501                     "401": {
502                         "description": "Authorization Error",
503                         "content": {
504                             "application/json": {
505                                 "schema": {
506                                     "$ref": "#/components/schemas/AutomationComposition"
507                                 }
508                             },
509                             "application/yaml": {
510                                 "schema": {
511                                     "$ref": "#/components/schemas/AutomationComposition"
512                                 }
513                             }
514                         }
515                     },
516                     "500": {
517                         "description": "Internal Server Error",
518                         "content": {
519                             "application/json": {
520                                 "schema": {
521                                     "$ref": "#/components/schemas/AutomationComposition"
522                                 }
523                             },
524                             "application/yaml": {
525                                 "schema": {
526                                     "$ref": "#/components/schemas/AutomationComposition"
527                                 }
528                             }
529                         }
530                     }
531                 },
532                 "security": [
533                     {
534                         "basicAuth": []
535                     }
536                 ]
537             }
538         }
539     },
540     "components": {
541         "schemas": {
542             "SimConfig": {
543                 "type": "object",
544                 "properties": {
545                     "deploySuccess": {
546                         "type": "boolean"
547                     },
548                     "undeploySuccess": {
549                         "type": "boolean"
550                     },
551                     "lockSuccess": {
552                         "type": "boolean"
553                     },
554                     "unlockSuccess": {
555                         "type": "boolean"
556                     },
557                     "deleteSuccess": {
558                         "type": "boolean"
559                     },
560                     "updateSuccess": {
561                         "type": "boolean"
562                     },
563                     "migrateSuccess": {
564                         "type": "boolean"
565                     },
566                     "primeSuccess": {
567                         "type": "boolean"
568                     },
569                     "deprimeSuccess": {
570                         "type": "boolean"
571                     },
572                     "deployTimerMs": {
573                         "type": "integer",
574                         "format": "int32"
575                     },
576                     "undeployTimerMs": {
577                         "type": "integer",
578                         "format": "int32"
579                     },
580                     "lockTimerMs": {
581                         "type": "integer",
582                         "format": "int32"
583                     },
584                     "unlockTimerMs": {
585                         "type": "integer",
586                         "format": "int32"
587                     },
588                     "updateTimerMs": {
589                         "type": "integer",
590                         "format": "int32"
591                     },
592                     "migrateTimerMs": {
593                         "type": "integer",
594                         "format": "int32"
595                     },
596                     "deleteTimerMs": {
597                         "type": "integer",
598                         "format": "int32"
599                     },
600                     "primeTimerMs": {
601                         "type": "integer",
602                         "format": "int32"
603                     },
604                     "deprimeTimerMs": {
605                         "type": "integer",
606                         "format": "int32"
607                     }
608                 }
609             },
610             "InternalData": {
611                 "type": "object",
612                 "properties": {
613                     "intProperties": {
614                         "type": "object",
615                         "additionalProperties": {
616                             "type": "object"
617                         }
618                     },
619                     "outProperties": {
620                         "type": "object",
621                         "additionalProperties": {
622                             "type": "object"
623                         }
624                     },
625                     "compositionId": {
626                         "type": "string",
627                         "format": "uuid"
628                     },
629                     "compositionDefinitionElementId": {
630                         "$ref": "#/components/schemas/ToscaConceptIdentifier"
631                     },
632                     "automationCompositionId": {
633                         "type": "string",
634                         "format": "uuid"
635                     },
636                     "automationCompositionElementId": {
637                         "type": "string",
638                         "format": "uuid"
639                     },
640                     "useState": {
641                         "type": "string"
642                     },
643                     "operationalState": {
644                         "type": "string"
645                     }
646                 }
647             },
648             "ToscaConceptIdentifier": {
649                 "type": "object",
650                 "properties": {
651                     "name": {
652                         "type": "string"
653                     },
654                     "version": {
655                         "type": "string"
656                     }
657                 }
658             },
659             "AutomationComposition": {
660                 "type": "object",
661                 "properties": {
662                     "name": {
663                         "type": "string"
664                     },
665                     "version": {
666                         "type": "string"
667                     },
668                     "derivedFrom": {
669                         "type": "string"
670                     },
671                     "metadata": {
672                         "type": "object",
673                         "additionalProperties": {
674                             "type": "object"
675                         }
676                     },
677                     "description": {
678                         "type": "string"
679                     },
680                     "instanceId": {
681                         "type": "string",
682                         "format": "uuid"
683                     },
684                     "compositionId": {
685                         "type": "string",
686                         "format": "uuid"
687                     },
688                     "compositionTargetId": {
689                         "type": "string",
690                         "format": "uuid"
691                     },
692                     "restarting": {
693                         "type": "boolean"
694                     },
695                     "deployState": {
696                         "type": "string",
697                         "enum": [
698                             "DEPLOYED",
699                             "DEPLOYING",
700                             "UNDEPLOYED",
701                             "UNDEPLOYING",
702                             "DELETING",
703                             "DELETED",
704                             "UPDATING",
705                             "MIGRATING"
706                         ]
707                     },
708                     "lockState": {
709                         "type": "string",
710                         "enum": [
711                             "LOCKED",
712                             "LOCKING",
713                             "UNLOCKED",
714                             "UNLOCKING",
715                             "NONE"
716                         ]
717                     },
718                     "elements": {
719                         "type": "object",
720                         "additionalProperties": {
721                             "$ref": "#/components/schemas/AutomationCompositionElement"
722                         }
723                     },
724                     "stateChangeResult": {
725                         "type": "string",
726                         "enum": [
727                             "NO_ERROR",
728                             "FAILED",
729                             "TIMEOUT"
730                         ]
731                     },
732                     "definedName": {
733                         "type": "string"
734                     },
735                     "definedVersion": {
736                         "type": "string"
737                     },
738                     "typeVersion": {
739                         "type": "string"
740                     },
741                     "key": {
742                         "$ref": "#/components/schemas/ToscaEntityKey"
743                     },
744                     "type": {
745                         "type": "string"
746                     }
747                 }
748             },
749             "AutomationCompositionElement": {
750                 "type": "object",
751                 "properties": {
752                     "id": {
753                         "type": "string",
754                         "format": "uuid"
755                     },
756                     "definition": {
757                         "$ref": "#/components/schemas/ToscaConceptIdentifier"
758                     },
759                     "participantId": {
760                         "type": "string",
761                         "format": "uuid"
762                     },
763                     "restarting": {
764                         "type": "boolean"
765                     },
766                     "deployState": {
767                         "type": "string",
768                         "enum": [
769                             "DEPLOYED",
770                             "DEPLOYING",
771                             "UNDEPLOYED",
772                             "UNDEPLOYING",
773                             "DELETING",
774                             "DELETED",
775                             "UPDATING",
776                             "MIGRATING"
777                         ]
778                     },
779                     "lockState": {
780                         "type": "string",
781                         "enum": [
782                             "LOCKED",
783                             "LOCKING",
784                             "UNLOCKED",
785                             "UNLOCKING",
786                             "NONE"
787                         ]
788                     },
789                     "operationalState": {
790                         "type": "string"
791                     },
792                     "useState": {
793                         "type": "string"
794                     },
795                     "description": {
796                         "type": "string"
797                     },
798                     "message": {
799                         "type": "string"
800                     },
801                     "properties": {
802                         "type": "object",
803                         "additionalProperties": {
804                             "type": "object"
805                         }
806                     },
807                     "outProperties": {
808                         "type": "object",
809                         "additionalProperties": {
810                             "type": "object"
811                         }
812                     }
813                 }
814             },
815             "AutomationCompositions": {
816                 "type": "object",
817                 "properties": {
818                     "automationCompositionList": {
819                         "type": "array",
820                         "items": {
821                             "$ref": "#/components/schemas/AutomationComposition"
822                         }
823                     }
824                 }
825             },
826             "ToscaEntityKey": {
827                 "type": "object",
828                 "properties": {
829                     "name": {
830                         "type": "string"
831                     },
832                     "version": {
833                         "type": "string"
834                     }
835                 }
836             },
837             "InternalDatas": {
838                 "type": "object",
839                 "properties": {
840                     "list": {
841                         "type": "array",
842                         "items": {
843                             "$ref": "#/components/schemas/InternalData"
844                         }
845                     }
846                 }
847             }
848         }
849     }
850 }