A1 Policy Management
[ccsdk/oran.git] / a1-policy-management / api / pms-api.yaml
1 openapi: 3.0.1
2 info:
3   title: A1 Policy management service
4   description: <h2>General</h2><p>The O-RAN Non-RT RIC Policy Management Service provides
5     a REST API for management of A1 policices. <br/>The main tasks of the service
6     are:</p><ul><li>A1 Policy creation, modification and deletion.</li><li>Monitoring
7     and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs</li><li>Maintaining
8     a view of supported Near-RT RIC policy types</li><li>Supervision of using services
9     (R-APPs). When a service is unavailble, its policies are removed.</li></ul><h2>APIs
10     provided by the service</h2><h3>A1 Policy Management</h3><p>This is an API for
11     management of A1 Policies.</p><ul><li>A1 Policy retrieval, creation, modification
12     and deletion.</li><li>Retrieval of supported A1 Policy types for a Near-RT RIC</li><li>Retrieval
13     of status for existing A1 policies</li></ul><h3>Management of configuration</h3><p>API
14     for updating and retrieval of the component configuration. Note that there other
15     ways to maintain the configuration.</p><h3>Callbacks</h3><p>These are endpoints
16     that are invoked by this service. The callbacks are registerred in this service
17     at service registration.</p><h3>NearRT-RIC Repository</h3><p>This is an API that
18     provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one
19     Near-RT RIC.</p><h3>Health Check</h3><p>API used for supervision of the PMS component.</p><h3>Service
20     Registry and Supervision</h3><p>API used for registerring services that uses PMS.
21     Each A1 policy is owned by a service. PMS can supervise each registerred service
22     and will automatically remove policies for unavailable services.</p>
23   license:
24     name: Copyright (C) 2020 Nordix Foundation. Licensed under the Apache License.
25     url: http://www.apache.org/licenses/LICENSE-2.0
26   version: 1.1.0
27 servers:
28 - url: /
29 tags:
30 - name: Service Registry and Supervision
31 - name: A1 Policy Management
32 - name: A1 Policy Management V1.0
33 - name: NearRT-RIC Repository
34 - name: Callbacks
35 - name: Health Check
36 - name: A1 Policy Management V1.0
37   description: (deprecated primitves)
38 - name: Management of configuration
39 - name: Actuator
40   description: Monitor and interact
41   externalDocs:
42     description: Spring Boot Actuator Web API Documentation
43     url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
44 paths:
45   /policy_types:
46     get:
47       tags:
48       - A1 Policy Management V1.0
49       summary: Query policy type identities
50       operationId: getPolicyTypes
51       parameters:
52       - name: ric
53         in: query
54         description: The name of the Near-RT RIC to get types for.
55         required: false
56         style: form
57         explode: true
58         schema:
59           type: string
60       responses:
61         200:
62           description: Policy type identities
63           content:
64             '*/*':
65               schema:
66                 type: array
67                 items:
68                   type: string
69         404:
70           description: Near-RT RIC is not found
71           content:
72             '*/*':
73               schema:
74                 $ref: '#/components/schemas/error_information'
75   /a1-policy/v2/policy-instances:
76     get:
77       tags:
78       - A1 Policy Management
79       summary: Query for A1 policy instances
80       description: Returns a list of A1 policies matching given search criteria. <br>If
81         several query parameters are defined, the policies matching all conditions
82         are returned.
83       operationId: getPolicyInstances
84       parameters:
85       - name: policytype_id
86         in: query
87         description: Select policies with a given type identity.
88         required: false
89         style: form
90         explode: true
91         schema:
92           type: string
93       - name: ric_id
94         in: query
95         description: Select policies for a given Near-RT RIC identity.
96         required: false
97         style: form
98         explode: true
99         schema:
100           type: string
101       - name: service_id
102         in: query
103         description: Select policies owned by a given service.
104         required: false
105         style: form
106         explode: true
107         schema:
108           type: string
109       - name: type_name
110         in: query
111         description: Select policies of a given type name (type identity has the format
112           <typename_version>)
113         required: false
114         style: form
115         explode: true
116         schema:
117           type: string
118       responses:
119         200:
120           description: Policies
121           content:
122             application/json:
123               schema:
124                 $ref: '#/components/schemas/policy_info_list_v2'
125         404:
126           description: Near-RT RIC, policy type or service not found
127           content:
128             application/json:
129               schema:
130                 $ref: '#/components/schemas/error_information'
131   /a1-policy/v2/status:
132     get:
133       tags:
134       - Health Check
135       summary: Returns status and statistics of this service
136       operationId: getStatus_1
137       responses:
138         200:
139           description: Service is living
140           content:
141             application/json:
142               schema:
143                 $ref: '#/components/schemas/status_info_v2'
144   /actuator/threaddump:
145     get:
146       tags:
147       - Actuator
148       summary: Actuator web endpoint 'threaddump'
149       operationId: threaddump_4
150       responses:
151         200:
152           description: OK
153           content:
154             '*/*':
155               schema:
156                 type: object
157   /services:
158     get:
159       tags:
160       - A1 Policy Management V1.0
161       summary: Returns service information
162       operationId: getServices
163       parameters:
164       - name: name
165         in: query
166         description: The name of the service
167         required: false
168         style: form
169         explode: true
170         schema:
171           type: string
172       responses:
173         200:
174           description: OK
175           content:
176             '*/*':
177               schema:
178                 type: array
179                 items:
180                   $ref: '#/components/schemas/service_status_v1'
181         404:
182           description: Service is not found
183           content:
184             '*/*':
185               schema:
186                 type: string
187     delete:
188       tags:
189       - A1 Policy Management V1.0
190       summary: Unregister a service
191       operationId: deleteService
192       parameters:
193       - name: name
194         in: query
195         description: The name of the service
196         required: true
197         style: form
198         explode: true
199         schema:
200           type: string
201       responses:
202         204:
203           description: Service unregistered
204           content:
205             '*/*':
206               schema:
207                 $ref: '#/components/schemas/void'
208         404:
209           description: Service not found
210           content:
211             '*/*':
212               schema:
213                 type: string
214   /a1-policy/v2/rics/ric:
215     get:
216       tags:
217       - NearRT-RIC Repository
218       summary: Returns info for one Near-RT RIC
219       description: Either a Near-RT RIC identity or a Mananged Element identity can
220         be specified.<br>The intention with Mananged Element identity is the ID used
221         in O1 for accessing the traffical element (such as the ID of CU).
222       operationId: getRic_1
223       parameters:
224       - name: managed_element_id
225         in: query
226         description: The identity of a Managed Element. If given, the Near-RT RIC
227           managing the ME is returned.
228         required: false
229         style: form
230         explode: true
231         schema:
232           type: string
233       - name: ric_id
234         in: query
235         description: The identity of a Near-RT RIC to get information for.
236         required: false
237         style: form
238         explode: true
239         schema:
240           type: string
241       responses:
242         200:
243           description: Near-RT RIC is found
244           content:
245             application/json:
246               schema:
247                 $ref: '#/components/schemas/ric_info_v2'
248         404:
249           description: Near-RT RIC is not found
250           content:
251             application/json:
252               schema:
253                 $ref: '#/components/schemas/error_information'
254   /actuator/loggers:
255     get:
256       tags:
257       - Actuator
258       summary: Actuator web endpoint 'loggers'
259       operationId: loggers_2
260       responses:
261         200:
262           description: OK
263           content:
264             '*/*':
265               schema:
266                 type: object
267   /actuator/health/**:
268     get:
269       tags:
270       - Actuator
271       summary: Actuator web endpoint 'health-path'
272       operationId: health-path_2
273       responses:
274         200:
275           description: OK
276           content:
277             '*/*':
278               schema:
279                 type: object
280   /a1-policy/v2/policy-types:
281     get:
282       tags:
283       - A1 Policy Management
284       summary: Query policy type identities
285       operationId: getPolicyTypes_1
286       parameters:
287       - name: ric_id
288         in: query
289         description: Select types for the given Near-RT RIC identity.
290         required: false
291         style: form
292         explode: true
293         schema:
294           type: string
295       - name: type_name
296         in: query
297         description: Select types with the given type name (type identity has the
298           format <typename_version>)
299         required: false
300         style: form
301         explode: true
302         schema:
303           type: string
304       - name: compatible_with_version
305         in: query
306         description: Select types that are compatible with the given version. This
307           parameter is only applicable in conjunction with type_name. As an example
308           version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching
309           types will be returned sorted in ascending order.
310         required: false
311         style: form
312         explode: true
313         schema:
314           type: string
315       responses:
316         200:
317           description: Policy type IDs
318           content:
319             application/json:
320               schema:
321                 $ref: '#/components/schemas/policytype_id_list_v2'
322         404:
323           description: Near-RT RIC is not found
324           content:
325             application/json:
326               schema:
327                 $ref: '#/components/schemas/error_information'
328   /a1-policy/v2/policies/{policy_id}:
329     get:
330       tags:
331       - A1 Policy Management
332       summary: Returns a policy
333       operationId: getPolicy_1
334       parameters:
335       - name: policy_id
336         in: path
337         required: true
338         style: simple
339         explode: false
340         schema:
341           type: string
342       responses:
343         200:
344           description: Policy found
345           content:
346             application/json:
347               schema:
348                 $ref: '#/components/schemas/policy_info_v2'
349         404:
350           description: Policy is not found
351           content:
352             application/json:
353               schema:
354                 $ref: '#/components/schemas/error_information'
355     delete:
356       tags:
357       - A1 Policy Management
358       summary: Delete a policy
359       operationId: deletePolicy_1
360       parameters:
361       - name: policy_id
362         in: path
363         required: true
364         style: simple
365         explode: false
366         schema:
367           type: string
368       responses:
369         200:
370           description: Not used
371           content:
372             '*/*':
373               schema:
374                 $ref: '#/components/schemas/void'
375         423:
376           description: Near-RT RIC is not operational
377           content:
378             '*/*':
379               schema:
380                 $ref: '#/components/schemas/error_information'
381         204:
382           description: Policy deleted
383           content:
384             '*/*':
385               schema:
386                 $ref: '#/components/schemas/void'
387         404:
388           description: Policy is not found
389           content:
390             '*/*':
391               schema:
392                 $ref: '#/components/schemas/error_information'
393   /actuator/metrics/{requiredMetricName}:
394     get:
395       tags:
396       - Actuator
397       summary: Actuator web endpoint 'metrics-requiredMetricName'
398       operationId: metrics-requiredMetricName_2
399       parameters:
400       - name: requiredMetricName
401         in: path
402         required: true
403         style: simple
404         explode: false
405         schema:
406           type: string
407       responses:
408         200:
409           description: OK
410           content:
411             '*/*':
412               schema:
413                 type: object
414   /a1-policy/v2/configuration:
415     get:
416       tags:
417       - Management of configuration
418       summary: Returns the contents of the configuration file
419       description: Note that the file contents is not relevant if the Consul is used.
420       operationId: getConfiguration
421       responses:
422         200:
423           description: Configuration
424           content:
425             application/json:
426               schema:
427                 type: object
428         404:
429           description: File is not found or readable
430           content:
431             application/json:
432               schema:
433                 $ref: '#/components/schemas/error_information'
434     put:
435       tags:
436       - Management of configuration
437       summary: Replace the current configuration file with the given configuration
438       description: Note that the file is ignored if the Consul is used.
439       operationId: putConfiguration
440       requestBody:
441         content:
442           application/json:
443             schema:
444               type: object
445         required: true
446       responses:
447         200:
448           description: Configuration updated
449           content:
450             '*/*':
451               schema:
452                 $ref: '#/components/schemas/void'
453         400:
454           description: Invalid configuration provided
455           content:
456             '*/*':
457               schema:
458                 $ref: '#/components/schemas/error_information'
459         500:
460           description: Something went wrong when replacing the configuration. Try
461             again.
462           content:
463             '*/*':
464               schema:
465                 $ref: '#/components/schemas/error_information'
466   /policy:
467     get:
468       tags:
469       - A1 Policy Management V1.0
470       summary: Returns a policy configuration
471       operationId: getPolicy
472       parameters:
473       - name: id
474         in: query
475         description: The identity of the policy instance.
476         required: true
477         style: form
478         explode: true
479         schema:
480           type: string
481       responses:
482         200:
483           description: Policy found
484           content:
485             '*/*':
486               schema:
487                 type: object
488         404:
489           description: Policy is not found
490           content:
491             '*/*':
492               schema:
493                 $ref: '#/components/schemas/error_information'
494     put:
495       tags:
496       - A1 Policy Management V1.0
497       summary: Put a policy
498       operationId: putPolicy
499       parameters:
500       - name: type
501         in: query
502         description: The name of the policy type.
503         required: false
504         style: form
505         explode: true
506         schema:
507           type: string
508           default: ""
509       - name: id
510         in: query
511         description: The identity of the policy instance.
512         required: true
513         style: form
514         explode: true
515         schema:
516           type: string
517       - name: ric
518         in: query
519         description: The name of the Near-RT RIC where the policy will be created.
520         required: true
521         style: form
522         explode: true
523         schema:
524           type: string
525       - name: service
526         in: query
527         description: The name of the service creating the policy.
528         required: true
529         style: form
530         explode: true
531         schema:
532           type: string
533       - name: transient
534         in: query
535         description: If the policy is transient or not (boolean defaulted to false).
536           A policy is transient if it will be forgotten when the service needs to
537           reconnect to the Near-RT RIC.
538         required: false
539         style: form
540         explode: true
541         schema:
542           type: boolean
543           default: false
544       requestBody:
545         content:
546           application/json:
547             schema:
548               type: object
549         required: true
550       responses:
551         200:
552           description: Policy updated
553           content:
554             '*/*':
555               schema:
556                 $ref: '#/components/schemas/void'
557         201:
558           description: Policy created
559           content:
560             '*/*':
561               schema:
562                 $ref: '#/components/schemas/void'
563         423:
564           description: Near-RT RIC is not operational
565           content:
566             '*/*':
567               schema:
568                 type: string
569         404:
570           description: Near-RT RIC or policy type is not found
571           content:
572             '*/*':
573               schema:
574                 type: string
575     delete:
576       tags:
577       - A1 Policy Management V1.0
578       summary: Delete a policy
579       operationId: deletePolicy
580       parameters:
581       - name: id
582         in: query
583         description: The identity of the policy instance.
584         required: true
585         style: form
586         explode: true
587         schema:
588           type: string
589       responses:
590         200:
591           description: Not used
592           content:
593             '*/*':
594               schema:
595                 $ref: '#/components/schemas/void'
596         423:
597           description: Near-RT RIC is not operational
598           content:
599             '*/*':
600               schema:
601                 type: string
602         204:
603           description: Policy deleted
604           content:
605             '*/*':
606               schema:
607                 $ref: '#/components/schemas/void'
608         404:
609           description: Policy is not found
610           content:
611             '*/*':
612               schema:
613                 type: string
614   /actuator:
615     get:
616       tags:
617       - Actuator
618       summary: Actuator root web endpoint
619       operationId: links_1
620       responses:
621         200:
622           description: OK
623           content:
624             '*/*':
625               schema:
626                 type: object
627                 additionalProperties:
628                   type: object
629                   additionalProperties:
630                     $ref: '#/components/schemas/Link'
631   /policies:
632     get:
633       tags:
634       - A1 Policy Management V1.0
635       summary: Query policies
636       operationId: getPolicies
637       parameters:
638       - name: type
639         in: query
640         description: The name of the policy type to get policies for.
641         required: false
642         style: form
643         explode: true
644         schema:
645           type: string
646       - name: ric
647         in: query
648         description: The name of the Near-RT RIC to get policies for.
649         required: false
650         style: form
651         explode: true
652         schema:
653           type: string
654       - name: service
655         in: query
656         description: The name of the service to get policies for.
657         required: false
658         style: form
659         explode: true
660         schema:
661           type: string
662       responses:
663         200:
664           description: Policies
665           content:
666             '*/*':
667               schema:
668                 type: array
669                 items:
670                   $ref: '#/components/schemas/policy_info_v1'
671         404:
672           description: Near-RT RIC or type not found
673           content:
674             '*/*':
675               schema:
676                 type: string
677   /actuator/loggers/{name}:
678     get:
679       tags:
680       - Actuator
681       summary: Actuator web endpoint 'loggers-name'
682       operationId: loggers-name_4
683       parameters:
684       - name: name
685         in: path
686         required: true
687         style: simple
688         explode: false
689         schema:
690           type: string
691       responses:
692         200:
693           description: OK
694           content:
695             '*/*':
696               schema:
697                 type: object
698     post:
699       tags:
700       - Actuator
701       summary: Actuator web endpoint 'loggers-name'
702       operationId: loggers-name_3
703       parameters:
704       - name: name
705         in: path
706         required: true
707         style: simple
708         explode: false
709         schema:
710           type: string
711       responses:
712         200:
713           description: OK
714           content:
715             '*/*':
716               schema:
717                 type: object
718   /a1-policy/v2/services/{service_id}/keepalive:
719     put:
720       tags:
721       - Service Registry and Supervision
722       summary: Heartbeat indicates that the service is running
723       description: A registerred service must call this in regular intervals to indicate
724         that it is in operation. Absence of this call will lead to that teh service
725         will be deregisterred and all its policies are removed.
726       operationId: keepAliveService_1
727       parameters:
728       - name: service_id
729         in: path
730         required: true
731         style: simple
732         explode: false
733         schema:
734           type: string
735       responses:
736         200:
737           description: Service supervision timer refreshed, OK
738           content:
739             '*/*':
740               schema:
741                 type: object
742         404:
743           description: The service is not found, needs re-registration
744           content:
745             '*/*':
746               schema:
747                 $ref: '#/components/schemas/error_information'
748   /rics:
749     get:
750       tags:
751       - A1 Policy Management V1.0
752       summary: Query Near-RT RIC information
753       operationId: getRics
754       parameters:
755       - name: policyType
756         in: query
757         description: The name of the policy type
758         required: false
759         style: form
760         explode: true
761         schema:
762           type: string
763       responses:
764         200:
765           description: OK
766           content:
767             '*/*':
768               schema:
769                 type: array
770                 items:
771                   $ref: '#/components/schemas/ric_info_v1'
772         404:
773           description: Policy type is not found
774           content:
775             '*/*':
776               schema:
777                 type: string
778   /policy_schema:
779     get:
780       tags:
781       - A1 Policy Management V1.0
782       summary: Returns one policy type schema definition
783       operationId: getPolicySchema
784       parameters:
785       - name: id
786         in: query
787         description: The identity of the policy type to get the definition for.
788         required: true
789         style: form
790         explode: true
791         schema:
792           type: string
793       responses:
794         200:
795           description: Policy schema
796           content:
797             '*/*':
798               schema:
799                 type: object
800         404:
801           description: The policy type is not found
802           content:
803             '*/*':
804               schema:
805                 $ref: '#/components/schemas/error_information'
806   /actuator/metrics:
807     get:
808       tags:
809       - Actuator
810       summary: Actuator web endpoint 'metrics'
811       operationId: metrics_2
812       responses:
813         200:
814           description: OK
815           content:
816             '*/*':
817               schema:
818                 type: object
819   /policy_status:
820     get:
821       tags:
822       - A1 Policy Management V1.0
823       summary: Returns a policy status
824       operationId: getPolicyStatus
825       parameters:
826       - name: id
827         in: query
828         description: The identity of the policy.
829         required: true
830         style: form
831         explode: true
832         schema:
833           type: string
834       responses:
835         200:
836           description: Policy status
837           content:
838             '*/*':
839               schema:
840                 type: object
841         404:
842           description: Policy is not found
843           content:
844             '*/*':
845               schema:
846                 type: string
847   /a1-policy/v2/rics:
848     get:
849       tags:
850       - NearRT-RIC Repository
851       summary: Query Near-RT RIC information
852       description: The call returns all Near-RT RICs that supports a given policy
853         type identity
854       operationId: getRics_1
855       parameters:
856       - name: policytype_id
857         in: query
858         description: The identity of a policy type. If given, all Near-RT RICs supporteing
859           the policy type are returned
860         required: false
861         style: form
862         explode: true
863         schema:
864           type: string
865       responses:
866         200:
867           description: OK
868           content:
869             application/json:
870               schema:
871                 $ref: '#/components/schemas/ric_info_list_v2'
872         404:
873           description: Policy type is not found
874           content:
875             application/json:
876               schema:
877                 $ref: '#/components/schemas/error_information'
878   /policy_schemas:
879     get:
880       tags:
881       - A1 Policy Management V1.0
882       summary: Returns policy type schema definitions
883       operationId: getPolicySchemas
884       parameters:
885       - name: ric
886         in: query
887         description: The name of the Near-RT RIC to get the definitions for.
888         required: false
889         style: form
890         explode: true
891         schema:
892           type: string
893       responses:
894         200:
895           description: Policy schemas
896           content:
897             '*/*':
898               schema:
899                 type: array
900                 items:
901                   type: object
902         404:
903           description: Near-RT RIC is not found
904           content:
905             '*/*':
906               schema:
907                 $ref: '#/components/schemas/error_information'
908   /policy_ids:
909     get:
910       tags:
911       - A1 Policy Management V1.0
912       summary: Query policies, only policy identities returned
913       operationId: getPolicyIds
914       parameters:
915       - name: type
916         in: query
917         description: The name of the policy type to get policies for.
918         required: false
919         style: form
920         explode: true
921         schema:
922           type: string
923       - name: ric
924         in: query
925         description: The name of the Near-RT RIC to get policies for.
926         required: false
927         style: form
928         explode: true
929         schema:
930           type: string
931       - name: service
932         in: query
933         description: The name of the service to get policies for.
934         required: false
935         style: form
936         explode: true
937         schema:
938           type: string
939       responses:
940         200:
941           description: Policy identitiess
942           content:
943             '*/*':
944               schema:
945                 type: array
946                 items:
947                   type: string
948         404:
949           description: Near-RT RIC or type not found
950           content:
951             '*/*':
952               schema:
953                 type: string
954   /a1-policy/v2/services:
955     get:
956       tags:
957       - Service Registry and Supervision
958       summary: Returns service information
959       description: Either information about a registered service with given identity
960         or all registered services are returned.
961       operationId: getServices_1
962       parameters:
963       - name: service_id
964         in: query
965         description: The identity of the service
966         required: false
967         style: form
968         explode: true
969         schema:
970           type: string
971       responses:
972         200:
973           description: OK
974           content:
975             application/json:
976               schema:
977                 $ref: '#/components/schemas/service_list_v2'
978         404:
979           description: Service is not found
980           content:
981             application/json:
982               schema:
983                 $ref: '#/components/schemas/error_information'
984     put:
985       tags:
986       - Service Registry and Supervision
987       summary: Register a service
988       description: Registering a service is needed to:<ul><li>Get callbacks.</li><li>Activate
989         supervision of the service. If a service is inactive, its policies will be
990         deleted.</li></ul>
991       operationId: putService_1
992       requestBody:
993         content:
994           application/json:
995             schema:
996               $ref: '#/components/schemas/service_registration_info_v2'
997         required: true
998       responses:
999         200:
1000           description: Service updated
1001           content:
1002             '*/*':
1003               schema:
1004                 type: object
1005         201:
1006           description: Service created
1007           content:
1008             '*/*':
1009               schema:
1010                 type: object
1011         400:
1012           description: The ServiceRegistrationInfo is not accepted
1013           content:
1014             '*/*':
1015               schema:
1016                 $ref: '#/components/schemas/error_information'
1017   /actuator/info:
1018     get:
1019       tags:
1020       - Actuator
1021       summary: Actuator web endpoint 'info'
1022       operationId: info_2
1023       responses:
1024         200:
1025           description: OK
1026           content:
1027             '*/*':
1028               schema:
1029                 type: object
1030   /ric:
1031     get:
1032       tags:
1033       - A1 Policy Management V1.0
1034       summary: Returns the name of a RIC managing one Mananged Element
1035       operationId: getRic
1036       parameters:
1037       - name: managedElementId
1038         in: query
1039         description: The identity of the Managed Element
1040         required: true
1041         style: form
1042         explode: true
1043         schema:
1044           type: string
1045       responses:
1046         200:
1047           description: Near-RT RIC is found
1048           content:
1049             '*/*':
1050               schema:
1051                 type: string
1052         404:
1053           description: Near-RT RIC is not found
1054           content:
1055             '*/*':
1056               schema:
1057                 type: string
1058   /services/keepalive:
1059     put:
1060       tags:
1061       - A1 Policy Management V1.0
1062       summary: Heartbeat from a service
1063       operationId: keepAliveService
1064       parameters:
1065       - name: name
1066         in: query
1067         description: The name of the service
1068         required: true
1069         style: form
1070         explode: true
1071         schema:
1072           type: string
1073       responses:
1074         200:
1075           description: Service supervision timer refreshed, OK
1076           content:
1077             '*/*':
1078               schema:
1079                 type: string
1080         404:
1081           description: The service is not found, needs re-registration
1082           content:
1083             '*/*':
1084               schema:
1085                 type: string
1086   /status:
1087     get:
1088       tags:
1089       - A1 Policy Management V1.0
1090       summary: Returns status and statistics of this service
1091       operationId: getStatus
1092       responses:
1093         200:
1094           description: Service is living
1095           content:
1096             '*/*':
1097               schema:
1098                 type: string
1099   /a1-policy/v2/policy-types/{policytype_id}:
1100     get:
1101       tags:
1102       - A1 Policy Management
1103       summary: Returns a policy type definition
1104       operationId: getPolicyType
1105       parameters:
1106       - name: policytype_id
1107         in: path
1108         required: true
1109         style: simple
1110         explode: false
1111         schema:
1112           type: string
1113       responses:
1114         200:
1115           description: Policy type
1116           content:
1117             '*/*':
1118               schema:
1119                 $ref: '#/components/schemas/policytype_v2'
1120         404:
1121           description: Policy type is not found
1122           content:
1123             '*/*':
1124               schema:
1125                 $ref: '#/components/schemas/error_information'
1126   /actuator/logfile:
1127     get:
1128       tags:
1129       - Actuator
1130       summary: Actuator web endpoint 'logfile'
1131       operationId: logfile_2
1132       responses:
1133         200:
1134           description: OK
1135           content:
1136             '*/*':
1137               schema:
1138                 type: object
1139   /actuator/health:
1140     get:
1141       tags:
1142       - Actuator
1143       summary: Actuator web endpoint 'health'
1144       operationId: health_2
1145       responses:
1146         200:
1147           description: OK
1148           content:
1149             '*/*':
1150               schema:
1151                 type: object
1152   /a1-policy/v2/policies:
1153     get:
1154       tags:
1155       - A1 Policy Management
1156       summary: Query policy identities
1157       description: Returns a list of A1 policies matching given search criteria. <br>If
1158         several query parameters are defined, the policies matching all conditions
1159         are returned.
1160       operationId: getPolicyIds_1
1161       parameters:
1162       - name: policytype_id
1163         in: query
1164         description: Select policies of a given policy type identity.
1165         required: false
1166         style: form
1167         explode: true
1168         schema:
1169           type: string
1170       - name: ric_id
1171         in: query
1172         description: Select policies of a given Near-RT RIC identity.
1173         required: false
1174         style: form
1175         explode: true
1176         schema:
1177           type: string
1178       - name: service_id
1179         in: query
1180         description: Select policies owned by a given service.
1181         required: false
1182         style: form
1183         explode: true
1184         schema:
1185           type: string
1186       - name: type_name
1187         in: query
1188         description: Select policies of types with the given type name (type identity
1189           has the format <typename_version>)
1190         required: false
1191         style: form
1192         explode: true
1193         schema:
1194           type: string
1195       responses:
1196         200:
1197           description: Policy identities
1198           content:
1199             application/json:
1200               schema:
1201                 $ref: '#/components/schemas/policy_id_list_v2'
1202         404:
1203           description: Near-RT RIC or type not found
1204           content:
1205             application/json:
1206               schema:
1207                 $ref: '#/components/schemas/error_information'
1208     put:
1209       tags:
1210       - A1 Policy Management
1211       summary: Create or update a policy
1212       operationId: putPolicy_1
1213       requestBody:
1214         content:
1215           application/json:
1216             schema:
1217               $ref: '#/components/schemas/policy_info_v2'
1218         required: true
1219       responses:
1220         200:
1221           description: Policy updated
1222           content:
1223             application/json:
1224               schema:
1225                 $ref: '#/components/schemas/void'
1226         201:
1227           description: Policy created
1228           content:
1229             application/json:
1230               schema:
1231                 $ref: '#/components/schemas/void'
1232         423:
1233           description: Near-RT RIC is not operational
1234           content:
1235             application/json:
1236               schema:
1237                 $ref: '#/components/schemas/error_information'
1238         404:
1239           description: Near-RT RIC or policy type is not found
1240           content:
1241             application/json:
1242               schema:
1243                 $ref: '#/components/schemas/error_information'
1244   /r-app/near-rt-ric-status:
1245     post:
1246       tags:
1247       - Callbacks
1248       summary: Callback for Near-RT RIC status
1249       description: The URL to this call is registerred at Service registration.
1250       operationId: serviceCallback
1251       requestBody:
1252         content:
1253           application/json:
1254             schema:
1255               $ref: '#/components/schemas/service_callback_info_v2'
1256         required: true
1257       responses:
1258         200:
1259           description: OK
1260           content:
1261             application/json:
1262               schema:
1263                 $ref: '#/components/schemas/void'
1264   /service:
1265     put:
1266       tags:
1267       - A1 Policy Management V1.0
1268       summary: Register a service
1269       operationId: putService
1270       requestBody:
1271         content:
1272           application/json:
1273             schema:
1274               $ref: '#/components/schemas/service_registration_info_v1'
1275         required: true
1276       responses:
1277         200:
1278           description: Service updated
1279           content:
1280             '*/*':
1281               schema:
1282                 type: string
1283         201:
1284           description: Service created
1285           content:
1286             '*/*':
1287               schema:
1288                 type: string
1289         400:
1290           description: The ServiceRegistrationInfo is not accepted
1291           content:
1292             '*/*':
1293               schema:
1294                 type: string
1295   /a1-policy/v2/services/{service_id}:
1296     delete:
1297       tags:
1298       - Service Registry and Supervision
1299       summary: Unregister a service
1300       operationId: deleteService_1
1301       parameters:
1302       - name: service_id
1303         in: path
1304         required: true
1305         style: simple
1306         explode: false
1307         schema:
1308           type: string
1309       responses:
1310         200:
1311           description: Not used
1312           content:
1313             '*/*':
1314               schema:
1315                 $ref: '#/components/schemas/void'
1316         204:
1317           description: Service unregistered
1318           content:
1319             '*/*':
1320               schema:
1321                 type: object
1322         404:
1323           description: Service not found
1324           content:
1325             '*/*':
1326               schema:
1327                 $ref: '#/components/schemas/error_information'
1328   /a1-policy/v2/policies/{policy_id}/status:
1329     get:
1330       tags:
1331       - A1 Policy Management
1332       summary: Returns a policy status
1333       operationId: getPolicyStatus_1
1334       parameters:
1335       - name: policy_id
1336         in: path
1337         required: true
1338         style: simple
1339         explode: false
1340         schema:
1341           type: string
1342       responses:
1343         200:
1344           description: Policy status
1345           content:
1346             application/json:
1347               schema:
1348                 $ref: '#/components/schemas/policy_status_info_v2'
1349         404:
1350           description: Policy is not found
1351           content:
1352             application/json:
1353               schema:
1354                 $ref: '#/components/schemas/error_information'
1355   /actuator/heapdump:
1356     get:
1357       tags:
1358       - Actuator
1359       summary: Actuator web endpoint 'heapdump'
1360       operationId: heapdump_2
1361       responses:
1362         200:
1363           description: OK
1364           content:
1365             '*/*':
1366               schema:
1367                 type: object
1368 components:
1369   schemas:
1370     error_information:
1371       type: object
1372       properties:
1373         detail:
1374           type: string
1375           description: ' A human-readable explanation specific to this occurrence
1376             of the problem.'
1377           example: Policy type not found
1378         status:
1379           type: integer
1380           description: 'The HTTP status code generated by the origin server for this
1381             occurrence of the problem. '
1382           format: int32
1383           example: 404
1384       description: Problem as defined in https://tools.ietf.org/html/rfc7807
1385     void:
1386       type: object
1387       description: Void/empty
1388     status_info_v2:
1389       type: object
1390       properties:
1391         status:
1392           type: string
1393           description: status text
1394     policy_info_v1:
1395       type: object
1396       properties:
1397         service:
1398           type: string
1399           description: the name of the service owning the policy
1400         json:
1401           type: object
1402           description: the configuration of the policy
1403         id:
1404           type: string
1405           description: identity of the policy
1406         lastModified:
1407           type: string
1408           description: timestamp, last modification time
1409         type:
1410           type: string
1411           description: name of the policy type
1412         ric:
1413           type: string
1414           description: identity of the target Near-RT RIC
1415     service_registration_info_v1:
1416       type: object
1417       properties:
1418         keepAliveIntervalSeconds:
1419           type: integer
1420           description: keep alive interval for the service. This is a heartbeat supervision
1421             of the service, which in regular intevals must invoke a 'keepAlive' REST
1422             call. When a service does not invoke this call within the given time,
1423             it is considered unavailble. An unavailable service will be automatically
1424             deregistered and its policies will be deleted. Value 0 means no timeout
1425             supervision.
1426           format: int64
1427         callbackUrl:
1428           type: string
1429           description: callback for notifying of RIC synchronization
1430         serviceName:
1431           type: string
1432     ric_info_v2:
1433       type: object
1434       properties:
1435         ric_id:
1436           type: string
1437           description: identity of the Near-RT RIC
1438         managed_element_ids:
1439           type: array
1440           description: O1 identities for managed entities
1441           items:
1442             type: string
1443             description: O1 identities for managed entities
1444         state:
1445           type: string
1446           description: Represents the states for a Near-RT RIC
1447           enum:
1448           - UNAVAILABLE
1449           - AVAILABLE
1450           - SYNCHRONIZING
1451           - CONSISTENCY_CHECK
1452         policytype_ids:
1453           type: array
1454           description: supported policy types
1455           items:
1456             type: string
1457             description: supported policy types
1458       description: Information for a Near-RT RIC
1459     service_registration_info_v2:
1460       required:
1461       - service_id
1462       type: object
1463       properties:
1464         callback_url:
1465           type: string
1466           description: callback for notifying of Near-RT RIC state changes
1467         service_id:
1468           type: string
1469           description: identity of the service
1470         keep_alive_interval_seconds:
1471           type: integer
1472           description: keep alive interval for the service. This is a heartbeat supervision
1473             of the service, which in regular intevals must invoke a 'keepalive' REST
1474             call. When a service does not invoke this call within the given time,
1475             it is considered unavailble. An unavailable service will be automatically
1476             deregistered and its policies will be deleted. Value 0 means no timeout
1477             supervision.
1478           format: int64
1479       description: Information for one service
1480     policy_info_list_v2:
1481       type: object
1482       properties:
1483         policies:
1484           type: array
1485           description: List of policy information
1486           items:
1487             $ref: '#/components/schemas/policy_info_v2'
1488       description: List of policy information
1489     ric_info_v1:
1490       type: object
1491       properties:
1492         managedElementIds:
1493           type: array
1494           description: O1 identities for managed entities
1495           items:
1496             type: string
1497             description: O1 identities for managed entities
1498         policyTypes:
1499           type: array
1500           description: supported policy types
1501           items:
1502             type: string
1503             description: supported policy types
1504         state:
1505           type: string
1506           description: state info
1507         ricName:
1508           type: string
1509           description: identity of the Near-RT RIC
1510     service_status_v1:
1511       type: object
1512       properties:
1513         keepAliveIntervalSeconds:
1514           type: integer
1515           description: policy keep alive timeout
1516           format: int64
1517         timeSinceLastActivitySeconds:
1518           type: integer
1519           description: time since last invocation by the service
1520           format: int64
1521         callbackUrl:
1522           type: string
1523           description: callback for notifying of RIC synchronization
1524         serviceName:
1525           type: string
1526           description: identity of the service
1527     policy_status_info_v2:
1528       type: object
1529       properties:
1530         last_modified:
1531           type: string
1532           description: timestamp, last modification time
1533         status:
1534           type: object
1535           description: the Policy status
1536       description: Status for one A1-P Policy
1537     service_status_v2:
1538       type: object
1539       properties:
1540         callback_url:
1541           type: string
1542           description: callback for notifying of RIC synchronization
1543         service_id:
1544           type: string
1545           description: identity of the service
1546         keep_alive_interval_seconds:
1547           type: integer
1548           description: policy keep alive timeout
1549           format: int64
1550         time_since_last_activity_seconds:
1551           type: integer
1552           description: time since last invocation by the service
1553           format: int64
1554       description: List of service information
1555     ric_info_list_v2:
1556       type: object
1557       properties:
1558         rics:
1559           type: array
1560           description: List of Near-RT RIC information
1561           items:
1562             $ref: '#/components/schemas/ric_info_v2'
1563       description: List of Near-RT RIC information
1564     policytype_v2:
1565       type: object
1566       properties:
1567         policy_schema:
1568           type: object
1569           description: Policy type json scema. The schema is a json object following
1570             http://json-schema.org/draft-07/schema
1571       description: Policy type
1572     policytype_id_list_v2:
1573       type: object
1574       properties:
1575         policytype_ids:
1576           type: array
1577           description: Policy type identities
1578           items:
1579             type: string
1580             description: Policy type identities
1581       description: Information about policy types
1582     policy_info_v2:
1583       required:
1584       - policy_data
1585       - policy_id
1586       - policytype_id
1587       - ric_id
1588       - service_id
1589       type: object
1590       properties:
1591         ric_id:
1592           type: string
1593           description: identity of the target Near-RT RIC
1594         policy_id:
1595           type: string
1596           description: identity of the policy
1597         transient:
1598           type: boolean
1599           description: if true, the policy is deleted at RIC restart. If false, its
1600             value is maintained by this service until explicitly deleted. Default
1601             false.
1602         service_id:
1603           type: string
1604           description: the identity of the service owning the policy
1605         policy_data:
1606           type: object
1607           description: the configuration of the policy
1608         status_notification_uri:
1609           type: string
1610           description: Callback URI for policy status updates
1611         policytype_id:
1612           type: string
1613           description: identity of the policy type
1614       description: Information for one A1-P Policy
1615     policy_id_list_v2:
1616       type: object
1617       properties:
1618         policy_ids:
1619           type: array
1620           description: Policy identities
1621           items:
1622             type: string
1623             description: Policy identities
1624       description: A list of policy identities
1625     service_list_v2:
1626       type: object
1627       properties:
1628         service_list:
1629           type: array
1630           description: List of service information
1631           items:
1632             $ref: '#/components/schemas/service_status_v2'
1633       description: List of service information
1634     service_callback_info_v2:
1635       required:
1636       - event_type
1637       - ric_id
1638       type: object
1639       properties:
1640         ric_id:
1641           type: string
1642           description: identity of a Near-RT RIC
1643         event_type:
1644           type: string
1645           description: |-
1646             values:
1647             AVAILABLE: the  Near-RT RIC has become available for A1 Policy management
1648           enum:
1649           - AVAILABLE
1650       description: Information transferred as in Service callbacks (callback_url)
1651     Link:
1652       type: object
1653       properties:
1654         templated:
1655           type: boolean
1656         href:
1657           type: string