0895f50db0f44cb1ff9ef7eadefc05f7a7cabf09
[ccsdk/oran.git] / docs / offeredapis / swagger / pms-api.yaml
1 #  ============LICENSE_START=======================================================
2 #  Copyright (C) 2020-2023 Nordix Foundation
3 #  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
4 #  Modifications Copyright (C) 2021 Pantheon.tech
5 #  Modifications Copyright (C) 2021 Bell Canada
6 #  ================================================================================
7 #  Licensed under the Apache License, Version 2.0 (the "License");
8 #  you may not use this file except in compliance with the License.
9 #  You may obtain a copy of the License at
10 #
11 #        http://www.apache.org/licenses/LICENSE-2.0
12 #
13 #  Unless required by applicable law or agreed to in writing, software
14 #  distributed under the License is distributed on an "AS IS" BASIS,
15 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 #  See the License for the specific language governing permissions and
17 #  limitations under the License.
18 #
19 #  SPDX-License-Identifier: Apache-2.0
20 #  ============LICENSE_END=========================================================
21
22 openapi: 3.0.3
23 info:
24   description: "<h2>General</h2><p>The O-RAN Non-RT RIC Policy Management Service\
25     \ provides a REST API for management of A1 policies. <br/>The main tasks of the\
26     \ service are:</p><ul><li>A1 Policy creation, modification and deletion.</li><li>Monitoring\
27     \ and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs</li><li>Maintaining\
28     \ a view of supported Near-RT RIC policy types</li><li>Supervision of using services\
29     \ (R-APPs). When a service is unavailable, its policies are removed.</li></ul><h2>APIs\
30     \ provided or defined by the service</h2><h3>A1 Policy Management</h3><p>This\
31     \ is an API for management of A1 Policies.</p><ul><li>A1 Policy retrieval, creation,\
32     \ modification and deletion.</li><li>Retrieval of supported A1 Policy types for\
33     \ a Near-RT RIC</li><li>Retrieval of status for existing A1 policies</li></ul><h3>Management\
34     \ of configuration</h3><p>API for updating and retrieval of the component configuration.\
35     \ Note that there other ways to maintain the configuration.</p><h3>Service callbacks</h3><p>These\
36     \ are endpoints that are invoked by this service. The callbacks are registered\
37     \ in this service at service registration.</p><h3>NearRT-RIC Repository</h3><p>This\
38     \ is an API that provides support for looking up a NearRT-RIC. Each A1 policy\
39     \ is targeted for one Near-RT RIC.</p><h3>Health Check</h3><p>API used for supervision\
40     \ of the PMS component.</p><h3>Service Registry and Supervision</h3><p>API used\
41     \ for registering services that uses PMS. Each A1 policy is optionally owned by\
42     \ a service. PMS can supervise each registered service by a heart-beat supervision\
43     \ and will automatically remove policies for unavailable services. Note that a\
44     \ service does not need to be registered in order to create A1 Policies. This\
45     \ is a feature that is optional to use.</p><h3>Authorization API</h3><p>API used\
46     \ for access control of A1 Policy access. If configured, an external authorization\
47     \ provider is requested to grant access to the A1 Policy type.</p><h3>Spring Boot\
48     \ Actuator</h3><p>Provides generic functions  used to monitor and manage the Spring\
49     \ web application.</p>"
50   license:
51     name: Copyright (C) 2020-2023 Nordix Foundation. Licensed under the Apache License, and
52           Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
53     url: http://www.apache.org/licenses/LICENSE-2.0
54   title: A1 Policy Management Service
55   version: 1.2.0
56 servers:
57   - url: /
58 tags:
59   - description: "API used for authorization of information A1 policy access (this is 
60      provided by an authorization producer such as OPA). <br> Note that this API is called
61      by PMS, it is not provided."
62     name: Authorization API
63   - description: Monitor and interact
64     externalDocs:
65       description: Spring Boot Actuator Web API Documentation
66       url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
67     name: Actuator
68 paths:
69   /a1-policy/v2/policy-instances:
70     get:
71       description: "Returns a list of A1 policies matching given search criteria.\
72         \ <br>If several query parameters are defined, the policies matching all conditions\
73         \ are returned."
74       operationId: getPolicyInstances
75       parameters:
76         - description: Select policies with a given type identity.
77           explode: true
78           in: query
79           name: policytype_id
80           required: false
81           schema:
82             type: string
83           style: form
84         - description: Select policies for a given Near-RT RIC identity.
85           explode: true
86           in: query
87           name: ric_id
88           required: false
89           schema:
90             type: string
91           style: form
92         - description: Select policies owned by a given service.
93           explode: true
94           in: query
95           name: service_id
96           required: false
97           schema:
98             type: string
99           style: form
100         - description: Select policies of a given type name (type identity has the format
101             <typename_version>)
102           explode: true
103           in: query
104           name: type_name
105           required: false
106           schema:
107             type: string
108           style: form
109       responses:
110         "200":
111           content:
112             application/json:
113               examples:
114                 policy_info_list:
115                   $ref: '#/components/examples/policy_info_list'
116               schema:
117                 $ref: '#/components/schemas/policy_info_list'
118           description: Policies
119         "404":
120           content:
121             application/json:
122               schema:
123                 $ref: '#/components/schemas/error_information'
124           description: "Near-RT RIC, policy type or service not found"
125       summary: Query for A1 policy instances
126       tags:
127         - A1 Policy Management
128   /example-authz-check:
129     post:
130       description: The authorization function decides if access is granted.
131       operationId: performAccessControl
132       requestBody:
133         content:
134           application/json:
135             schema:
136               $ref: '#/components/schemas/policy_authorization'
137         required: true
138       responses:
139         "200":
140           content:
141             application/json:
142               schema:
143                 $ref: '#/components/schemas/authorization_result'
144           description: OK
145       summary: Request for access authorization.
146       tags:
147         - Authorization API
148   /actuator/threaddump:
149     get:
150       operationId: threaddump
151       responses:
152         "200":
153           content:
154             text/plain;charset=UTF-8:
155               schema:
156                 type: object
157             application/vnd.spring-boot.actuator.v3+json:
158               schema:
159                 type: object
160             application/json:
161               schema:
162                 type: object
163             application/vnd.spring-boot.actuator.v2+json:
164               schema:
165                 type: object
166           description: OK
167       summary: Actuator web endpoint 'threaddump'
168       tags:
169         - Actuator
170   /a1-policy/v2/status:
171     get:
172       operationId: getStatus
173       responses:
174         "200":
175           content:
176             application/json:
177               schema:
178                 $ref: '#/components/schemas/status_info'
179               examples:
180                 status_info:
181                   $ref: '#/components/examples/status_info'
182           description: Service is living
183       summary: Returns status and statistics of this service
184       tags:
185         - Health Check
186   /actuator/loggers:
187     get:
188       operationId: loggers
189       responses:
190         "200":
191           content:
192             application/vnd.spring-boot.actuator.v3+json:
193               schema:
194                 type: object
195             application/json:
196               schema:
197                 type: object
198             application/vnd.spring-boot.actuator.v2+json:
199               schema:
200                 type: object
201           description: OK
202       summary: Actuator web endpoint 'loggers'
203       tags:
204         - Actuator
205   /actuator/health/**:
206     get:
207       operationId: health-path
208       responses:
209         "200":
210           content:
211             application/vnd.spring-boot.actuator.v3+json:
212               schema:
213                 type: object
214             application/json:
215               schema:
216                 type: object
217             application/vnd.spring-boot.actuator.v2+json:
218               schema:
219                 type: object
220           description: OK
221       summary: Actuator web endpoint 'health-path'
222       tags:
223         - Actuator
224   /a1-policy/v2/rics/ric:
225     get:
226       description: Either a Near-RT RIC identity or a Managed Element identity can
227         be specified.<br>The intention with Managed Element identity is the ID used
228         in O1 for accessing the traffical element (such as the ID of CU).
229       operationId: getRic
230       parameters:
231         - description: "The identity of a Managed Element. If given, the Near-RT RIC\
232           \ managing the ME is returned."
233           explode: true
234           in: query
235           name: managed_element_id
236           required: false
237           schema:
238             type: string
239           style: form
240         - description: The identity of a Near-RT RIC to get information for.
241           explode: true
242           in: query
243           name: ric_id
244           required: false
245           schema:
246             type: string
247           style: form
248       responses:
249         "200":
250           content:
251             application/json:
252               schema:
253                 $ref: '#/components/schemas/ric_info'
254               examples:
255                 ric_info:
256                   $ref: '#/components/examples/ric_info'
257           description: Near-RT RIC is found
258         "404":
259           content:
260             application/json:
261               schema:
262                 $ref: '#/components/schemas/error_information'
263           description: Near-RT RIC is not found
264       summary: Returns info for one Near-RT RIC
265       tags:
266         - NearRT-RIC Repository
267   /actuator/shutdown:
268     post:
269       operationId: shutdown
270       responses:
271         "200":
272           content:
273             application/vnd.spring-boot.actuator.v3+json:
274               schema:
275                 type: object
276             application/json:
277               schema:
278                 type: object
279             application/vnd.spring-boot.actuator.v2+json:
280               schema:
281                 type: object
282           description: OK
283       summary: Actuator web endpoint 'shutdown'
284       tags:
285         - Actuator
286   /a1-policy/v2/policy-types:
287     get:
288       operationId: getPolicyTypes
289       parameters:
290         - description: Select types for the given Near-RT RIC identity.
291           explode: true
292           in: query
293           name: ric_id
294           required: false
295           schema:
296             type: string
297           style: form
298         - description: Select types with the given type name (type identity has the
299             format <typename_version>)
300           explode: true
301           in: query
302           name: type_name
303           required: false
304           schema:
305             type: string
306           style: form
307         - description: Select types that are compatible with the given version. This
308             parameter is only applicable in conjunction with type_name. As an example
309             version 1.9.1 is compatible with 1.0.0 but not the other way around. Matching
310             types will be returned sorted in ascending order.
311           explode: true
312           in: query
313           name: compatible_with_version
314           required: false
315           schema:
316             type: string
317           style: form
318       responses:
319         "200":
320           content:
321             application/json:
322               examples:
323                 policy_type_id_list:
324                   $ref: '#/components/examples/policy_type_id_list'
325               schema:
326                 $ref: '#/components/schemas/policy_type_id_list'
327           description: Policy type IDs
328         "404":
329           content:
330             application/json:
331               schema:
332                 $ref: '#/components/schemas/error_information'
333           description: Near-RT RIC is not found
334       summary: Query policy type identities
335       tags:
336         - A1 Policy Management
337   /a1-policy/v2/policies/{policy_id}:
338     delete:
339       operationId: deletePolicy
340       parameters:
341         - explode: false
342           in: path
343           name: policy_id
344           required: true
345           schema:
346             type: string
347           style: simple
348       responses:
349         "200":
350           content:
351             '*/*':
352               schema:
353                 $ref: '#/components/schemas/void'
354           description: Not used
355         "423":
356           content:
357             '*/*':
358               schema:
359                 $ref: '#/components/schemas/error_information'
360           description: Near-RT RIC is not operational
361         "204":
362           content:
363             '*/*':
364               schema:
365                 $ref: '#/components/schemas/void'
366           description: Policy deleted
367         "404":
368           content:
369             '*/*':
370               schema:
371                 $ref: '#/components/schemas/error_information'
372           description: Policy is not found
373       summary: Delete a policy
374       tags:
375         - A1 Policy Management
376     get:
377       operationId: getPolicy
378       parameters:
379         - explode: false
380           in: path
381           name: policy_id
382           required: true
383           schema:
384             type: string
385           style: simple
386       responses:
387         "200":
388           content:
389             application/json:
390               schema:
391                 $ref: '#/components/schemas/policy_info'
392               examples:
393                 policy_info:
394                   $ref: '#/components/examples/policy_info'
395           description: Policy found
396         "404":
397           content:
398             application/json:
399               schema:
400                 $ref: '#/components/schemas/error_information'
401           description: Policy is not found
402       summary: Returns a policy
403       tags:
404         - A1 Policy Management
405   /actuator/metrics/{requiredMetricName}:
406     get:
407       operationId: metrics-requiredMetricName
408       parameters:
409         - explode: false
410           in: path
411           name: requiredMetricName
412           required: true
413           schema:
414             type: string
415           style: simple
416       responses:
417         "200":
418           content:
419             application/vnd.spring-boot.actuator.v3+json:
420               schema:
421                 type: object
422             application/json:
423               schema:
424                 type: object
425             application/vnd.spring-boot.actuator.v2+json:
426               schema:
427                 type: object
428           description: OK
429       summary: Actuator web endpoint 'metrics-requiredMetricName'
430       tags:
431         - Actuator
432   /a1-policy/v2/configuration:
433     get:
434       operationId: getConfiguration
435       responses:
436         "200":
437           content:
438             application/json:
439               schema:
440                 type: string
441           description: Configuration
442         "404":
443           content:
444             application/json:
445               schema:
446                 $ref: '#/components/schemas/error_information'
447           description: File is not found or readable
448       summary: Returns the contents of the application configuration file
449       tags:
450         - configuration
451     put:
452       operationId: putConfiguration
453       requestBody:
454         content:
455           application/json:
456             schema:
457               type: object
458         required: true
459       responses:
460         "200":
461           content:
462             '*/*':
463               schema:
464                 $ref: '#/components/schemas/void'
465           description: Configuration updated
466         "400":
467           content:
468             '*/*':
469               schema:
470                 $ref: '#/components/schemas/error_information'
471           description: Invalid configuration provided
472         "500":
473           content:
474             '*/*':
475               schema:
476                 $ref: '#/components/schemas/error_information'
477           description: Something went wrong when replacing the configuration. Try
478             again.
479       summary: Replace the current configuration file with the given configuration
480       tags:
481         - configuration
482   /actuator:
483     get:
484       operationId: links
485       responses:
486         "200":
487           content:
488             application/vnd.spring-boot.actuator.v3+json:
489               schema:
490                 additionalProperties:
491                   additionalProperties:
492                     $ref: '#/components/schemas/Link'
493                   type: object
494                 type: object
495             application/json:
496               schema:
497                 additionalProperties:
498                   additionalProperties:
499                     $ref: '#/components/schemas/Link'
500                   type: object
501                 type: object
502             application/vnd.spring-boot.actuator.v2+json:
503               schema:
504                 additionalProperties:
505                   additionalProperties:
506                     $ref: '#/components/schemas/Link'
507                   type: object
508                 type: object
509           description: OK
510       summary: Actuator root web endpoint
511       tags:
512         - Actuator
513   /actuator/loggers/{name}:
514     get:
515       operationId: loggers-name
516       parameters:
517         - explode: false
518           in: path
519           name: name
520           required: true
521           schema:
522             type: string
523           style: simple
524       responses:
525         "200":
526           content:
527             application/vnd.spring-boot.actuator.v3+json:
528               schema:
529                 type: object
530             application/json:
531               schema:
532                 type: object
533             application/vnd.spring-boot.actuator.v2+json:
534               schema:
535                 type: object
536           description: OK
537       summary: Actuator web endpoint 'loggers-name'
538       tags:
539         - Actuator
540     post:
541       operationId: loggers-name_2
542       parameters:
543         - explode: false
544           in: path
545           name: name
546           required: true
547           schema:
548             type: string
549           style: simple
550       requestBody:
551         content:
552           application/json:
553             schema:
554               enum:
555                 - TRACE
556                 - DEBUG
557                 - INFO
558                 - WARN
559                 - ERROR
560                 - FATAL
561                 - "OFF"
562               type: string
563       responses:
564         "200":
565           content:
566             '*/*':
567               schema:
568                 type: object
569           description: OK
570       summary: Actuator web endpoint 'loggers-name'
571       tags:
572         - Actuator
573   /a1-policy/v2/services/{service_id}/keepalive:
574     put:
575       description: A registered service should invoke this operation regularly to
576         indicate that it is still alive. If a registered service fails to invoke this
577         operation before the end of a timeout period the service will be deregistered
578         and all its A1 policies wil be removed. (This timeout can be set or disabled
579         when each service is initially registered)
580       operationId: keepAliveService
581       parameters:
582         - explode: false
583           in: path
584           name: service_id
585           required: true
586           schema:
587             type: string
588           style: simple
589       responses:
590         "200":
591           content:
592             '*/*':
593               schema:
594                 type: object
595           description: "Service supervision timer refreshed, OK"
596         "404":
597           content:
598             '*/*':
599               schema:
600                 $ref: '#/components/schemas/error_information'
601           description: "The service is not found, needs re-registration"
602       summary: Heartbeat indicates that the service is running
603       tags:
604         - Service Registry and Supervision
605   /actuator/metrics:
606     get:
607       operationId: metrics
608       responses:
609         "200":
610           content:
611             application/vnd.spring-boot.actuator.v3+json:
612               schema:
613                 type: object
614             application/json:
615               schema:
616                 type: object
617             application/vnd.spring-boot.actuator.v2+json:
618               schema:
619                 type: object
620           description: OK
621       summary: Actuator web endpoint 'metrics'
622       tags:
623         - Actuator
624   /a1-policy/v2/rics:
625     get:
626       description: The call returns all Near-RT RICs that supports a given policy
627         type identity
628       operationId: getRics
629       parameters:
630         - description: "The identity of a policy type. If given, all Near-RT RICs supporting\
631           \ the policy type are returned"
632           explode: true
633           in: query
634           name: policytype_id
635           required: false
636           schema:
637             type: string
638           style: form
639       responses:
640         "200":
641           content:
642             application/json:
643               schema:
644                 $ref: '#/components/schemas/ric_info_list'
645               examples:
646                 ric_info_list:
647                   $ref: '#/components/examples/ric_info_list'
648           description: OK
649         "404":
650           content:
651             application/json:
652               schema:
653                 $ref: '#/components/schemas/error_information'
654           description: Policy type is not found
655       summary: Query Near-RT RIC information
656       tags:
657         - NearRT-RIC Repository
658   /a1-policy/v2/services:
659     get:
660       description: Either information about a registered service with given identity
661         or all registered services are returned.
662       operationId: getServices
663       parameters:
664         - description: The identity of the service
665           explode: true
666           in: query
667           name: service_id
668           required: false
669           schema:
670             type: string
671           style: form
672       responses:
673         "200":
674           content:
675             application/json:
676               schema:
677                 $ref: '#/components/schemas/service_status_list'
678               examples:
679                 service_status_list:
680                   $ref: '#/components/examples/service_status_list'
681           description: OK
682         "404":
683           content:
684             application/json:
685               schema:
686                 $ref: '#/components/schemas/error_information'
687           description: Service is not found
688       summary: Returns service information
689       tags:
690         - Service Registry and Supervision
691     put:
692       description: "Registering a service is needed to:<ul><li>Get callbacks about\
693         \ available NearRT RICs.</li><li>Activate supervision of the service. If a\
694         \ service is inactive, its policies will automatically be deleted.</li></ul>Policies\
695         \ can be created even if the service is not registerred. This is a feature\
696         \ which it is optional to use."
697       operationId: putService
698       requestBody:
699         content:
700           application/json:
701             schema:
702               $ref: '#/components/schemas/service_registration_info'
703         required: true
704       responses:
705         "200":
706           content:
707             '*/*':
708               schema:
709                 type: object
710           description: Service updated
711         "201":
712           content:
713             '*/*':
714               schema:
715                 type: object
716           description: Service created
717         "400":
718           content:
719             '*/*':
720               schema:
721                 $ref: '#/components/schemas/error_information'
722           description: The ServiceRegistrationInfo is not accepted
723       summary: Register a service
724       tags:
725         - Service Registry and Supervision
726       callbacks:
727         RICStatus:
728           "{$request.body#/callback_url}":
729            post:
730             description: The URL to this call is registered at Service registration.
731             operationId: serviceCallback
732             requestBody:
733               content:
734                 application/json:
735                   schema:
736                     $ref: '#/components/schemas/service_callback_info_v2'
737               required: true
738             responses:
739               "200":
740                 content:
741                   application/json:
742                     schema:
743                       $ref: '#/components/schemas/void'
744                 description: OK
745             summary: Callback for Near-RT RIC status
746             tags:
747               - Service callbacks
748   /actuator/info:
749     get:
750       operationId: info
751       responses:
752         "200":
753           content:
754             application/vnd.spring-boot.actuator.v3+json:
755               schema:
756                 type: object
757             application/json:
758               schema:
759                 type: object
760             application/vnd.spring-boot.actuator.v2+json:
761               schema:
762                 type: object
763           description: OK
764       summary: Actuator web endpoint 'info'
765       tags:
766         - Actuator
767   /status:
768     get:
769       operationId: getStatusV1
770       responses:
771         "200":
772           content:
773             '*/*':
774               schema:
775                 type: string
776           description: Service is living
777       summary: Returns status and statistics of this service
778       tags:
779         - Health Check
780   /a1-policy/v2/policy-types/{policytype_id}:
781     get:
782       operationId: getPolicyTypeDefinition
783       parameters:
784         - explode: false
785           in: path
786           name: policytype_id
787           required: true
788           schema:
789             type: string
790           style: simple
791       responses:
792         "200":
793           content:
794             application/json:
795               schema:
796                 $ref: '#/components/schemas/policy_type_definition'
797               examples:
798                 policy_type_definition:
799                   $ref: '#/components/examples/policy_type_definition'
800           description: schema of the given policy type
801         "404":
802           content:
803             application/json:
804               schema:
805                 $ref: '#/components/schemas/error_information'
806           description: Policy type is not found
807       summary: Returns a policy type definition
808       tags:
809         - A1 Policy Management
810   /actuator/logfile:
811     get:
812       operationId: logfile
813       responses:
814         "200":
815           content:
816             text/plain;charset=UTF-8:
817               schema:
818                 type: object
819           description: OK
820       summary: Actuator web endpoint 'logfile'
821       tags:
822         - Actuator
823   /actuator/health:
824     get:
825       operationId: health
826       responses:
827         "200":
828           content:
829             application/vnd.spring-boot.actuator.v3+json:
830               schema:
831                 type: object
832             application/json:
833               schema:
834                 type: object
835             application/vnd.spring-boot.actuator.v2+json:
836               schema:
837                 type: object
838           description: OK
839       summary: Actuator web endpoint 'health'
840       tags:
841         - Actuator
842   /a1-policy/v2/policies:
843     get:
844       description: "Returns a list of A1 policies matching given search criteria.\
845         \ <br>If several query parameters are defined, the policies matching all conditions\
846         \ are returned."
847       operationId: getPolicyIds
848       parameters:
849         - description: Select policies of a given policy type identity.
850           explode: true
851           in: query
852           name: policytype_id
853           required: false
854           schema:
855             type: string
856           style: form
857         - description: Select policies of a given Near-RT RIC identity.
858           explode: true
859           in: query
860           name: ric_id
861           required: false
862           schema:
863             type: string
864           style: form
865         - description: Select policies owned by a given service.
866           explode: true
867           in: query
868           name: service_id
869           required: false
870           schema:
871             type: string
872           style: form
873         - description: Select policies of types with the given type name (type identity
874             has the format <typename_version>)
875           explode: true
876           in: query
877           name: type_name
878           required: false
879           schema:
880             type: string
881           style: form
882       responses:
883         "200":
884           content:
885             application/json:
886               examples:
887                 policy_id_list:
888                   $ref: '#/components/examples/policy_id_list'
889               schema:
890                 $ref: '#/components/schemas/policy_id_list'
891           description: Policy identities
892         "404":
893           content:
894             application/json:
895               schema:
896                 $ref: '#/components/schemas/error_information'
897           description: Near-RT RIC or type not found
898       summary: Query policy identities
899       tags:
900         - A1 Policy Management
901     put:
902       operationId: putPolicy
903       requestBody:
904         content:
905           application/json:
906             schema:
907               $ref: '#/components/schemas/policy_info'
908         required: true
909       responses:
910         "200":
911           content:
912             application/json:
913               schema:
914                 $ref: '#/components/schemas/void'
915           description: Policy updated
916         "201":
917           content:
918             application/json:
919               schema:
920                 $ref: '#/components/schemas/void'
921           description: Policy created
922         "423":
923           content:
924             application/json:
925               schema:
926                 $ref: '#/components/schemas/error_information'
927           description: Near-RT RIC is not operational
928         "404":
929           content:
930             application/json:
931               schema:
932                 $ref: '#/components/schemas/error_information'
933           description: Near-RT RIC or policy type is not found
934       summary: Create or update a policy
935       tags:
936         - A1 Policy Management
937   /a1-policy/v2/services/{service_id}:
938     delete:
939       operationId: deleteService
940       parameters:
941         - explode: false
942           in: path
943           name: service_id
944           required: true
945           schema:
946             type: string
947           style: simple
948       responses:
949         "200":
950           content:
951             '*/*':
952               schema:
953                 $ref: '#/components/schemas/void'
954           description: Not used
955         "204":
956           content:
957             '*/*':
958               schema:
959                 type: object
960           description: Service unregistered
961         "404":
962           content:
963             '*/*':
964               schema:
965                 $ref: '#/components/schemas/error_information'
966           description: Service not found
967       summary: Unregister a service
968       tags:
969         - Service Registry and Supervision
970   /actuator/heapdump:
971     get:
972       operationId: heapdump
973       responses:
974         "200":
975           content:
976             application/octet-stream:
977               schema:
978                 type: object
979           description: OK
980       summary: Actuator web endpoint 'heapdump'
981       tags:
982         - Actuator
983   /a1-policy/v2/policies/{policy_id}/status:
984     get:
985       operationId: getPolicyStatus
986       parameters:
987         - explode: false
988           in: path
989           name: policy_id
990           required: true
991           schema:
992             type: string
993           style: simple
994       responses:
995         "200":
996           content:
997             application/json:
998               examples:
999                 policy_status_info:
1000                   $ref: '#/components/examples/policy_status_info'
1001               schema:
1002                 $ref: '#/components/schemas/policy_status_info'
1003           description: Policy status
1004         "404":
1005           content:
1006             application/json:
1007               schema:
1008                 $ref: '#/components/schemas/error_information'
1009           description: Policy is not found
1010       summary: Returns a policy status
1011       tags:
1012         - A1 Policy Management
1013 components:
1014   examples:
1015     service_status:
1016       description: List of service information
1017       value:
1018         callback_url: callback_url
1019         service_id: service_id
1020         keep_alive_interval_seconds: 0
1021         time_since_last_activity_seconds: 6
1022     service_status_list:
1023       description: List of service information
1024       value:
1025         service_list:
1026           - callback_url: callback_url
1027             service_id: service_id
1028             keep_alive_interval_seconds: 0
1029             time_since_last_activity_seconds: 6
1030           - callback_url: callback_url
1031             service_id: service_id
1032             keep_alive_interval_seconds: 0
1033             time_since_last_activity_seconds: 6
1034     policy_type_definition:
1035       description: Schema of the given Policy type
1036       value:
1037         policy_schema: "{}"
1038     policy_type_id_list:
1039       description: Array of policy type id's
1040       value:
1041         policy_type_id_list:
1042           - policytype_id
1043           - policytype_id
1044     policy_info:
1045       description: Policy information of one A1-P policy
1046       value:
1047         ric_id: ric_id
1048         policy_id: policy_id
1049         transient: false
1050         service_id: service_id
1051         policy_data: "{}"
1052         status_notification_uri: status_notification_uri
1053         policytype_id: policytype_id
1054     policy_info_list:
1055       description: List of policy information
1056       value:
1057         policies:
1058           - ric_id: ric_id
1059             policy_id: policy_id
1060             transient: false
1061             service_id: service_id
1062             policy_data: "{}"
1063             status_notification_uri: status_notification_uri
1064             policytype_id: policytype_id
1065           - ric_id: ric_id
1066             policy_id: policy_id
1067             transient: false
1068             service_id: service_id
1069             policy_data: "{}"
1070             status_notification_uri: status_notification_uri
1071             policytype_id: policytype_id
1072     policy_id_list:
1073       description: A list of policy identities
1074       value:
1075         policy_ids:
1076           - policy_ids
1077           - policy_ids
1078     policy_status_info:
1079       description: Status for one A1-P Policy
1080       value:
1081         last_modified: last_modified
1082         status: "{}"
1083     status_info:
1084       value:
1085         status: status
1086     ric_info:
1087       value:
1088         ric_id: ric_id
1089         managed_element_ids:
1090           - managed_element_ids
1091           - managed_element_ids
1092         state: UNAVAILABLE
1093         policytype_ids:
1094           - policytype_ids
1095           - policytype_ids
1096     ric_info_list:
1097       value:
1098         rics:
1099           - ric_id: ric_id
1100             managed_element_ids:
1101               - managed_element_ids
1102               - managed_element_ids
1103             state: UNAVAILABLE
1104             policytype_ids:
1105               - policytype_ids
1106               - policytype_ids
1107           - ric_id: ric_id
1108             managed_element_ids:
1109               - managed_element_ids
1110               - managed_element_ids
1111             state: UNAVAILABLE
1112             policytype_ids:
1113               - policytype_ids
1114               - policytype_ids
1115   schemas:
1116     policy_type_definition:
1117       description: Contains policy type schema definition
1118       type: object
1119       properties:
1120         policy_schema:
1121           description: Policy type json schema. The schema is a json object following
1122             http://json-schema.org/draft-07/schema
1123           type: object
1124     error_information:
1125       description: Problem as defined in https://tools.ietf.org/html/rfc7807
1126       properties:
1127         detail:
1128           description: ' A human-readable explanation specific to this occurrence
1129             of the problem.'
1130           example: Policy type not found
1131           type: string
1132         status:
1133           description: 'The HTTP status code generated by the origin server for this
1134             occurrence of the problem. '
1135           example: 404
1136           format: int32
1137           type: integer
1138       type: object
1139     void:
1140       description: Void/empty
1141       type: object
1142     status_info:
1143       properties:
1144         status:
1145           description: status text
1146           type: string
1147       type: object
1148     authorization_result:
1149       description: Result of authorization
1150       example:
1151         result: true
1152       properties:
1153         result:
1154           description: "If true, the access is granted"
1155           type: boolean
1156       required:
1157         - result
1158       type: object
1159     ric_info:
1160       description: Information for a Near-RT RIC
1161       properties:
1162         ric_id:
1163           description: identity of the Near-RT RIC
1164           type: string
1165         managed_element_ids:
1166           description: O1 identities for managed entities
1167           items:
1168             description: O1 identities for managed entities
1169             type: string
1170           type: array
1171         state:
1172           description: Represents the states for a Near-RT RIC
1173           enum:
1174             - UNAVAILABLE
1175             - AVAILABLE
1176             - SYNCHRONIZING
1177             - CONSISTENCY_CHECK
1178           type: string
1179         policytype_ids:
1180           description: supported policy types
1181           items:
1182             description: supported policy types
1183             type: string
1184           type: array
1185       type: object
1186     service_registration_info:
1187       description: Information for one service
1188       properties:
1189         callback_url:
1190           description: callback for notifying of Near-RT RIC state changes
1191           type: string
1192         service_id:
1193           description: identity of the service
1194           type: string
1195         keep_alive_interval_seconds:
1196           description: "keep alive interval for the service. This is used to enable\
1197             \ optional heartbeat supervision of the service. If set (> 0) the registered\
1198             \ service should regularly invoke a 'keepalive' REST call. When a service\
1199             \ fails to invoke this 'keepalive' call within the configured time, the\
1200             \ service is considered unavailable. An unavailable service will be automatically\
1201             \ deregistered and its policies will be deleted. Value 0 means timeout\
1202             \ supervision is disabled."
1203           format: int64
1204           type: integer
1205       required:
1206         - service_id
1207       type: object
1208     policy_info_list:
1209       description: List of policy information
1210       properties:
1211         policies:
1212           description: List of policy information
1213           items:
1214             $ref: '#/components/schemas/policy_info'
1215           type: array
1216       type: object
1217     policy_status_info:
1218       description: Status for one A1-P Policy
1219       properties:
1220         last_modified:
1221           description: "timestamp, last modification time"
1222           type: string
1223         status:
1224           description: the Policy status
1225           type: object
1226       type: object
1227     service_status:
1228       properties:
1229         callback_url:
1230           description: callback for notifying of RIC synchronization
1231           type: string
1232         service_id:
1233           description: identity of the service
1234           type: string
1235         keep_alive_interval_seconds:
1236           description: policy keep alive timeout
1237           format: int64
1238           type: integer
1239         time_since_last_activity_seconds:
1240           description: time since last invocation by the service
1241           format: int64
1242           type: integer
1243       type: object
1244     ric_info_list:
1245       description: List of Near-RT RIC information
1246       properties:
1247         rics:
1248           description: List of Near-RT RIC information
1249           items:
1250             $ref: '#/components/schemas/ric_info'
1251           type: array
1252       type: object
1253     input:
1254       description: input
1255       properties:
1256         access_type:
1257           description: Access type
1258           enum:
1259             - READ
1260             - WRITE
1261             - DELETE
1262           type: string
1263         auth_token:
1264           description: Authorization token
1265           type: string
1266         policy_type_id:
1267           description: Policy type identifier
1268           type: string
1269       required:
1270         - access_type
1271         - auth_token
1272         - policy_type_id
1273       type: object
1274     policy_authorization:
1275       description: Authorization request for A1 policy requests
1276       properties:
1277         input:
1278           $ref: '#/components/schemas/input'
1279       required:
1280         - input
1281       type: object
1282     policy_type_id_list:
1283       description: Information about policy types
1284       properties:
1285         policytype_ids:
1286           description: Policy type identities
1287           items:
1288             description: Policy type identities
1289             type: string
1290           type: array
1291       type: object
1292     policy_info:
1293       description: Information for one A1-P Policy
1294       properties:
1295         ric_id:
1296           description: identity of the target Near-RT RIC
1297           type: string
1298         policy_id:
1299           description: identity of the policy
1300           type: string
1301         transient:
1302           default: false
1303           description: "if true, the policy is deleted at RIC restart. If false, its\
1304             \ value is maintained by this service until explicitly deleted. Default\
1305             \ false."
1306           example: false
1307           nullable: false
1308           type: boolean
1309         service_id:
1310           description: the identity of the service owning the policy. This can be
1311             used to group the policies (it is possible to get all policies associated
1312             to a service). Note that the service does not need to be registered.
1313           type: string
1314         policy_data:
1315           description: the configuration of the policy
1316           type: object
1317         status_notification_uri:
1318           description: Callback URI for policy status updates
1319           type: string
1320         policytype_id:
1321           description: identity of the policy type
1322           type: string
1323       required:
1324         - ric_id
1325         - policy_id
1326         - service_id
1327         - policy_data
1328         - policytype_id
1329       type: object
1330     policy_id_list:
1331       description: A list of policy identities
1332       example:
1333         policy_ids:
1334           - policy_ids
1335           - policy_ids
1336       properties:
1337         policy_ids:
1338           description: Policy identities
1339           items:
1340             description: Policy identities
1341             type: string
1342           type: array
1343       type: object
1344     service_status_list:
1345       properties:
1346         service_list:
1347           description: List of service information
1348           items:
1349             $ref: '#/components/schemas/service_status'
1350           type: array
1351       type: object
1352     service_callback_info_v2:
1353       description: Information transferred as in Service callbacks (callback_url)
1354       properties:
1355         ric_id:
1356           description: identity of a Near-RT RIC
1357           type: string
1358         event_type:
1359           description: "values:\nAVAILABLE: the  Near-RT RIC has become available\
1360             \ for A1 Policy management"
1361           enum:
1362             - AVAILABLE
1363           type: string
1364       required:
1365         - event_type
1366         - ric_id
1367       type: object
1368     Link:
1369       properties:
1370         templated:
1371           type: boolean
1372         href:
1373           type: string
1374       type: object