Merge "Renamed things to fit with namechange of RicSynchronizationTask"
[nonrtric.git] / policy-agent / docs / api.yaml
1 swagger: '2.0'
2 info:
3   description: This page lists all the rest apis for the service.
4   version: '1.0'
5   title: A1 Policy management service
6 host: 'localhost:8081'
7 basePath: /
8 tags:
9   - name: A1 Policy Management
10     description: Policy Controller
11   - name: Health check
12     description: Status Controller
13   - name: RIC Repository
14     description: Ric Repository Controller
15   - name: Service registry and supervision
16     description: Service Controller
17   - name: operation-handler
18     description: Operation Handler
19   - name: web-mvc-links-handler
20     description: Web Mvc Links Handler
21 paths:
22   /actuator:
23     get:
24       tags:
25         - web-mvc-links-handler
26       summary: links
27       operationId: linksUsingGET
28       produces:
29         - application/vnd.spring-boot.actuator.v3+json
30         - application/json
31         - application/vnd.spring-boot.actuator.v2+json
32       responses:
33         '200':
34           description: OK
35           schema:
36             type: object
37             additionalProperties:
38               type: object
39               additionalProperties:
40                 $ref: '#/definitions/Link'
41         '401':
42           description: Unauthorized
43         '403':
44           description: Forbidden
45         '404':
46           description: Not Found
47       deprecated: false
48   /actuator/health:
49     get:
50       tags:
51         - operation-handler
52       summary: handle
53       operationId: handleUsingGET_1
54       produces:
55         - application/vnd.spring-boot.actuator.v3+json
56         - application/json
57         - application/vnd.spring-boot.actuator.v2+json
58       parameters:
59         - in: body
60           name: body
61           description: body
62           required: false
63           schema:
64             type: object
65             additionalProperties:
66               type: string
67       responses:
68         '200':
69           description: OK
70           schema:
71             type: object
72         '401':
73           description: Unauthorized
74         '403':
75           description: Forbidden
76         '404':
77           description: Not Found
78       deprecated: false
79   /actuator/health/**:
80     get:
81       tags:
82         - operation-handler
83       summary: handle
84       operationId: handleUsingGET
85       produces:
86         - application/vnd.spring-boot.actuator.v3+json
87         - application/json
88         - application/vnd.spring-boot.actuator.v2+json
89       parameters:
90         - in: body
91           name: body
92           description: body
93           required: false
94           schema:
95             type: object
96             additionalProperties:
97               type: string
98       responses:
99         '200':
100           description: OK
101           schema:
102             type: object
103         '401':
104           description: Unauthorized
105         '403':
106           description: Forbidden
107         '404':
108           description: Not Found
109       deprecated: false
110   /actuator/info:
111     get:
112       tags:
113         - operation-handler
114       summary: handle
115       operationId: handleUsingGET_2
116       produces:
117         - application/vnd.spring-boot.actuator.v3+json
118         - application/json
119         - application/vnd.spring-boot.actuator.v2+json
120       parameters:
121         - in: body
122           name: body
123           description: body
124           required: false
125           schema:
126             type: object
127             additionalProperties:
128               type: string
129       responses:
130         '200':
131           description: OK
132           schema:
133             type: object
134         '401':
135           description: Unauthorized
136         '403':
137           description: Forbidden
138         '404':
139           description: Not Found
140       deprecated: false
141   /actuator/logfile:
142     get:
143       tags:
144         - operation-handler
145       summary: handle
146       operationId: handleUsingGET_3
147       produces:
148         - text/plain;charset=UTF-8
149       parameters:
150         - in: body
151           name: body
152           description: body
153           required: false
154           schema:
155             type: object
156             additionalProperties:
157               type: string
158       responses:
159         '200':
160           description: OK
161           schema:
162             type: object
163         '401':
164           description: Unauthorized
165         '403':
166           description: Forbidden
167         '404':
168           description: Not Found
169       deprecated: false
170   /actuator/loggers:
171     get:
172       tags:
173         - operation-handler
174       summary: handle
175       operationId: handleUsingGET_5
176       produces:
177         - application/vnd.spring-boot.actuator.v3+json
178         - application/json
179         - application/vnd.spring-boot.actuator.v2+json
180       parameters:
181         - in: body
182           name: body
183           description: body
184           required: false
185           schema:
186             type: object
187             additionalProperties:
188               type: string
189       responses:
190         '200':
191           description: OK
192           schema:
193             type: object
194         '401':
195           description: Unauthorized
196         '403':
197           description: Forbidden
198         '404':
199           description: Not Found
200       deprecated: false
201   '/actuator/loggers/{name}':
202     get:
203       tags:
204         - operation-handler
205       summary: handle
206       operationId: handleUsingGET_4
207       produces:
208         - application/vnd.spring-boot.actuator.v3+json
209         - application/json
210         - application/vnd.spring-boot.actuator.v2+json
211       parameters:
212         - in: body
213           name: body
214           description: body
215           required: false
216           schema:
217             type: object
218             additionalProperties:
219               type: string
220       responses:
221         '200':
222           description: OK
223           schema:
224             type: object
225         '401':
226           description: Unauthorized
227         '403':
228           description: Forbidden
229         '404':
230           description: Not Found
231       deprecated: false
232     post:
233       tags:
234         - operation-handler
235       summary: handle
236       operationId: handleUsingPOST
237       consumes:
238         - application/vnd.spring-boot.actuator.v3+json
239         - application/json
240         - application/vnd.spring-boot.actuator.v2+json
241       produces:
242         - '*/*'
243       parameters:
244         - in: body
245           name: body
246           description: body
247           required: false
248           schema:
249             type: object
250             additionalProperties:
251               type: string
252       responses:
253         '200':
254           description: OK
255           schema:
256             type: object
257         '201':
258           description: Created
259         '401':
260           description: Unauthorized
261         '403':
262           description: Forbidden
263         '404':
264           description: Not Found
265       deprecated: false
266   /actuator/metrics:
267     get:
268       tags:
269         - operation-handler
270       summary: handle
271       operationId: handleUsingGET_7
272       produces:
273         - application/vnd.spring-boot.actuator.v3+json
274         - application/json
275         - application/vnd.spring-boot.actuator.v2+json
276       parameters:
277         - in: body
278           name: body
279           description: body
280           required: false
281           schema:
282             type: object
283             additionalProperties:
284               type: string
285       responses:
286         '200':
287           description: OK
288           schema:
289             type: object
290         '401':
291           description: Unauthorized
292         '403':
293           description: Forbidden
294         '404':
295           description: Not Found
296       deprecated: false
297   '/actuator/metrics/{requiredMetricName}':
298     get:
299       tags:
300         - operation-handler
301       summary: handle
302       operationId: handleUsingGET_6
303       produces:
304         - application/vnd.spring-boot.actuator.v3+json
305         - application/json
306         - application/vnd.spring-boot.actuator.v2+json
307       parameters:
308         - in: body
309           name: body
310           description: body
311           required: false
312           schema:
313             type: object
314             additionalProperties:
315               type: string
316       responses:
317         '200':
318           description: OK
319           schema:
320             type: object
321         '401':
322           description: Unauthorized
323         '403':
324           description: Forbidden
325         '404':
326           description: Not Found
327       deprecated: false
328   /policies:
329     get:
330       tags:
331         - A1 Policy Management
332       summary: Query policies
333       operationId: getPoliciesUsingGET
334       produces:
335         - '*/*'
336       parameters:
337         - name: ric
338           in: query
339           description: ric
340           required: false
341           type: string
342         - name: service
343           in: query
344           description: service
345           required: false
346           type: string
347         - name: type
348           in: query
349           description: type
350           required: false
351           type: string
352       responses:
353         '200':
354           description: Policies
355           schema:
356             type: array
357             items:
358               $ref: '#/definitions/PolicyInfo'
359         '401':
360           description: Unauthorized
361         '403':
362           description: Forbidden
363         '404':
364           description: RIC or type not found
365           schema:
366             type: string
367       deprecated: false
368   /policy:
369     get:
370       tags:
371         - A1 Policy Management
372       summary: Returns a policy configuration
373       operationId: getPolicyUsingGET
374       produces:
375         - '*/*'
376       parameters:
377         - name: instance
378           in: query
379           description: instance
380           required: true
381           type: string
382       responses:
383         '200':
384           description: Policy found
385           schema:
386             type: object
387         '401':
388           description: Unauthorized
389         '403':
390           description: Forbidden
391         '404':
392           description: Policy is not found
393       deprecated: false
394     put:
395       tags:
396         - A1 Policy Management
397       summary: Put a policy
398       operationId: putPolicyUsingPUT
399       consumes:
400         - application/json
401       produces:
402         - '*/*'
403       parameters:
404         - name: instance
405           in: query
406           description: instance
407           required: true
408           type: string
409         - in: body
410           name: jsonBody
411           description: jsonBody
412           required: true
413           schema:
414             type: object
415         - name: ric
416           in: query
417           description: ric
418           required: true
419           type: string
420         - name: service
421           in: query
422           description: service
423           required: true
424           type: string
425         - name: type
426           in: query
427           description: type
428           required: false
429           type: string
430       responses:
431         '200':
432           description: Policy updated
433           schema:
434             type: object
435         '201':
436           description: Policy created
437           schema:
438             type: object
439         '401':
440           description: Unauthorized
441         '403':
442           description: Forbidden
443         '404':
444           description: RIC or policy type is not found
445           schema:
446             type: string
447         '423':
448           description: RIC is locked
449           schema:
450             type: string
451       deprecated: false
452     delete:
453       tags:
454         - A1 Policy Management
455       summary: Delete a policy
456       operationId: deletePolicyUsingDELETE
457       produces:
458         - '*/*'
459       parameters:
460         - name: instance
461           in: query
462           description: instance
463           required: true
464           type: string
465       responses:
466         '200':
467           description: OK
468           schema:
469             type: object
470         '204':
471           description: Policy deleted
472           schema:
473             type: object
474         '401':
475           description: Unauthorized
476         '403':
477           description: Forbidden
478         '404':
479           description: Policy is not found
480           schema:
481             type: string
482         '423':
483           description: RIC is locked
484           schema:
485             type: string
486       deprecated: false
487   /policy_ids:
488     get:
489       tags:
490         - A1 Policy Management
491       summary: 'Query policies, only IDs returned'
492       operationId: getPolicyIdsUsingGET
493       produces:
494         - '*/*'
495       parameters:
496         - name: ric
497           in: query
498           description: ric
499           required: false
500           type: string
501         - name: service
502           in: query
503           description: service
504           required: false
505           type: string
506         - name: type
507           in: query
508           description: type
509           required: false
510           type: string
511       responses:
512         '200':
513           description: Policy ids
514           schema:
515             type: array
516             items:
517               type: string
518         '401':
519           description: Unauthorized
520         '403':
521           description: Forbidden
522         '404':
523           description: RIC or type not found
524           schema:
525             type: string
526       deprecated: false
527   /policy_schema:
528     get:
529       tags:
530         - A1 Policy Management
531       summary: Returns one policy type schema definition
532       operationId: getPolicySchemaUsingGET
533       produces:
534         - '*/*'
535       parameters:
536         - name: id
537           in: query
538           description: id
539           required: true
540           type: string
541       responses:
542         '200':
543           description: Policy schema
544           schema:
545             type: object
546         '401':
547           description: Unauthorized
548         '403':
549           description: Forbidden
550         '404':
551           description: RIC is not found
552           schema:
553             type: string
554       deprecated: false
555   /policy_schemas:
556     get:
557       tags:
558         - A1 Policy Management
559       summary: Returns policy type schema definitions
560       operationId: getPolicySchemasUsingGET
561       produces:
562         - '*/*'
563       parameters:
564         - name: ric
565           in: query
566           description: ric
567           required: false
568           type: string
569       responses:
570         '200':
571           description: Policy schemas
572           schema:
573             type: array
574             items:
575               type: object
576         '401':
577           description: Unauthorized
578         '403':
579           description: Forbidden
580         '404':
581           description: RIC is not found
582           schema:
583             type: string
584       deprecated: false
585   /policy_status:
586     get:
587       tags:
588         - A1 Policy Management
589       summary: Returns a policy status
590       operationId: getPolicyStatusUsingGET
591       produces:
592         - '*/*'
593       parameters:
594         - name: instance
595           in: query
596           description: instance
597           required: true
598           type: string
599       responses:
600         '200':
601           description: Policy status
602           schema:
603             type: object
604         '401':
605           description: Unauthorized
606         '403':
607           description: Forbidden
608         '404':
609           description: Policy is not found
610           schema:
611             type: string
612       deprecated: false
613   /policy_types:
614     get:
615       tags:
616         - A1 Policy Management
617       summary: Query policy type names
618       operationId: getPolicyTypesUsingGET
619       produces:
620         - '*/*'
621       parameters:
622         - name: ric
623           in: query
624           description: ric
625           required: false
626           type: string
627       responses:
628         '200':
629           description: Policy type names
630           schema:
631             type: array
632             items:
633               type: string
634         '401':
635           description: Unauthorized
636         '403':
637           description: Forbidden
638         '404':
639           description: RIC is not found
640           schema:
641             type: string
642       deprecated: false
643   /ric:
644     get:
645       tags:
646         - RIC Repository
647       summary: Returns the name of a RIC managing one Mananged Element
648       operationId: getRicUsingGET
649       produces:
650         - '*/*'
651       parameters:
652         - name: managedElementId
653           in: query
654           description: managedElementId
655           required: false
656           type: string
657       responses:
658         '200':
659           description: RIC is fond
660           schema:
661             type: string
662         '401':
663           description: Unauthorized
664         '403':
665           description: Forbidden
666         '404':
667           description: RIC is not fond
668           schema:
669             type: string
670       deprecated: false
671   /rics:
672     get:
673       tags:
674         - RIC Repository
675       summary: Query NearRT RIC information
676       operationId: getRicsUsingGET
677       produces:
678         - '*/*'
679       parameters:
680         - name: policyType
681           in: query
682           description: policyType
683           required: false
684           type: string
685       responses:
686         '200':
687           description: OK
688           schema:
689             type: array
690             items:
691               $ref: '#/definitions/RicInfo'
692         '401':
693           description: Unauthorized
694         '403':
695           description: Forbidden
696         '404':
697           description: Policy type is not found
698           schema:
699             type: string
700       deprecated: false
701   /service:
702     put:
703       tags:
704         - Service registry and supervision
705       summary: Register a service
706       operationId: putServiceUsingPUT
707       consumes:
708         - application/json
709       produces:
710         - '*/*'
711       parameters:
712         - in: body
713           name: registrationInfo
714           description: registrationInfo
715           required: true
716           schema:
717             $ref: '#/definitions/ServiceRegistrationInfo'
718       responses:
719         '200':
720           description: OK
721           schema:
722             type: string
723         '201':
724           description: Created
725         '400':
726           description: Cannot parse the ServiceRegistrationInfo
727           schema:
728             type: string
729         '401':
730           description: Unauthorized
731         '403':
732           description: Forbidden
733         '404':
734           description: Not Found
735       deprecated: false
736   /services:
737     get:
738       tags:
739         - Service registry and supervision
740       summary: Returns service information
741       operationId: getServicesUsingGET
742       produces:
743         - '*/*'
744       parameters:
745         - name: name
746           in: query
747           description: name
748           required: false
749           type: string
750       responses:
751         '200':
752           description: OK
753           schema:
754             type: array
755             items:
756               $ref: '#/definitions/ServiceStatus'
757         '401':
758           description: Unauthorized
759         '403':
760           description: Forbidden
761         '404':
762           description: Service is not found
763           schema:
764             type: string
765       deprecated: false
766     delete:
767       tags:
768         - Service registry and supervision
769       summary: Delete a service
770       operationId: deleteServiceUsingDELETE
771       produces:
772         - '*/*'
773       parameters:
774         - name: name
775           in: query
776           description: name
777           required: true
778           type: string
779       responses:
780         '200':
781           description: OK
782           schema:
783             type: string
784         '204':
785           description: OK
786           schema:
787             type: string
788         '401':
789           description: Unauthorized
790         '403':
791           description: Forbidden
792         '404':
793           description: Service not found
794           schema:
795             type: string
796       deprecated: false
797   /services/keepalive:
798     post:
799       tags:
800         - Service registry and supervision
801       summary: Heartbeat from a serice
802       operationId: keepAliveServiceUsingPOST
803       consumes:
804         - application/json
805       produces:
806         - '*/*'
807       parameters:
808         - name: name
809           in: query
810           description: name
811           required: true
812           type: string
813       responses:
814         '200':
815           description: 'Service supervision timer refreshed, OK'
816           schema:
817             type: string
818         '201':
819           description: Created
820         '401':
821           description: Unauthorized
822         '403':
823           description: Forbidden
824         '404':
825           description: 'The service is not found, needs re-registration'
826       deprecated: false
827   /status:
828     get:
829       tags:
830         - Health check
831       summary: Returns status and statistics of this service
832       operationId: getStatusUsingGET
833       produces:
834         - '*/*'
835       responses:
836         '200':
837           description: Service is living
838           schema:
839             type: string
840         '401':
841           description: Unauthorized
842         '403':
843           description: Forbidden
844         '404':
845           description: Not Found
846       deprecated: false
847 definitions:
848   Link:
849     type: object
850     properties:
851       href:
852         type: string
853       templated:
854         type: boolean
855     title: Link
856   'Map«string,Link»':
857     type: object
858     title: 'Map«string,Link»'
859     additionalProperties:
860       $ref: '#/definitions/Link'
861   Mono«ResponseEntity«object»»:
862     type: object
863     title: Mono«ResponseEntity«object»»
864   Mono«ResponseEntity«string»»:
865     type: object
866     title: Mono«ResponseEntity«string»»
867   PolicyInfo:
868     type: object
869     properties:
870       id:
871         type: string
872         description: identity of the policy
873       json:
874         type: object
875         description: the configuration of the policy
876       lastModified:
877         type: string
878         description: 'timestamp, last modification time'
879       ric:
880         type: string
881         description: identity the target NearRT RIC
882       service:
883         type: string
884         description: the name of the service owning the policy
885       type:
886         type: string
887         description: name of the policy type
888     title: PolicyInfo
889   RicInfo:
890     type: object
891     properties:
892       managedElementIds:
893         type: array
894         description: O1 identities for managed entities
895         items:
896           type: string
897       policyTypes:
898         type: array
899         description: supported policy types
900         items:
901           type: string
902       ricName:
903         type: string
904         description: identity of the ric
905     title: RicInfo
906   ServiceRegistrationInfo:
907     type: object
908     required:
909       - serviceName
910     properties:
911       callbackUrl:
912         type: string
913         description: callback for notifying of RIC synchronization
914       keepAliveIntervalSeconds:
915         type: integer
916         format: int64
917         description: 'keep alive interval for the service. This is a heartbeat supervision of the service, which in regular intevals must invoke a ''keepAlive'' REST call. When a service does not invoke this call within the given time, it is considered unavailble. An unavailable service will be automatically deregistered and its policies will be deleted. Value 0 means no timeout supervision.'
918       serviceName:
919         type: string
920         description: identity of the service
921     title: ServiceRegistrationInfo
922   ServiceStatus:
923     type: object
924     properties:
925       callbackUrl:
926         type: string
927         description: callback for notifying of RIC synchronization
928       keepAliveIntervalSeconds:
929         type: integer
930         format: int64
931         description: policy keep alive timeout
932       serviceName:
933         type: string
934         description: identity of the service
935       timeSinceLastActivitySeconds:
936         type: integer
937         format: int64
938         description: time since last invocation by the service
939     title: ServiceStatus