Add OpenAPI Swagger 3 spc and API generation
[policy/api.git] / main / src / main / resources / openapi / openapi.yaml
1 openapi: 3.0.1
2 info:
3   title: Api Documentation
4   description: Api Documentation
5   termsOfService: urn:tos
6   contact: {}
7   license:
8     name: Apache 2.0
9     url: http://www.apache.org/licenses/LICENSE-2.0
10   version: "1.0"
11 servers:
12 - url: //localhost:30440/
13 tags:
14 - name: policy-api-rest-controller
15   description: Api Rest Controller
16 paths:
17   /policy/api/v1/healthcheck:
18     get:
19       tags:
20       - HealthCheck
21       summary: Perform a system healthcheck
22       description: Returns healthy status of the Policy API component
23       operationId: getHealthCheck
24       parameters:
25       - name: X-ONAP-RequestID
26         in: header
27         description: RequestID for http transaction
28         schema:
29           type: string
30           format: uuid
31       responses:
32         200:
33           description: Serialised instance of
34             [HealthCheckReport](https://github.com/onap/policy-common/blob/master/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/report/HealthCheckReport.java)
35           headers:
36             X-LatestVersion:
37               schema:
38                 type: string
39             X-PatchVersion:
40               schema:
41                 type: string
42             X-MinorVersion:
43               schema:
44                 type: string
45             X-onap-RequestId:
46               schema:
47                 type: string
48                 format: uuid
49           content:
50             application/json:
51               schema:
52                 $ref: '#/components/schemas/HealthCheckReport'
53             application/yaml:
54               schema:
55                 $ref: '#/components/schemas/HealthCheckReport'
56         401:
57           description: Authentication Error
58           headers:
59             X-LatestVersion:
60               schema:
61                 type: string
62             X-PatchVersion:
63               schema:
64                 type: string
65             X-MinorVersion:
66               schema:
67                 type: string
68             X-ONAP-RequestID:
69               schema:
70                 type: string
71                 format: uuid
72           content: {}
73         403:
74           description: Authorization Error
75           headers:
76             X-LatestVersion:
77               schema:
78                 type: string
79             X-PatchVersion:
80               schema:
81                 type: string
82             X-MinorVersion:
83               schema:
84                 type: string
85             X-ONAP-RequestID:
86               schema:
87                 type: string
88                 format: uuid
89           content: {}
90         404:
91           description: Not Found
92           headers:
93             X-LatestVersion:
94               schema:
95                 type: string
96             X-PatchVersion:
97               schema:
98                 type: string
99             X-MinorVersion:
100               schema:
101                 type: string
102             X-onap-RequestId:
103               schema:
104                 type: string
105                 format: uuid
106           content: {}
107         500:
108           description: Internal Server Error
109           headers:
110             X-LatestVersion:
111               schema:
112                 type: string
113             X-PatchVersion:
114               schema:
115                 type: string
116             X-MinorVersion:
117               schema:
118                 type: string
119             X-ONAP-RequestID:
120               schema:
121                 type: string
122                 format: uuid
123           content: {}
124       security:
125       - basicAuth: []
126       x-interface info:
127         api-version: 1.0.0
128         last-mod-release: Dublin
129   /policy/api/v1/nodetemplates:
130     get:
131       tags:
132       - NodeTemplates
133       summary: Retrieve all the available tosca node templates
134       description: Returns all the node templates from the service template
135       operationId: getAllNodeTemplates
136       parameters:
137       - name: X-ONAP-RequestID
138         in: header
139         description: RequestID for http transaction
140         schema:
141           type: string
142           format: uuid
143       responses:
144         200:
145           description: OK, returns an array of
146             [ToscaNodeTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaNodeTemplate.java)
147             objects
148           headers:
149             X-LatestVersion:
150               schema:
151                 type: string
152             X-PatchVersion:
153               schema:
154                 type: string
155             X-MinorVersion:
156               schema:
157                 type: string
158             X-onap-RequestId:
159               schema:
160                 type: string
161                 format: uuid
162           content:
163             application/json:
164               schema:
165                 type: array
166                 items:
167                   $ref: '#/components/schemas/ToscaNodeTemplate'
168             application/yaml:
169               schema:
170                 type: array
171                 items:
172                   $ref: '#/components/schemas/ToscaNodeTemplate'
173         401:
174           description: Authentication Error
175           headers:
176             X-LatestVersion:
177               schema:
178                 type: string
179             X-PatchVersion:
180               schema:
181                 type: string
182             X-MinorVersion:
183               schema:
184                 type: string
185             X-ONAP-RequestID:
186               schema:
187                 type: string
188                 format: uuid
189           content: {}
190         403:
191           description: Authorization Error
192           headers:
193             X-LatestVersion:
194               schema:
195                 type: string
196             X-PatchVersion:
197               schema:
198                 type: string
199             X-MinorVersion:
200               schema:
201                 type: string
202             X-ONAP-RequestID:
203               schema:
204                 type: string
205                 format: uuid
206           content: {}
207         404:
208           description: Resource Not Found
209           headers:
210             X-LatestVersion:
211               schema:
212                 type: string
213             X-PatchVersion:
214               schema:
215                 type: string
216             X-MinorVersion:
217               schema:
218                 type: string
219             X-ONAP-RequestID:
220               schema:
221                 type: string
222                 format: uuid
223           content: {}
224         500:
225           description: Internal Server Error
226           headers:
227             X-LatestVersion:
228               schema:
229                 type: string
230             X-PatchVersion:
231               schema:
232                 type: string
233             X-MinorVersion:
234               schema:
235                 type: string
236             X-ONAP-RequestID:
237               schema:
238                 type: string
239                 format: uuid
240           content: {}
241       security:
242       - basicAuth: []
243       x-interface info:
244         api-version: 1.0.0
245         last-mod-release: Jakarta
246     put:
247       tags:
248       - NodeTemplates
249       summary: Updates one or more new node templates
250       description: Client should provide TOSCA body of the updated node templates in an instance of
251         [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
252       operationId: updateToscaNodeTemplates
253       parameters:
254       - name: X-ONAP-RequestID
255         in: header
256         description: RequestID for http transaction
257         schema:
258           type: string
259           format: uuid
260       requestBody:
261         description: Entity body of tosca node templates
262         content:
263           application/json:
264             schema:
265               type: array
266               items:
267                 $ref: '#/components/schemas/ToscaNodeTemplate'
268           application/yaml:
269             schema:
270               type: array
271               items:
272                 $ref: '#/components/schemas/ToscaNodeTemplate'
273         required: true
274       responses:
275         200:
276           description: OK, returns the updated Node Templates in an instance of
277             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
278           headers:
279             X-LatestVersion:
280               schema:
281                 type: string
282             X-PatchVersion:
283               schema:
284                 type: string
285             X-MinorVersion:
286               schema:
287                 type: string
288             X-onap-RequestId:
289               schema:
290                 type: string
291                 format: uuid
292           content:
293             application/json:
294               schema:
295                 $ref: '#/components/schemas/ToscaServiceTemplate'
296             application/yaml:
297               schema:
298                 $ref: '#/components/schemas/ToscaServiceTemplate'
299         201:
300           description: OK, returns the updated Node Templates in an instance of
301             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
302           headers:
303             X-LatestVersion:
304               schema:
305                 type: string
306             X-PatchVersion:
307               schema:
308                 type: string
309             X-MinorVersion:
310               schema:
311                 type: string
312             X-onap-RequestId:
313               schema:
314                 type: string
315                 format: uuid
316           content:
317             application/json:
318               schema:
319                 $ref: '#/components/schemas/ToscaServiceTemplate'
320             application/yaml:
321               schema:
322                 $ref: '#/components/schemas/ToscaServiceTemplate'
323         400:
324           description: Invalid Body
325           headers:
326             X-LatestVersion:
327               schema:
328                 type: string
329             X-PatchVersion:
330               schema:
331                 type: string
332             X-MinorVersion:
333               schema:
334                 type: string
335             X-ONAP-RequestID:
336               schema:
337                 type: string
338                 format: uuid
339           content: {}
340         401:
341           description: Authentication Error
342           headers:
343             X-LatestVersion:
344               schema:
345                 type: string
346             X-PatchVersion:
347               schema:
348                 type: string
349             X-MinorVersion:
350               schema:
351                 type: string
352             X-ONAP-RequestID:
353               schema:
354                 type: string
355                 format: uuid
356           content: {}
357         403:
358           description: Authorization Error
359           headers:
360             X-LatestVersion:
361               schema:
362                 type: string
363             X-PatchVersion:
364               schema:
365                 type: string
366             X-MinorVersion:
367               schema:
368                 type: string
369             X-ONAP-RequestID:
370               schema:
371                 type: string
372                 format: uuid
373           content: {}
374         404:
375           description: Resource Not Found
376           headers:
377             X-LatestVersion:
378               schema:
379                 type: string
380             X-PatchVersion:
381               schema:
382                 type: string
383             X-MinorVersion:
384               schema:
385                 type: string
386             X-ONAP-RequestID:
387               schema:
388                 type: string
389                 format: uuid
390           content: {}
391         406:
392           description: Not Acceptable Payload
393           headers:
394             X-LatestVersion:
395               schema:
396                 type: string
397             X-PatchVersion:
398               schema:
399                 type: string
400             X-MinorVersion:
401               schema:
402                 type: string
403             X-ONAP-RequestID:
404               schema:
405                 type: string
406                 format: uuid
407           content: {}
408         500:
409           description: Internal Server Error
410           headers:
411             X-LatestVersion:
412               schema:
413                 type: string
414             X-PatchVersion:
415               schema:
416                 type: string
417             X-MinorVersion:
418               schema:
419                 type: string
420             X-ONAP-RequestID:
421               schema:
422                 type: string
423                 format: uuid
424           content: {}
425       security:
426       - basicAuth: []
427       x-interface info:
428         api-version: 1.0.0
429         last-mod-release: Jakarta
430       x-codegen-request-body-name: body
431     post:
432       tags:
433       - NodeTemplates
434       summary: Create one or more new node templates
435       description: Client should provide TOSCA body of the new node templates
436       operationId: createToscaNodeTemplates
437       parameters:
438       - name: X-ONAP-RequestID
439         in: header
440         description: RequestID for http transaction
441         schema:
442           type: string
443           format: uuid
444       requestBody:
445         description: Entity body of tosca node templates contained in an instance of
446             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
447         content:
448           application/json:
449             schema:
450               $ref: '#/components/schemas/ToscaServiceTemplate'
451           application/yaml:
452             schema:
453               $ref: '#/components/schemas/ToscaServiceTemplate'
454         required: true
455       responses:
456         200:
457           description: OK, returns the created node templates in an instance of
458             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
459           headers:
460             X-LatestVersion:
461               schema:
462                 type: string
463             X-PatchVersion:
464               schema:
465                 type: string
466             X-MinorVersion:
467               schema:
468                 type: string
469             X-onap-RequestId:
470               schema:
471                 type: string
472                 format: uuid
473           content:
474             application/json:
475               schema:
476                 $ref: '#/components/schemas/ToscaServiceTemplate'
477             application/yaml:
478               schema:
479                 $ref: '#/components/schemas/ToscaServiceTemplate'
480         201:
481           description: OK, returns the created node templates in an instance of
482             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
483           headers:
484             X-LatestVersion:
485               schema:
486                 type: string
487             X-PatchVersion:
488               schema:
489                 type: string
490             X-MinorVersion:
491               schema:
492                 type: string
493             X-onap-RequestId:
494               schema:
495                 type: string
496                 format: uuid
497           content:
498             application/json:
499               schema:
500                 $ref: '#/components/schemas/ToscaServiceTemplate'
501             application/yaml:
502               schema:
503                 $ref: '#/components/schemas/ToscaServiceTemplate'
504         400:
505           description: Invalid Body
506           headers:
507             X-LatestVersion:
508               schema:
509                 type: string
510             X-PatchVersion:
511               schema:
512                 type: string
513             X-MinorVersion:
514               schema:
515                 type: string
516             X-ONAP-RequestID:
517               schema:
518                 type: string
519                 format: uuid
520           content: {}
521         401:
522           description: Authentication Error
523           headers:
524             X-LatestVersion:
525               schema:
526                 type: string
527             X-PatchVersion:
528               schema:
529                 type: string
530             X-MinorVersion:
531               schema:
532                 type: string
533             X-ONAP-RequestID:
534               schema:
535                 type: string
536                 format: uuid
537           content: {}
538         403:
539           description: Authorization Error
540           headers:
541             X-LatestVersion:
542               schema:
543                 type: string
544             X-PatchVersion:
545               schema:
546                 type: string
547             X-MinorVersion:
548               schema:
549                 type: string
550             X-ONAP-RequestID:
551               schema:
552                 type: string
553                 format: uuid
554           content: {}
555         404:
556           description: Resource Not Found
557           headers:
558             X-LatestVersion:
559               schema:
560                 type: string
561             X-PatchVersion:
562               schema:
563                 type: string
564             X-MinorVersion:
565               schema:
566                 type: string
567             X-ONAP-RequestID:
568               schema:
569                 type: string
570                 format: uuid
571           content: {}
572         406:
573           description: Not Acceptable Payload
574           headers:
575             X-LatestVersion:
576               schema:
577                 type: string
578             X-PatchVersion:
579               schema:
580                 type: string
581             X-MinorVersion:
582               schema:
583                 type: string
584             X-ONAP-RequestID:
585               schema:
586                 type: string
587                 format: uuid
588           content: {}
589         500:
590           description: Internal Server Error
591           headers:
592             X-LatestVersion:
593               schema:
594                 type: string
595             X-PatchVersion:
596               schema:
597                 type: string
598             X-MinorVersion:
599               schema:
600                 type: string
601             X-ONAP-RequestID:
602               schema:
603                 type: string
604                 format: uuid
605           content: {}
606       security:
607       - basicAuth: []
608       x-interface info:
609         api-version: 1.0.0
610         last-mod-release: Jakarta
611       x-codegen-request-body-name: body
612   /policy/api/v1/nodetemplates/{name}/versions/{version}:
613     get:
614       tags:
615       - NodeTemplates
616       summary: Retrieve one version of a tosca node template
617       description: Returns a particular version of a node template
618       operationId: getSpecificVersionOfNodeTemplate
619       parameters:
620       - name: name
621         in: path
622         description: Name of the node template
623         required: true
624         schema:
625           type: string
626       - name: version
627         in: path
628         description: Version of the node template
629         required: true
630         schema:
631           type: string
632       - name: X-ONAP-RequestID
633         in: header
634         description: RequestID for http transaction
635         schema:
636           type: string
637           format: uuid
638       responses:
639         200:
640           description: OK, returns an array of
641             [ToscaNodeTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaNodeTemplate.java)
642           headers:
643             X-LatestVersion:
644               schema:
645                 type: string
646             X-PatchVersion:
647               schema:
648                 type: string
649             X-MinorVersion:
650               schema:
651                 type: string
652             X-onap-RequestId:
653               schema:
654                 type: string
655                 format: uuid
656           content:
657             application/json:
658               schema:
659                 type: array
660                 items:
661                   $ref: '#/components/schemas/ToscaNodeTemplate'
662             application/yaml:
663               schema:
664                 type: array
665                 items:
666                   $ref: '#/components/schemas/ToscaNodeTemplate'
667         401:
668           description: Authentication Error
669           headers:
670             X-LatestVersion:
671               schema:
672                 type: string
673             X-PatchVersion:
674               schema:
675                 type: string
676             X-MinorVersion:
677               schema:
678                 type: string
679             X-ONAP-RequestID:
680               schema:
681                 type: string
682                 format: uuid
683           content: {}
684         403:
685           description: Authorization Error
686           headers:
687             X-LatestVersion:
688               schema:
689                 type: string
690             X-PatchVersion:
691               schema:
692                 type: string
693             X-MinorVersion:
694               schema:
695                 type: string
696             X-ONAP-RequestID:
697               schema:
698                 type: string
699                 format: uuid
700           content: {}
701         404:
702           description: Resource Not Found
703           headers:
704             X-LatestVersion:
705               schema:
706                 type: string
707             X-PatchVersion:
708               schema:
709                 type: string
710             X-MinorVersion:
711               schema:
712                 type: string
713             X-ONAP-RequestID:
714               schema:
715                 type: string
716                 format: uuid
717           content: {}
718         500:
719           description: Internal Server Error
720           headers:
721             X-LatestVersion:
722               schema:
723                 type: string
724             X-PatchVersion:
725               schema:
726                 type: string
727             X-MinorVersion:
728               schema:
729                 type: string
730             X-ONAP-RequestID:
731               schema:
732                 type: string
733                 format: uuid
734           content: {}
735       security:
736       - basicAuth: []
737       x-interface info:
738         api-version: 1.0.0
739         last-mod-release: Jakarta
740     delete:
741       tags:
742       - NodeTemplates
743       summary: Updates one or more new node templates
744       description: Client should provide TOSCA body of the updated node templates
745       operationId: deleteToscaNodeTemplates
746       parameters:
747       - name: name
748         in: path
749         description: Name of the node template
750         required: true
751         schema:
752           type: string
753       - name: version
754         in: path
755         description: Version of the node template
756         required: true
757         schema:
758           type: string
759       - name: X-ONAP-RequestID
760         in: header
761         description: RequestID for http transaction
762         schema:
763           type: string
764           format: uuid
765       responses:
766         200:
767           description: OK, returns the delete node template in an instance of
768             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
769           headers:
770             X-LatestVersion:
771               schema:
772                 type: string
773             X-PatchVersion:
774               schema:
775                 type: string
776             X-MinorVersion:
777               schema:
778                 type: string
779             X-onap-RequestId:
780               schema:
781                 type: string
782                 format: uuid
783           content:
784             application/json:
785               schema:
786                 $ref: '#/components/schemas/ToscaServiceTemplate'
787             application/yaml:
788               schema:
789                 $ref: '#/components/schemas/ToscaServiceTemplate'
790         204:
791           description: No Content
792           headers:
793             X-LatestVersion:
794               schema:
795                 type: string
796             X-PatchVersion:
797               schema:
798                 type: string
799             X-MinorVersion:
800               schema:
801                 type: string
802             X-onap-RequestId:
803               schema:
804                 type: string
805                 format: uuid
806           content: {}
807         400:
808           description: Invalid Body
809           headers:
810             X-LatestVersion:
811               schema:
812                 type: string
813             X-PatchVersion:
814               schema:
815                 type: string
816             X-MinorVersion:
817               schema:
818                 type: string
819             X-ONAP-RequestID:
820               schema:
821                 type: string
822                 format: uuid
823           content: {}
824         401:
825           description: Authentication Error
826           headers:
827             X-LatestVersion:
828               schema:
829                 type: string
830             X-PatchVersion:
831               schema:
832                 type: string
833             X-MinorVersion:
834               schema:
835                 type: string
836             X-ONAP-RequestID:
837               schema:
838                 type: string
839                 format: uuid
840           content: {}
841         403:
842           description: Authorization Error
843           headers:
844             X-LatestVersion:
845               schema:
846                 type: string
847             X-PatchVersion:
848               schema:
849                 type: string
850             X-MinorVersion:
851               schema:
852                 type: string
853             X-ONAP-RequestID:
854               schema:
855                 type: string
856                 format: uuid
857           content: {}
858         404:
859           description: Resource Not Found
860           headers:
861             X-LatestVersion:
862               schema:
863                 type: string
864             X-PatchVersion:
865               schema:
866                 type: string
867             X-MinorVersion:
868               schema:
869                 type: string
870             X-ONAP-RequestID:
871               schema:
872                 type: string
873                 format: uuid
874           content: {}
875         406:
876           description: Not Acceptable Payload
877           headers:
878             X-LatestVersion:
879               schema:
880                 type: string
881             X-PatchVersion:
882               schema:
883                 type: string
884             X-MinorVersion:
885               schema:
886                 type: string
887             X-ONAP-RequestID:
888               schema:
889                 type: string
890                 format: uuid
891           content: {}
892         500:
893           description: Internal Server Error
894           headers:
895             X-LatestVersion:
896               schema:
897                 type: string
898             X-PatchVersion:
899               schema:
900                 type: string
901             X-MinorVersion:
902               schema:
903                 type: string
904             X-ONAP-RequestID:
905               schema:
906                 type: string
907                 format: uuid
908           content: {}
909       security:
910       - basicAuth: []
911       x-interface info:
912         api-version: 1.0.0
913         last-mod-release: Jakarta
914   /policy/api/v1/policies:
915     get:
916       tags:
917       - PolicyInstances
918       summary: Retrieve all versions of available policies
919       description: Returns all version of available policies
920       operationId: getPolicies
921       parameters:
922       - name: mode
923         in: query
924         description: Fetch mode for policies, BARE for bare  policies (default), REFERENCED
925           for fully referenced policies
926         schema:
927           type: string
928           default: BARE
929           enum:
930           - BARE
931           - REFERENCED
932       - name: X-ONAP-RequestID
933         in: header
934         description: RequestID for http transaction
935         schema:
936           type: string
937           format: uuid
938       responses:
939         200:
940           description: OK, returns the found policies in an instance of
941             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
942           headers:
943             X-LatestVersion:
944               schema:
945                 type: string
946             X-PatchVersion:
947               schema:
948                 type: string
949             X-MinorVersion:
950               schema:
951                 type: string
952             X-onap-RequestId:
953               schema:
954                 type: string
955                 format: uuid
956           content:
957             application/json:
958               schema:
959                 $ref: '#/components/schemas/ToscaServiceTemplate'
960             application/yaml:
961               schema:
962                 $ref: '#/components/schemas/ToscaServiceTemplate'
963         401:
964           description: Authentication Error
965           headers:
966             X-LatestVersion:
967               schema:
968                 type: string
969             X-PatchVersion:
970               schema:
971                 type: string
972             X-MinorVersion:
973               schema:
974                 type: string
975             X-ONAP-RequestID:
976               schema:
977                 type: string
978                 format: uuid
979           content: {}
980         403:
981           description: Authorization Error
982           headers:
983             X-LatestVersion:
984               schema:
985                 type: string
986             X-PatchVersion:
987               schema:
988                 type: string
989             X-MinorVersion:
990               schema:
991                 type: string
992             X-ONAP-RequestID:
993               schema:
994                 type: string
995                 format: uuid
996           content: {}
997         404:
998           description: Resource Not Found
999           headers:
1000             X-LatestVersion:
1001               schema:
1002                 type: string
1003             X-PatchVersion:
1004               schema:
1005                 type: string
1006             X-MinorVersion:
1007               schema:
1008                 type: string
1009             X-ONAP-RequestID:
1010               schema:
1011                 type: string
1012                 format: uuid
1013           content: {}
1014         500:
1015           description: Internal Server Error
1016           headers:
1017             X-LatestVersion:
1018               schema:
1019                 type: string
1020             X-PatchVersion:
1021               schema:
1022                 type: string
1023             X-MinorVersion:
1024               schema:
1025                 type: string
1026             X-ONAP-RequestID:
1027               schema:
1028                 type: string
1029                 format: uuid
1030           content: {}
1031       security:
1032       - basicAuth: []
1033       x-interface info:
1034         api-version: 1.0.0
1035         last-mod-release: Guilin
1036     post:
1037       tags:
1038       - PolicyInstances
1039       summary: Create one or more new policies
1040       description: Client should provide TOSCA body of the new polic(ies)
1041       operationId: createPolicies
1042       parameters:
1043       - name: X-ONAP-RequestID
1044         in: header
1045         description: RequestID for http transaction
1046         schema:
1047           type: string
1048           format: uuid
1049       requestBody:
1050         description: Entity body of the policies to be created contained in an instance of
1051             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1052         content:
1053           application/json:
1054             schema:
1055               $ref: '#/components/schemas/ToscaServiceTemplate'
1056           application/yaml:
1057             schema:
1058               $ref: '#/components/schemas/ToscaServiceTemplate'
1059         required: true
1060       responses:
1061         200:
1062           description: OK, the policies created in an instance of
1063             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1064           headers:
1065             X-LatestVersion:
1066               schema:
1067                 type: string
1068             X-PatchVersion:
1069               schema:
1070                 type: string
1071             X-MinorVersion:
1072               schema:
1073                 type: string
1074             X-onap-RequestId:
1075               schema:
1076                 type: string
1077                 format: uuid
1078           content:
1079             application/json:
1080               schema:
1081                 $ref: '#/components/schemas/ToscaServiceTemplate'
1082             application/yaml:
1083               schema:
1084                 $ref: '#/components/schemas/ToscaServiceTemplate'
1085         201:
1086           description: OK, the policies created in an instance of
1087             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1088           headers:
1089             X-LatestVersion:
1090               schema:
1091                 type: string
1092             X-PatchVersion:
1093               schema:
1094                 type: string
1095             X-MinorVersion:
1096               schema:
1097                 type: string
1098             X-onap-RequestId:
1099               schema:
1100                 type: string
1101                 format: uuid
1102           content:
1103             application/json:
1104               schema:
1105                 $ref: '#/components/schemas/ToscaServiceTemplate'
1106             application/yaml:
1107               schema:
1108                 $ref: '#/components/schemas/ToscaServiceTemplate'
1109         400:
1110           description: Invalid Body
1111           headers:
1112             X-LatestVersion:
1113               schema:
1114                 type: string
1115             X-PatchVersion:
1116               schema:
1117                 type: string
1118             X-MinorVersion:
1119               schema:
1120                 type: string
1121             X-ONAP-RequestID:
1122               schema:
1123                 type: string
1124                 format: uuid
1125           content: {}
1126         401:
1127           description: Authentication Error
1128           headers:
1129             X-LatestVersion:
1130               schema:
1131                 type: string
1132             X-PatchVersion:
1133               schema:
1134                 type: string
1135             X-MinorVersion:
1136               schema:
1137                 type: string
1138             X-ONAP-RequestID:
1139               schema:
1140                 type: string
1141                 format: uuid
1142           content: {}
1143         403:
1144           description: Authorization Error
1145           headers:
1146             X-LatestVersion:
1147               schema:
1148                 type: string
1149             X-PatchVersion:
1150               schema:
1151                 type: string
1152             X-MinorVersion:
1153               schema:
1154                 type: string
1155             X-ONAP-RequestID:
1156               schema:
1157                 type: string
1158                 format: uuid
1159           content: {}
1160         404:
1161           description: Resource Not Found
1162           headers:
1163             X-LatestVersion:
1164               schema:
1165                 type: string
1166             X-PatchVersion:
1167               schema:
1168                 type: string
1169             X-MinorVersion:
1170               schema:
1171                 type: string
1172             X-ONAP-RequestID:
1173               schema:
1174                 type: string
1175                 format: uuid
1176           content: {}
1177         406:
1178           description: Not Acceptable Payload
1179           headers:
1180             X-LatestVersion:
1181               schema:
1182                 type: string
1183             X-PatchVersion:
1184               schema:
1185                 type: string
1186             X-MinorVersion:
1187               schema:
1188                 type: string
1189             X-ONAP-RequestID:
1190               schema:
1191                 type: string
1192                 format: uuid
1193           content: {}
1194         500:
1195           description: Internal Server Error
1196           headers:
1197             X-LatestVersion:
1198               schema:
1199                 type: string
1200             X-PatchVersion:
1201               schema:
1202                 type: string
1203             X-MinorVersion:
1204               schema:
1205                 type: string
1206             X-ONAP-RequestID:
1207               schema:
1208                 type: string
1209                 format: uuid
1210           content: {}
1211       security:
1212       - basicAuth: []
1213       x-interface info:
1214         api-version: 1.0.0
1215         last-mod-release: El Alto
1216       x-codegen-request-body-name: body
1217   /policy/api/v1/policies/{policyId}/versions/{policyVersion}:
1218     get:
1219       tags:
1220       - PolicyInstances
1221       summary: Retrieve specific version of a specified policy
1222       description: Returns a particular version of specified policy
1223       operationId: getSpecificPolicy
1224       parameters:
1225       - name: mode
1226         in: query
1227         description: Fetch mode for policies, BARE for bare  policies (default), REFERENCED
1228           for fully referenced policies
1229         schema:
1230           type: string
1231           default: BARE
1232           enum:
1233           - BARE
1234           - REFERENCED
1235       - name: policyId
1236         in: path
1237         description: Name of policy
1238         required: true
1239         schema:
1240           type: string
1241       - name: policyVersion
1242         in: path
1243         description: Version of policy
1244         required: true
1245         schema:
1246           type: string
1247       - name: X-ONAP-RequestID
1248         in: header
1249         description: RequestID for http transaction
1250         schema:
1251           type: string
1252           format: uuid
1253       responses:
1254         200:
1255           description: OK, returns the found policies in an instance of
1256             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1257           headers:
1258             X-LatestVersion:
1259               schema:
1260                 type: string
1261             X-PatchVersion:
1262               schema:
1263                 type: string
1264             X-MinorVersion:
1265               schema:
1266                 type: string
1267             X-onap-RequestId:
1268               schema:
1269                 type: string
1270                 format: uuid
1271           content:
1272             application/json:
1273               schema:
1274                 $ref: '#/components/schemas/ToscaServiceTemplate'
1275             application/yaml:
1276               schema:
1277                 $ref: '#/components/schemas/ToscaServiceTemplate'
1278         401:
1279           description: Authentication Error
1280           headers:
1281             X-LatestVersion:
1282               schema:
1283                 type: string
1284             X-PatchVersion:
1285               schema:
1286                 type: string
1287             X-MinorVersion:
1288               schema:
1289                 type: string
1290             X-ONAP-RequestID:
1291               schema:
1292                 type: string
1293                 format: uuid
1294           content: {}
1295         403:
1296           description: Authorization Error
1297           headers:
1298             X-LatestVersion:
1299               schema:
1300                 type: string
1301             X-PatchVersion:
1302               schema:
1303                 type: string
1304             X-MinorVersion:
1305               schema:
1306                 type: string
1307             X-ONAP-RequestID:
1308               schema:
1309                 type: string
1310                 format: uuid
1311           content: {}
1312         404:
1313           description: Resource Not Found
1314           headers:
1315             X-LatestVersion:
1316               schema:
1317                 type: string
1318             X-PatchVersion:
1319               schema:
1320                 type: string
1321             X-MinorVersion:
1322               schema:
1323                 type: string
1324             X-ONAP-RequestID:
1325               schema:
1326                 type: string
1327                 format: uuid
1328           content: {}
1329         500:
1330           description: Internal Server Error
1331           headers:
1332             X-LatestVersion:
1333               schema:
1334                 type: string
1335             X-PatchVersion:
1336               schema:
1337                 type: string
1338             X-MinorVersion:
1339               schema:
1340                 type: string
1341             X-ONAP-RequestID:
1342               schema:
1343                 type: string
1344                 format: uuid
1345           content: {}
1346       security:
1347       - basicAuth: []
1348       x-interface info:
1349         api-version: 1.0.0
1350         last-mod-release: Guilin
1351     delete:
1352       tags:
1353       - PolicyInstances
1354       summary: Delete a particular version of a policy
1355       description: 'Rule: the version that has been deployed in PDP group(s) cannot
1356         be deleted'
1357       operationId: deleteSpecificPolicy
1358       parameters:
1359       - name: policyId
1360         in: path
1361         description: ID of policy
1362         required: true
1363         schema:
1364           type: string
1365       - name: policyVersion
1366         in: path
1367         description: Version of policy
1368         required: true
1369         schema:
1370           type: string
1371       - name: X-ONAP-RequestID
1372         in: header
1373         description: RequestID for http transaction
1374         schema:
1375           type: string
1376           format: uuid
1377       responses:
1378         200:
1379           description: OK, returns the deleted policy in an instance of
1380             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1381           headers:
1382             X-LatestVersion:
1383               schema:
1384                 type: string
1385             X-PatchVersion:
1386               schema:
1387                 type: string
1388             X-MinorVersion:
1389               schema:
1390                 type: string
1391             X-onap-RequestId:
1392               schema:
1393                 type: string
1394                 format: uuid
1395           content:
1396             application/json:
1397               schema:
1398                 $ref: '#/components/schemas/ToscaServiceTemplate'
1399             application/yaml:
1400               schema:
1401                 $ref: '#/components/schemas/ToscaServiceTemplate'
1402         204:
1403           description: No Content
1404           headers:
1405             X-LatestVersion:
1406               schema:
1407                 type: string
1408             X-PatchVersion:
1409               schema:
1410                 type: string
1411             X-MinorVersion:
1412               schema:
1413                 type: string
1414             X-onap-RequestId:
1415               schema:
1416                 type: string
1417                 format: uuid
1418           content: {}
1419         401:
1420           description: Authentication Error
1421           headers:
1422             X-LatestVersion:
1423               schema:
1424                 type: string
1425             X-PatchVersion:
1426               schema:
1427                 type: string
1428             X-MinorVersion:
1429               schema:
1430                 type: string
1431             X-ONAP-RequestID:
1432               schema:
1433                 type: string
1434                 format: uuid
1435           content: {}
1436         403:
1437           description: Authorization Error
1438           headers:
1439             X-LatestVersion:
1440               schema:
1441                 type: string
1442             X-PatchVersion:
1443               schema:
1444                 type: string
1445             X-MinorVersion:
1446               schema:
1447                 type: string
1448             X-ONAP-RequestID:
1449               schema:
1450                 type: string
1451                 format: uuid
1452           content: {}
1453         404:
1454           description: Resource Not Found
1455           headers:
1456             X-LatestVersion:
1457               schema:
1458                 type: string
1459             X-PatchVersion:
1460               schema:
1461                 type: string
1462             X-MinorVersion:
1463               schema:
1464                 type: string
1465             X-ONAP-RequestID:
1466               schema:
1467                 type: string
1468                 format: uuid
1469           content: {}
1470         409:
1471           description: Delete Conflict, Rule Violation
1472           headers:
1473             X-LatestVersion:
1474               schema:
1475                 type: string
1476             X-PatchVersion:
1477               schema:
1478                 type: string
1479             X-MinorVersion:
1480               schema:
1481                 type: string
1482             X-ONAP-RequestID:
1483               schema:
1484                 type: string
1485                 format: uuid
1486           content: {}
1487         500:
1488           description: Internal Server Error
1489           headers:
1490             X-LatestVersion:
1491               schema:
1492                 type: string
1493             X-PatchVersion:
1494               schema:
1495                 type: string
1496             X-MinorVersion:
1497               schema:
1498                 type: string
1499             X-ONAP-RequestID:
1500               schema:
1501                 type: string
1502                 format: uuid
1503           content: {}
1504       security:
1505       - basicAuth: []
1506       x-interface info:
1507         api-version: 1.0.0
1508         last-mod-release: Guilin
1509   /policy/api/v1/policytypes:
1510     get:
1511       tags:
1512       - PolicyTypes
1513       summary: Retrieve existing policy types
1514       description: Returns a list of existing policy types stored in Policy Framework
1515       operationId: getAllPolicyTypes
1516       parameters:
1517       - name: X-ONAP-RequestID
1518         in: header
1519         description: RequestID for http transaction
1520         schema:
1521           type: string
1522           format: uuid
1523       responses:
1524         200:
1525           description: OK, the found policy types in an instance of
1526             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1527           headers:
1528             X-LatestVersion:
1529               schema:
1530                 type: string
1531             X-PatchVersion:
1532               schema:
1533                 type: string
1534             X-MinorVersion:
1535               schema:
1536                 type: string
1537             X-onap-RequestId:
1538               schema:
1539                 type: string
1540                 format: uuid
1541           content:
1542             application/json:
1543               schema:
1544                 $ref: '#/components/schemas/ToscaServiceTemplate'
1545             application/yaml:
1546               schema:
1547                 $ref: '#/components/schemas/ToscaServiceTemplate'
1548         401:
1549           description: Authentication Error
1550           headers:
1551             X-LatestVersion:
1552               schema:
1553                 type: string
1554             X-PatchVersion:
1555               schema:
1556                 type: string
1557             X-MinorVersion:
1558               schema:
1559                 type: string
1560             X-ONAP-RequestID:
1561               schema:
1562                 type: string
1563                 format: uuid
1564           content: {}
1565         403:
1566           description: Authorization Error
1567           headers:
1568             X-LatestVersion:
1569               schema:
1570                 type: string
1571             X-PatchVersion:
1572               schema:
1573                 type: string
1574             X-MinorVersion:
1575               schema:
1576                 type: string
1577             X-ONAP-RequestID:
1578               schema:
1579                 type: string
1580                 format: uuid
1581           content: {}
1582         404:
1583           description: Not Found
1584           headers:
1585             X-LatestVersion:
1586               schema:
1587                 type: string
1588             X-PatchVersion:
1589               schema:
1590                 type: string
1591             X-MinorVersion:
1592               schema:
1593                 type: string
1594             X-onap-RequestId:
1595               schema:
1596                 type: string
1597                 format: uuid
1598           content: {}
1599         500:
1600           description: Internal Server Error
1601           headers:
1602             X-LatestVersion:
1603               schema:
1604                 type: string
1605             X-PatchVersion:
1606               schema:
1607                 type: string
1608             X-MinorVersion:
1609               schema:
1610                 type: string
1611             X-ONAP-RequestID:
1612               schema:
1613                 type: string
1614                 format: uuid
1615           content: {}
1616       security:
1617       - basicAuth: []
1618       x-interface info:
1619         api-version: 1.0.0
1620         last-mod-release: Dublin
1621     post:
1622       tags:
1623       - PolicyTypes
1624       summary: Create a new policy type
1625       description: Client should provide TOSCA body of the new policy type
1626       operationId: createPolicyType
1627       parameters:
1628       - name: X-ONAP-RequestID
1629         in: header
1630         description: RequestID for http transaction
1631         schema:
1632           type: string
1633           format: uuid
1634       requestBody:
1635         description: Entity body of policy types to be created in an instance of
1636             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1637         content:
1638           application/json:
1639             schema:
1640               $ref: '#/components/schemas/ToscaServiceTemplate'
1641           application/yaml:
1642             schema:
1643               $ref: '#/components/schemas/ToscaServiceTemplate'
1644         required: true
1645       responses:
1646         200:
1647           description: OK, the created policy types in an instance of
1648             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1649           headers:
1650             X-LatestVersion:
1651               schema:
1652                 type: string
1653             X-PatchVersion:
1654               schema:
1655                 type: string
1656             X-MinorVersion:
1657               schema:
1658                 type: string
1659             X-onap-RequestId:
1660               schema:
1661                 type: string
1662                 format: uuid
1663           content:
1664             application/json:
1665               schema:
1666                 $ref: '#/components/schemas/ToscaServiceTemplate'
1667             application/yaml:
1668               schema:
1669                 $ref: '#/components/schemas/ToscaServiceTemplate'
1670         201:
1671           description: OK, the created policy types in an instance of
1672             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1673           headers:
1674             X-LatestVersion:
1675               schema:
1676                 type: string
1677             X-PatchVersion:
1678               schema:
1679                 type: string
1680             X-MinorVersion:
1681               schema:
1682                 type: string
1683             X-onap-RequestId:
1684               schema:
1685                 type: string
1686                 format: uuid
1687           content:
1688             application/json:
1689               schema:
1690                 $ref: '#/components/schemas/ToscaServiceTemplate'
1691             application/yaml:
1692               schema:
1693                 $ref: '#/components/schemas/ToscaServiceTemplate'
1694         400:
1695           description: Invalid Body
1696           headers:
1697             X-LatestVersion:
1698               schema:
1699                 type: string
1700             X-PatchVersion:
1701               schema:
1702                 type: string
1703             X-MinorVersion:
1704               schema:
1705                 type: string
1706             X-ONAP-RequestID:
1707               schema:
1708                 type: string
1709                 format: uuid
1710           content: {}
1711         401:
1712           description: Authentication Error
1713           headers:
1714             X-LatestVersion:
1715               schema:
1716                 type: string
1717             X-PatchVersion:
1718               schema:
1719                 type: string
1720             X-MinorVersion:
1721               schema:
1722                 type: string
1723             X-ONAP-RequestID:
1724               schema:
1725                 type: string
1726                 format: uuid
1727           content: {}
1728         403:
1729           description: Authorization Error
1730           headers:
1731             X-LatestVersion:
1732               schema:
1733                 type: string
1734             X-PatchVersion:
1735               schema:
1736                 type: string
1737             X-MinorVersion:
1738               schema:
1739                 type: string
1740             X-ONAP-RequestID:
1741               schema:
1742                 type: string
1743                 format: uuid
1744           content: {}
1745         404:
1746           description: Not Found
1747           headers:
1748             X-LatestVersion:
1749               schema:
1750                 type: string
1751             X-PatchVersion:
1752               schema:
1753                 type: string
1754             X-MinorVersion:
1755               schema:
1756                 type: string
1757             X-onap-RequestId:
1758               schema:
1759                 type: string
1760                 format: uuid
1761           content: {}
1762         406:
1763           description: Not Acceptable Payload
1764           headers:
1765             X-LatestVersion:
1766               schema:
1767                 type: string
1768             X-PatchVersion:
1769               schema:
1770                 type: string
1771             X-MinorVersion:
1772               schema:
1773                 type: string
1774             X-ONAP-RequestID:
1775               schema:
1776                 type: string
1777                 format: uuid
1778           content: {}
1779         500:
1780           description: Internal Server Error
1781           headers:
1782             X-LatestVersion:
1783               schema:
1784                 type: string
1785             X-PatchVersion:
1786               schema:
1787                 type: string
1788             X-MinorVersion:
1789               schema:
1790                 type: string
1791             X-ONAP-RequestID:
1792               schema:
1793                 type: string
1794                 format: uuid
1795           content: {}
1796       security:
1797       - basicAuth: []
1798       x-interface info:
1799         api-version: 1.0.0
1800         last-mod-release: Dublin
1801       x-codegen-request-body-name: body
1802   /policy/api/v1/policytypes/{policyTypeId}:
1803     get:
1804       tags:
1805       - PolicyTypes
1806       summary: Retrieve all available versions of a policy type
1807       description: Returns a list of all available versions for the specified policy
1808         type
1809       operationId: getAllVersionsOfPolicyType
1810       parameters:
1811       - name: policyTypeId
1812         in: path
1813         description: ID of policy type
1814         required: true
1815         schema:
1816           type: string
1817       - name: X-ONAP-RequestID
1818         in: header
1819         description: RequestID for http transaction
1820         schema:
1821           type: string
1822           format: uuid
1823       responses:
1824         200:
1825           description: OK, the found policy types in an instance of
1826             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1827           headers:
1828             X-LatestVersion:
1829               schema:
1830                 type: string
1831             X-PatchVersion:
1832               schema:
1833                 type: string
1834             X-MinorVersion:
1835               schema:
1836                 type: string
1837             X-onap-RequestId:
1838               schema:
1839                 type: string
1840                 format: uuid
1841           content:
1842             application/json:
1843               schema:
1844                 $ref: '#/components/schemas/ToscaServiceTemplate'
1845             application/yaml:
1846               schema:
1847                 $ref: '#/components/schemas/ToscaServiceTemplate'
1848         401:
1849           description: Authentication Error
1850           headers:
1851             X-LatestVersion:
1852               schema:
1853                 type: string
1854             X-PatchVersion:
1855               schema:
1856                 type: string
1857             X-MinorVersion:
1858               schema:
1859                 type: string
1860             X-ONAP-RequestID:
1861               schema:
1862                 type: string
1863                 format: uuid
1864           content: {}
1865         403:
1866           description: Authorization Error
1867           headers:
1868             X-LatestVersion:
1869               schema:
1870                 type: string
1871             X-PatchVersion:
1872               schema:
1873                 type: string
1874             X-MinorVersion:
1875               schema:
1876                 type: string
1877             X-ONAP-RequestID:
1878               schema:
1879                 type: string
1880                 format: uuid
1881           content: {}
1882         404:
1883           description: Resource Not Found
1884           headers:
1885             X-LatestVersion:
1886               schema:
1887                 type: string
1888             X-PatchVersion:
1889               schema:
1890                 type: string
1891             X-MinorVersion:
1892               schema:
1893                 type: string
1894             X-ONAP-RequestID:
1895               schema:
1896                 type: string
1897                 format: uuid
1898           content: {}
1899         500:
1900           description: Internal Server Error
1901           headers:
1902             X-LatestVersion:
1903               schema:
1904                 type: string
1905             X-PatchVersion:
1906               schema:
1907                 type: string
1908             X-MinorVersion:
1909               schema:
1910                 type: string
1911             X-ONAP-RequestID:
1912               schema:
1913                 type: string
1914                 format: uuid
1915           content: {}
1916       security:
1917       - basicAuth: []
1918       x-interface info:
1919         api-version: 1.0.0
1920         last-mod-release: Dublin
1921   /policy/api/v1/policytypes/{policyTypeId}/versions/latest:
1922     get:
1923       tags:
1924       - PolicyTypes
1925       summary: Retrieve latest version of a policy type
1926       description: Returns latest version for the specified policy type
1927       operationId: getLatestVersionOfPolicyType
1928       parameters:
1929       - name: policyTypeId
1930         in: path
1931         description: ID of policy type
1932         required: true
1933         schema:
1934           type: string
1935       - name: X-ONAP-RequestID
1936         in: header
1937         description: RequestID for http transaction
1938         schema:
1939           type: string
1940           format: uuid
1941       responses:
1942         200:
1943           description: OK, the found policy types in an instance of
1944             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
1945           headers:
1946             X-LatestVersion:
1947               schema:
1948                 type: string
1949             X-PatchVersion:
1950               schema:
1951                 type: string
1952             X-MinorVersion:
1953               schema:
1954                 type: string
1955             X-onap-RequestId:
1956               schema:
1957                 type: string
1958                 format: uuid
1959           content:
1960             application/json:
1961               schema:
1962                 $ref: '#/components/schemas/ToscaServiceTemplate'
1963             application/yaml:
1964               schema:
1965                 $ref: '#/components/schemas/ToscaServiceTemplate'
1966         401:
1967           description: Authentication Error
1968           headers:
1969             X-LatestVersion:
1970               schema:
1971                 type: string
1972             X-PatchVersion:
1973               schema:
1974                 type: string
1975             X-MinorVersion:
1976               schema:
1977                 type: string
1978             X-ONAP-RequestID:
1979               schema:
1980                 type: string
1981                 format: uuid
1982           content: {}
1983         403:
1984           description: Authorization Error
1985           headers:
1986             X-LatestVersion:
1987               schema:
1988                 type: string
1989             X-PatchVersion:
1990               schema:
1991                 type: string
1992             X-MinorVersion:
1993               schema:
1994                 type: string
1995             X-ONAP-RequestID:
1996               schema:
1997                 type: string
1998                 format: uuid
1999           content: {}
2000         404:
2001           description: Resource Not Found
2002           headers:
2003             X-LatestVersion:
2004               schema:
2005                 type: string
2006             X-PatchVersion:
2007               schema:
2008                 type: string
2009             X-MinorVersion:
2010               schema:
2011                 type: string
2012             X-ONAP-RequestID:
2013               schema:
2014                 type: string
2015                 format: uuid
2016           content: {}
2017         500:
2018           description: Internal Server Error
2019           headers:
2020             X-LatestVersion:
2021               schema:
2022                 type: string
2023             X-PatchVersion:
2024               schema:
2025                 type: string
2026             X-MinorVersion:
2027               schema:
2028                 type: string
2029             X-ONAP-RequestID:
2030               schema:
2031                 type: string
2032                 format: uuid
2033           content: {}
2034       security:
2035       - basicAuth: []
2036       x-interface info:
2037         api-version: 1.0.0
2038         last-mod-release: Dublin
2039   /policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies:
2040     get:
2041       tags:
2042       - PolicyInstances
2043       summary: Retrieve all versions of a policy created for a particular policy type
2044         version
2045       description: Returns a list of all versions of specified policy created for
2046         the specified policy type version
2047       operationId: getAllPolicies
2048       parameters:
2049       - name: mode
2050         in: query
2051         description: Fetch mode for policies, BARE for bare policies (default), REFERENCED
2052           for fully referenced policies
2053         schema:
2054           type: string
2055           default: BARE
2056           enum:
2057           - BARE
2058           - REFERENCED
2059       - name: policyTypeId
2060         in: path
2061         description: ID of policy type
2062         required: true
2063         schema:
2064           type: string
2065       - name: policyTypeVersion
2066         in: path
2067         description: Version of policy type
2068         required: true
2069         schema:
2070           type: string
2071       - name: X-ONAP-RequestID
2072         in: header
2073         description: RequestID for http transaction
2074         schema:
2075           type: string
2076           format: uuid
2077       responses:
2078         200:
2079           description: OK, the found policies in an instance of
2080             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
2081           headers:
2082             X-LatestVersion:
2083               schema:
2084                 type: string
2085             X-PatchVersion:
2086               schema:
2087                 type: string
2088             X-MinorVersion:
2089               schema:
2090                 type: string
2091             X-onap-RequestId:
2092               schema:
2093                 type: string
2094                 format: uuid
2095           content:
2096             application/json:
2097               schema:
2098                 $ref: '#/components/schemas/ToscaServiceTemplate'
2099             application/yaml:
2100               schema:
2101                 $ref: '#/components/schemas/ToscaServiceTemplate'
2102         401:
2103           description: Authentication Error
2104           headers:
2105             X-LatestVersion:
2106               schema:
2107                 type: string
2108             X-PatchVersion:
2109               schema:
2110                 type: string
2111             X-MinorVersion:
2112               schema:
2113                 type: string
2114             X-ONAP-RequestID:
2115               schema:
2116                 type: string
2117                 format: uuid
2118           content: {}
2119         403:
2120           description: Authorization Error
2121           headers:
2122             X-LatestVersion:
2123               schema:
2124                 type: string
2125             X-PatchVersion:
2126               schema:
2127                 type: string
2128             X-MinorVersion:
2129               schema:
2130                 type: string
2131             X-ONAP-RequestID:
2132               schema:
2133                 type: string
2134                 format: uuid
2135           content: {}
2136         404:
2137           description: Resource Not Found
2138           headers:
2139             X-LatestVersion:
2140               schema:
2141                 type: string
2142             X-PatchVersion:
2143               schema:
2144                 type: string
2145             X-MinorVersion:
2146               schema:
2147                 type: string
2148             X-ONAP-RequestID:
2149               schema:
2150                 type: string
2151                 format: uuid
2152           content: {}
2153         500:
2154           description: Internal Server Error
2155           headers:
2156             X-LatestVersion:
2157               schema:
2158                 type: string
2159             X-PatchVersion:
2160               schema:
2161                 type: string
2162             X-MinorVersion:
2163               schema:
2164                 type: string
2165             X-ONAP-RequestID:
2166               schema:
2167                 type: string
2168                 format: uuid
2169           content: {}
2170       security:
2171       - basicAuth: []
2172       x-interface info:
2173         api-version: 1.0.0
2174         last-mod-release: Dublin
2175     post:
2176       tags:
2177       - PolicyInstances
2178       summary: Create a new policy for a policy type version
2179       description: Client should provide TOSCA body of the new policy
2180       operationId: createPolicy
2181       parameters:
2182       - name: policyTypeId
2183         in: path
2184         description: ID of policy type
2185         required: true
2186         schema:
2187           type: string
2188       - name: policyTypeVersion
2189         in: path
2190         description: Version of policy type
2191         required: true
2192         schema:
2193           type: string
2194       - name: X-ONAP-RequestID
2195         in: header
2196         description: RequestID for http transaction
2197         schema:
2198           type: string
2199           format: uuid
2200       requestBody:
2201         description: Entity body of policies to create in an instance of
2202             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
2203         content:
2204           application/json:
2205             schema:
2206               $ref: '#/components/schemas/ToscaServiceTemplate'
2207           application/yaml:
2208             schema:
2209               $ref: '#/components/schemas/ToscaServiceTemplate'
2210         required: true
2211       responses:
2212         200:
2213           description: OK, the created policies in an instance of
2214             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
2215           headers:
2216             X-LatestVersion:
2217               schema:
2218                 type: string
2219             X-PatchVersion:
2220               schema:
2221                 type: string
2222             X-MinorVersion:
2223               schema:
2224                 type: string
2225             X-onap-RequestId:
2226               schema:
2227                 type: string
2228                 format: uuid
2229           content:
2230             application/json:
2231               schema:
2232                 $ref: '#/components/schemas/ToscaServiceTemplate'
2233             application/yaml:
2234               schema:
2235                 $ref: '#/components/schemas/ToscaServiceTemplate'
2236         201:
2237           description: OK, the created policies in an instance of
2238             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
2239           headers:
2240             X-LatestVersion:
2241               schema:
2242                 type: string
2243             X-PatchVersion:
2244               schema:
2245                 type: string
2246             X-MinorVersion:
2247               schema:
2248                 type: string
2249             X-onap-RequestId:
2250               schema:
2251                 type: string
2252                 format: uuid
2253           content:
2254             application/json:
2255               schema:
2256                 $ref: '#/components/schemas/ToscaServiceTemplate'
2257             application/yaml:
2258               schema:
2259                 $ref: '#/components/schemas/ToscaServiceTemplate'
2260         400:
2261           description: Invalid Body
2262           headers:
2263             X-LatestVersion:
2264               schema:
2265                 type: string
2266             X-PatchVersion:
2267               schema:
2268                 type: string
2269             X-MinorVersion:
2270               schema:
2271                 type: string
2272             X-ONAP-RequestID:
2273               schema:
2274                 type: string
2275                 format: uuid
2276           content: {}
2277         401:
2278           description: Authentication Error
2279           headers:
2280             X-LatestVersion:
2281               schema:
2282                 type: string
2283             X-PatchVersion:
2284               schema:
2285                 type: string
2286             X-MinorVersion:
2287               schema:
2288                 type: string
2289             X-ONAP-RequestID:
2290               schema:
2291                 type: string
2292                 format: uuid
2293           content: {}
2294         403:
2295           description: Authorization Error
2296           headers:
2297             X-LatestVersion:
2298               schema:
2299                 type: string
2300             X-PatchVersion:
2301               schema:
2302                 type: string
2303             X-MinorVersion:
2304               schema:
2305                 type: string
2306             X-ONAP-RequestID:
2307               schema:
2308                 type: string
2309                 format: uuid
2310           content: {}
2311         404:
2312           description: Resource Not Found
2313           headers:
2314             X-LatestVersion:
2315               schema:
2316                 type: string
2317             X-PatchVersion:
2318               schema:
2319                 type: string
2320             X-MinorVersion:
2321               schema:
2322                 type: string
2323             X-ONAP-RequestID:
2324               schema:
2325                 type: string
2326                 format: uuid
2327           content: {}
2328         406:
2329           description: Not Acceptable Payload
2330           headers:
2331             X-LatestVersion:
2332               schema:
2333                 type: string
2334             X-PatchVersion:
2335               schema:
2336                 type: string
2337             X-MinorVersion:
2338               schema:
2339                 type: string
2340             X-ONAP-RequestID:
2341               schema:
2342                 type: string
2343                 format: uuid
2344           content: {}
2345         500:
2346           description: Internal Server Error
2347           headers:
2348             X-LatestVersion:
2349               schema:
2350                 type: string
2351             X-PatchVersion:
2352               schema:
2353                 type: string
2354             X-MinorVersion:
2355               schema:
2356                 type: string
2357             X-ONAP-RequestID:
2358               schema:
2359                 type: string
2360                 format: uuid
2361           content: {}
2362       security:
2363       - basicAuth: []
2364       x-interface info:
2365         api-version: 1.0.0
2366         last-mod-release: Dublin
2367       x-codegen-request-body-name: body
2368   /policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}:
2369     get:
2370       tags:
2371       - PolicyInstances
2372       summary: Retrieve all version details of a policy created for a particular policy
2373         type version
2374       description: Returns a list of all version details of the specified policy
2375       operationId: getAllVersionsOfPolicy
2376       parameters:
2377       - name: mode
2378         in: query
2379         description: Fetch mode for policies, BARE for bare policies (default), REFERENCED
2380           for fully referenced policies
2381         schema:
2382           type: string
2383           default: BARE
2384           enum:
2385           - BARE
2386           - REFERENCED
2387       - name: policyId
2388         in: path
2389         description: ID of policy
2390         required: true
2391         schema:
2392           type: string
2393       - name: policyTypeId
2394         in: path
2395         description: ID of policy type
2396         required: true
2397         schema:
2398           type: string
2399       - name: policyTypeVersion
2400         in: path
2401         description: Version of policy type
2402         required: true
2403         schema:
2404           type: string
2405       - name: X-ONAP-RequestID
2406         in: header
2407         description: RequestID for http transaction
2408         schema:
2409           type: string
2410           format: uuid
2411       responses:
2412         200:
2413           description: OK, the found policies in an instance of
2414             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
2415           headers:
2416             X-LatestVersion:
2417               schema:
2418                 type: string
2419             X-PatchVersion:
2420               schema:
2421                 type: string
2422             X-MinorVersion:
2423               schema:
2424                 type: string
2425             X-onap-RequestId:
2426               schema:
2427                 type: string
2428                 format: uuid
2429           content:
2430             application/json:
2431               schema:
2432                 $ref: '#/components/schemas/ToscaServiceTemplate'
2433             application/yaml:
2434               schema:
2435                 $ref: '#/components/schemas/ToscaServiceTemplate'
2436         401:
2437           description: Authentication Error
2438           headers:
2439             X-LatestVersion:
2440               schema:
2441                 type: string
2442             X-PatchVersion:
2443               schema:
2444                 type: string
2445             X-MinorVersion:
2446               schema:
2447                 type: string
2448             X-ONAP-RequestID:
2449               schema:
2450                 type: string
2451                 format: uuid
2452           content: {}
2453         403:
2454           description: Authorization Error
2455           headers:
2456             X-LatestVersion:
2457               schema:
2458                 type: string
2459             X-PatchVersion:
2460               schema:
2461                 type: string
2462             X-MinorVersion:
2463               schema:
2464                 type: string
2465             X-ONAP-RequestID:
2466               schema:
2467                 type: string
2468                 format: uuid
2469           content: {}
2470         404:
2471           description: Resource Not Found
2472           headers:
2473             X-LatestVersion:
2474               schema:
2475                 type: string
2476             X-PatchVersion:
2477               schema:
2478                 type: string
2479             X-MinorVersion:
2480               schema:
2481                 type: string
2482             X-ONAP-RequestID:
2483               schema:
2484                 type: string
2485                 format: uuid
2486           content: {}
2487         500:
2488           description: Internal Server Error
2489           headers:
2490             X-LatestVersion:
2491               schema:
2492                 type: string
2493             X-PatchVersion:
2494               schema:
2495                 type: string
2496             X-MinorVersion:
2497               schema:
2498                 type: string
2499             X-ONAP-RequestID:
2500               schema:
2501                 type: string
2502                 format: uuid
2503           content: {}
2504       security:
2505       - basicAuth: []
2506       x-interface info:
2507         api-version: 1.0.0
2508         last-mod-release: Dublin
2509   /policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/latest:
2510     get:
2511       tags:
2512       - PolicyInstances
2513       summary: Retrieve the latest version of a particular policy
2514       description: Returns the latest version of specified policy
2515       operationId: getLatestVersionOfPolicy
2516       parameters:
2517       - name: mode
2518         in: query
2519         description: Fetch mode for policies, TERSE for bare policies (default), REFERENCED
2520           for fully referenced policies
2521         schema:
2522           type: string
2523           default: BARE
2524           enum:
2525           - BARE
2526           - REFERENCED
2527       - name: policyId
2528         in: path
2529         description: ID of policy
2530         required: true
2531         schema:
2532           type: string
2533       - name: policyTypeId
2534         in: path
2535         description: ID of policy type
2536         required: true
2537         schema:
2538           type: string
2539       - name: policyTypeVersion
2540         in: path
2541         description: Version of policy type
2542         required: true
2543         schema:
2544           type: string
2545       - name: X-ONAP-RequestID
2546         in: header
2547         description: RequestID for http transaction
2548         schema:
2549           type: string
2550           format: uuid
2551       responses:
2552         200:
2553           description: OK, the found policies in an instance of
2554             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
2555           headers:
2556             X-LatestVersion:
2557               schema:
2558                 type: string
2559             X-PatchVersion:
2560               schema:
2561                 type: string
2562             X-MinorVersion:
2563               schema:
2564                 type: string
2565             X-onap-RequestId:
2566               schema:
2567                 type: string
2568                 format: uuid
2569           content:
2570             application/json:
2571               schema:
2572                 $ref: '#/components/schemas/ToscaServiceTemplate'
2573             application/yaml:
2574               schema:
2575                 $ref: '#/components/schemas/ToscaServiceTemplate'
2576         401:
2577           description: Authentication Error
2578           headers:
2579             X-LatestVersion:
2580               schema:
2581                 type: string
2582             X-PatchVersion:
2583               schema:
2584                 type: string
2585             X-MinorVersion:
2586               schema:
2587                 type: string
2588             X-ONAP-RequestID:
2589               schema:
2590                 type: string
2591                 format: uuid
2592           content: {}
2593         403:
2594           description: Authorization Error
2595           headers:
2596             X-LatestVersion:
2597               schema:
2598                 type: string
2599             X-PatchVersion:
2600               schema:
2601                 type: string
2602             X-MinorVersion:
2603               schema:
2604                 type: string
2605             X-ONAP-RequestID:
2606               schema:
2607                 type: string
2608                 format: uuid
2609           content: {}
2610         404:
2611           description: Resource Not Found
2612           headers:
2613             X-LatestVersion:
2614               schema:
2615                 type: string
2616             X-PatchVersion:
2617               schema:
2618                 type: string
2619             X-MinorVersion:
2620               schema:
2621                 type: string
2622             X-ONAP-RequestID:
2623               schema:
2624                 type: string
2625                 format: uuid
2626           content: {}
2627         500:
2628           description: Internal Server Error
2629           headers:
2630             X-LatestVersion:
2631               schema:
2632                 type: string
2633             X-PatchVersion:
2634               schema:
2635                 type: string
2636             X-MinorVersion:
2637               schema:
2638                 type: string
2639             X-ONAP-RequestID:
2640               schema:
2641                 type: string
2642                 format: uuid
2643           content: {}
2644       security:
2645       - basicAuth: []
2646       x-interface info:
2647         api-version: 1.0.0
2648         last-mod-release: Dublin
2649   /policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}:
2650     get:
2651       tags:
2652       - PolicyInstances
2653       summary: Retrieve one version of a policy created for a particular policy type
2654         version
2655       description: Returns a particular version of specified policy created for the
2656         specified policy type version
2657       operationId: getSpecificVersionOfPolicy
2658       parameters:
2659       - name: mode
2660         in: query
2661         description: Fetch mode for policies, BARE for bare policies  (default), REFERENCED
2662           for fully referenced policies
2663         schema:
2664           type: string
2665           default: BARE
2666           enum:
2667           - BARE
2668           - REFERENCED
2669       - name: policyId
2670         in: path
2671         description: ID of policy
2672         required: true
2673         schema:
2674           type: string
2675       - name: policyTypeId
2676         in: path
2677         description: ID of policy type
2678         required: true
2679         schema:
2680           type: string
2681       - name: policyTypeVersion
2682         in: path
2683         description: Version of policy type
2684         required: true
2685         schema:
2686           type: string
2687       - name: policyVersion
2688         in: path
2689         description: Version of policy
2690         required: true
2691         schema:
2692           type: string
2693       - name: X-ONAP-RequestID
2694         in: header
2695         description: RequestID for http transaction
2696         schema:
2697           type: string
2698           format: uuid
2699       responses:
2700         200:
2701           description: OK, the found policies in an instance of
2702             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
2703           headers:
2704             X-LatestVersion:
2705               schema:
2706                 type: string
2707             X-PatchVersion:
2708               schema:
2709                 type: string
2710             X-MinorVersion:
2711               schema:
2712                 type: string
2713             X-onap-RequestId:
2714               schema:
2715                 type: string
2716                 format: uuid
2717           content:
2718             application/json:
2719               schema:
2720                 $ref: '#/components/schemas/ToscaServiceTemplate'
2721             application/yaml:
2722               schema:
2723                 $ref: '#/components/schemas/ToscaServiceTemplate'
2724         401:
2725           description: Authentication Error
2726           headers:
2727             X-LatestVersion:
2728               schema:
2729                 type: string
2730             X-PatchVersion:
2731               schema:
2732                 type: string
2733             X-MinorVersion:
2734               schema:
2735                 type: string
2736             X-ONAP-RequestID:
2737               schema:
2738                 type: string
2739                 format: uuid
2740           content: {}
2741         403:
2742           description: Authorization Error
2743           headers:
2744             X-LatestVersion:
2745               schema:
2746                 type: string
2747             X-PatchVersion:
2748               schema:
2749                 type: string
2750             X-MinorVersion:
2751               schema:
2752                 type: string
2753             X-ONAP-RequestID:
2754               schema:
2755                 type: string
2756                 format: uuid
2757           content: {}
2758         404:
2759           description: Resource Not Found
2760           headers:
2761             X-LatestVersion:
2762               schema:
2763                 type: string
2764             X-PatchVersion:
2765               schema:
2766                 type: string
2767             X-MinorVersion:
2768               schema:
2769                 type: string
2770             X-ONAP-RequestID:
2771               schema:
2772                 type: string
2773                 format: uuid
2774           content: {}
2775         500:
2776           description: Internal Server Error
2777           headers:
2778             X-LatestVersion:
2779               schema:
2780                 type: string
2781             X-PatchVersion:
2782               schema:
2783                 type: string
2784             X-MinorVersion:
2785               schema:
2786                 type: string
2787             X-ONAP-RequestID:
2788               schema:
2789                 type: string
2790                 format: uuid
2791           content: {}
2792       security:
2793       - basicAuth: []
2794       x-interface info:
2795         api-version: 1.0.0
2796         last-mod-release: Dublin
2797     delete:
2798       tags:
2799       - PolicyInstances
2800       summary: Delete a particular version of a policy
2801       description: 'Rule: the version that has been deployed in PDP group(s) cannot
2802         be deleted'
2803       operationId: deleteSpecificVersionOfPolicy
2804       parameters:
2805       - name: policyId
2806         in: path
2807         description: ID of policy
2808         required: true
2809         schema:
2810           type: string
2811       - name: policyTypeId
2812         in: path
2813         description: PolicyType ID
2814         required: true
2815         schema:
2816           type: string
2817       - name: policyTypeVersion
2818         in: path
2819         description: Version of policy type
2820         required: true
2821         schema:
2822           type: string
2823       - name: policyVersion
2824         in: path
2825         description: Version of policy
2826         required: true
2827         schema:
2828           type: string
2829       - name: X-ONAP-RequestID
2830         in: header
2831         description: RequestID for http transaction
2832         schema:
2833           type: string
2834           format: uuid
2835       responses:
2836         200:
2837           description: OK, the deleted policy in an instance of
2838             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
2839           headers:
2840             X-LatestVersion:
2841               schema:
2842                 type: string
2843             X-PatchVersion:
2844               schema:
2845                 type: string
2846             X-MinorVersion:
2847               schema:
2848                 type: string
2849             X-onap-RequestId:
2850               schema:
2851                 type: string
2852                 format: uuid
2853           content:
2854             application/json:
2855               schema:
2856                 $ref: '#/components/schemas/ToscaServiceTemplate'
2857             application/yaml:
2858               schema:
2859                 $ref: '#/components/schemas/ToscaServiceTemplate'
2860         204:
2861           description: No Content
2862           headers:
2863             X-LatestVersion:
2864               schema:
2865                 type: string
2866             X-PatchVersion:
2867               schema:
2868                 type: string
2869             X-MinorVersion:
2870               schema:
2871                 type: string
2872             X-onap-RequestId:
2873               schema:
2874                 type: string
2875                 format: uuid
2876           content: {}
2877         401:
2878           description: Authentication Error
2879           headers:
2880             X-LatestVersion:
2881               schema:
2882                 type: string
2883             X-PatchVersion:
2884               schema:
2885                 type: string
2886             X-MinorVersion:
2887               schema:
2888                 type: string
2889             X-ONAP-RequestID:
2890               schema:
2891                 type: string
2892                 format: uuid
2893           content: {}
2894         403:
2895           description: Authorization Error
2896           headers:
2897             X-LatestVersion:
2898               schema:
2899                 type: string
2900             X-PatchVersion:
2901               schema:
2902                 type: string
2903             X-MinorVersion:
2904               schema:
2905                 type: string
2906             X-ONAP-RequestID:
2907               schema:
2908                 type: string
2909                 format: uuid
2910           content: {}
2911         404:
2912           description: Resource Not Found
2913           headers:
2914             X-LatestVersion:
2915               schema:
2916                 type: string
2917             X-PatchVersion:
2918               schema:
2919                 type: string
2920             X-MinorVersion:
2921               schema:
2922                 type: string
2923             X-ONAP-RequestID:
2924               schema:
2925                 type: string
2926                 format: uuid
2927           content: {}
2928         409:
2929           description: Delete Conflict, Rule Violation
2930           headers:
2931             X-LatestVersion:
2932               schema:
2933                 type: string
2934             X-PatchVersion:
2935               schema:
2936                 type: string
2937             X-MinorVersion:
2938               schema:
2939                 type: string
2940             X-ONAP-RequestID:
2941               schema:
2942                 type: string
2943                 format: uuid
2944           content: {}
2945         500:
2946           description: Internal Server Error
2947           headers:
2948             X-LatestVersion:
2949               schema:
2950                 type: string
2951             X-PatchVersion:
2952               schema:
2953                 type: string
2954             X-MinorVersion:
2955               schema:
2956                 type: string
2957             X-ONAP-RequestID:
2958               schema:
2959                 type: string
2960                 format: uuid
2961           content: {}
2962       security:
2963       - basicAuth: []
2964       x-interface info:
2965         api-version: 1.0.0
2966         last-mod-release: Dublin
2967   /policy/api/v1/policytypes/{policyTypeId}/versions/{versionId}:
2968     get:
2969       tags:
2970       - PolicyTypes
2971       summary: Retrieve one particular version of a policy type
2972       description: Returns a particular version for the specified policy type
2973       operationId: getSpecificVersionOfPolicyType
2974       parameters:
2975       - name: policyTypeId
2976         in: path
2977         description: ID of policy type
2978         required: true
2979         schema:
2980           type: string
2981       - name: versionId
2982         in: path
2983         description: Version of policy type
2984         required: true
2985         schema:
2986           type: string
2987       - name: X-ONAP-RequestID
2988         in: header
2989         description: RequestID for http transaction
2990         schema:
2991           type: string
2992           format: uuid
2993       responses:
2994         200:
2995           description: OK, the found policy types in an instance of
2996             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
2997           headers:
2998             X-LatestVersion:
2999               schema:
3000                 type: string
3001             X-PatchVersion:
3002               schema:
3003                 type: string
3004             X-MinorVersion:
3005               schema:
3006                 type: string
3007             X-onap-RequestId:
3008               schema:
3009                 type: string
3010                 format: uuid
3011           content:
3012             application/json:
3013               schema:
3014                 $ref: '#/components/schemas/ToscaServiceTemplate'
3015             application/yaml:
3016               schema:
3017                 $ref: '#/components/schemas/ToscaServiceTemplate'
3018         401:
3019           description: Authentication Error
3020           headers:
3021             X-LatestVersion:
3022               schema:
3023                 type: string
3024             X-PatchVersion:
3025               schema:
3026                 type: string
3027             X-MinorVersion:
3028               schema:
3029                 type: string
3030             X-ONAP-RequestID:
3031               schema:
3032                 type: string
3033                 format: uuid
3034           content: {}
3035         403:
3036           description: Authorization Error
3037           headers:
3038             X-LatestVersion:
3039               schema:
3040                 type: string
3041             X-PatchVersion:
3042               schema:
3043                 type: string
3044             X-MinorVersion:
3045               schema:
3046                 type: string
3047             X-ONAP-RequestID:
3048               schema:
3049                 type: string
3050                 format: uuid
3051           content: {}
3052         404:
3053           description: Resource Not Found
3054           headers:
3055             X-LatestVersion:
3056               schema:
3057                 type: string
3058             X-PatchVersion:
3059               schema:
3060                 type: string
3061             X-MinorVersion:
3062               schema:
3063                 type: string
3064             X-ONAP-RequestID:
3065               schema:
3066                 type: string
3067                 format: uuid
3068           content: {}
3069         500:
3070           description: Internal Server Error
3071           headers:
3072             X-LatestVersion:
3073               schema:
3074                 type: string
3075             X-PatchVersion:
3076               schema:
3077                 type: string
3078             X-MinorVersion:
3079               schema:
3080                 type: string
3081             X-ONAP-RequestID:
3082               schema:
3083                 type: string
3084                 format: uuid
3085           content: {}
3086       security:
3087       - basicAuth: []
3088       x-interface info:
3089         api-version: 1.0.0
3090         last-mod-release: Dublin
3091     delete:
3092       tags:
3093       - PolicyTypes
3094       summary: Delete one version of a policy type
3095       description: 'Rule 1: pre-defined policy types cannot be deleted;Rule 2: policy
3096         types that are in use (parameterized by a TOSCA policy) cannot be deleted.The
3097         parameterizing TOSCA policies must be deleted first;'
3098       operationId: deleteSpecificVersionOfPolicyType
3099       parameters:
3100       - name: policyTypeId
3101         in: path
3102         description: ID of policy type
3103         required: true
3104         schema:
3105           type: string
3106       - name: versionId
3107         in: path
3108         description: Version of policy type
3109         required: true
3110         schema:
3111           type: string
3112       - name: X-ONAP-RequestID
3113         in: header
3114         description: RequestID for http transaction
3115         schema:
3116           type: string
3117           format: uuid
3118       responses:
3119         200:
3120           description: OK, the deleted policy type in an instance of
3121             [ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
3122           headers:
3123             X-LatestVersion:
3124               schema:
3125                 type: string
3126             X-PatchVersion:
3127               schema:
3128                 type: string
3129             X-MinorVersion:
3130               schema:
3131                 type: string
3132             X-onap-RequestId:
3133               schema:
3134                 type: string
3135                 format: uuid
3136           content:
3137             application/json:
3138               schema:
3139                 $ref: '#/components/schemas/ToscaServiceTemplate'
3140             application/yaml:
3141               schema:
3142                 $ref: '#/components/schemas/ToscaServiceTemplate'
3143         204:
3144           description: No Content
3145           headers:
3146             X-LatestVersion:
3147               schema:
3148                 type: string
3149             X-PatchVersion:
3150               schema:
3151                 type: string
3152             X-MinorVersion:
3153               schema:
3154                 type: string
3155             X-onap-RequestId:
3156               schema:
3157                 type: string
3158                 format: uuid
3159           content: {}
3160         401:
3161           description: Authentication Error
3162           headers:
3163             X-LatestVersion:
3164               schema:
3165                 type: string
3166             X-PatchVersion:
3167               schema:
3168                 type: string
3169             X-MinorVersion:
3170               schema:
3171                 type: string
3172             X-ONAP-RequestID:
3173               schema:
3174                 type: string
3175                 format: uuid
3176           content: {}
3177         403:
3178           description: Authorization Error
3179           headers:
3180             X-LatestVersion:
3181               schema:
3182                 type: string
3183             X-PatchVersion:
3184               schema:
3185                 type: string
3186             X-MinorVersion:
3187               schema:
3188                 type: string
3189             X-ONAP-RequestID:
3190               schema:
3191                 type: string
3192                 format: uuid
3193           content: {}
3194         404:
3195           description: Resource Not Found
3196           headers:
3197             X-LatestVersion:
3198               schema:
3199                 type: string
3200             X-PatchVersion:
3201               schema:
3202                 type: string
3203             X-MinorVersion:
3204               schema:
3205                 type: string
3206             X-ONAP-RequestID:
3207               schema:
3208                 type: string
3209                 format: uuid
3210           content: {}
3211         409:
3212           description: Delete Conflict, Rule Violation
3213           headers:
3214             X-LatestVersion:
3215               schema:
3216                 type: string
3217             X-PatchVersion:
3218               schema:
3219                 type: string
3220             X-MinorVersion:
3221               schema:
3222                 type: string
3223             X-ONAP-RequestID:
3224               schema:
3225                 type: string
3226                 format: uuid
3227           content: {}
3228         500:
3229           description: Internal Server Error
3230           headers:
3231             X-LatestVersion:
3232               schema:
3233                 type: string
3234             X-PatchVersion:
3235               schema:
3236                 type: string
3237             X-MinorVersion:
3238               schema:
3239                 type: string
3240             X-ONAP-RequestID:
3241               schema:
3242                 type: string
3243                 format: uuid
3244           content: {}
3245       security:
3246       - basicAuth: []
3247       x-interface info:
3248         api-version: 1.0.0
3249         last-mod-release: Dublin
3250   /policy/api/v1/statistics:
3251     get:
3252       tags:
3253       - Statistics
3254       summary: Retrieve current statistics
3255       description: Returns current statistics including the counters of API invocation
3256       operationId: getStatistics
3257       parameters:
3258       - name: X-ONAP-RequestID
3259         in: header
3260         description: RequestID for http transaction
3261         schema:
3262           type: string
3263           format: uuid
3264       responses:
3265         200:
3266           description: OK, the statistics report in an instance of
3267             [StatisticsReport](https://github.com/onap/policy-api/blob/master/main/src/main/java/org/onap/policy/api/main/rest/provider/statistics/StatisticsReport.java)
3268           headers:
3269             X-LatestVersion:
3270               schema:
3271                 type: string
3272             X-PatchVersion:
3273               schema:
3274                 type: string
3275             X-MinorVersion:
3276               schema:
3277                 type: string
3278             X-onap-RequestId:
3279               schema:
3280                 type: string
3281                 format: uuid
3282           content:
3283             application/json:
3284               schema:
3285                 $ref: '#/components/schemas/StatisticsReport'
3286             application/yaml:
3287               schema:
3288                 $ref: '#/components/schemas/StatisticsReport'
3289         401:
3290           description: Authentication Error
3291           headers:
3292             X-LatestVersion:
3293               schema:
3294                 type: string
3295             X-PatchVersion:
3296               schema:
3297                 type: string
3298             X-MinorVersion:
3299               schema:
3300                 type: string
3301             X-ONAP-RequestID:
3302               schema:
3303                 type: string
3304                 format: uuid
3305           content: {}
3306         403:
3307           description: Authorization Error
3308           headers:
3309             X-LatestVersion:
3310               schema:
3311                 type: string
3312             X-PatchVersion:
3313               schema:
3314                 type: string
3315             X-MinorVersion:
3316               schema:
3317                 type: string
3318             X-ONAP-RequestID:
3319               schema:
3320                 type: string
3321                 format: uuid
3322           content: {}
3323         404:
3324           description: Not Found
3325           headers:
3326             X-LatestVersion:
3327               schema:
3328                 type: string
3329             X-PatchVersion:
3330               schema:
3331                 type: string
3332             X-MinorVersion:
3333               schema:
3334                 type: string
3335             X-onap-RequestId:
3336               schema:
3337                 type: string
3338                 format: uuid
3339           content: {}
3340         500:
3341           description: Internal Server Error
3342           headers:
3343             X-LatestVersion:
3344               schema:
3345                 type: string
3346             X-PatchVersion:
3347               schema:
3348                 type: string
3349             X-MinorVersion:
3350               schema:
3351                 type: string
3352             X-ONAP-RequestID:
3353               schema:
3354                 type: string
3355                 format: uuid
3356           content: {}
3357       security:
3358       - basicAuth: []
3359       x-interface info:
3360         api-version: 1.0.0
3361         last-mod-release: Dublin
3362 components:
3363   securitySchemes:
3364     basicAuth:
3365       type: http
3366       scheme: basic
3367   schemas:
3368     ToscaServiceTemplate:
3369       title: ToscaServiceTemplate
3370       type: object
3371     ToscaNodeTemplate:
3372       title: ToscaNodeTemplate
3373       type: object
3374     HealthCheckReport:
3375       title: HealthCheckReport
3376       type: object
3377     StatisticsReport:
3378       title: StatisticsReport
3379       type: object